⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 patches

📁 汇编源代码大全
💻
📖 第 1 页 / 共 3 页
字号:
diff -c /usr2/polymnia/hyc/News/arc/Make.tws arc/Make.tws*** /usr2/polymnia/hyc/News/arc/Make.tws	Wed Jul  6 02:26:14 1988--- arc/Make.tws	Sun Jul 31 18:29:28 1988****************** 22,33 ****    libtws.a:	dtime.o dtimep.o lexstring.o  		ar r libtws.a dtime.o dtimep.o lexstring.o! # The following amusing bullshit makes sure that ranlib! # gets executed if it is present, no matter which shell! # make uses.  If there's a better way to do this, someone! # please tell me!! 		-if test -r /usr/bin/ranlib ; then ranlib libtws.a ; fi! 		-if ( -r /usr/bin/ranlib ) ranlib libtws.a    dtime.o:	dtime.c tws.h  --- 22,29 ----    libtws.a:	dtime.o dtimep.o lexstring.o  		ar r libtws.a dtime.o dtimep.o lexstring.o! #Hope it goes, but no big deal if not. -- hyc! 		-ranlib libtws.a    dtime.o:	dtime.c tws.h  diff -c /usr2/polymnia/hyc/News/arc/arc.c arc/arc.c*** /usr2/polymnia/hyc/News/arc/arc.c	Wed Jul  6 02:26:55 1988--- arc/arc.c	Sun Jul 31 18:43:40 1988****************** 1,5 ****  /*!  * $Header: arc.c,v 1.10 88/06/17 15:22:48 hyc Locked $   */    /*  ARC - Archive utility--- 1,5 ----  /*!  * $Header: arc.c,v 1.12 88/07/31 18:39:50 hyc Exp $   */    /*  ARC - Archive utility****************** 73,88 ****  #include <stdio.h>  #include "arc.h"    int		strlen();  void		addarc(), delarc(), extarc(), lstarc(), tstarc(), cvtarc(), runarc();  void		abort();  #if	MTS  void		etoa();  #endif  #if	GEMDOS! long		_stksize = 24576;  #endif  char		*strcpy(), *strcat();    static char   **lst;		/* files list */  static int	lnum;		/* length of files list */--- 73,95 ----  #include <stdio.h>  #include "arc.h"  + #if	UNIX+ #include <sys/types.h>+ #include <sys/stat.h>+ #endif+   int		strlen();  void		addarc(), delarc(), extarc(), lstarc(), tstarc(), cvtarc(), runarc();  void		abort();+ static	void	expandlst();  #if	MTS  void		etoa();  #endif  #if	GEMDOS! long		_stksize = 65536L;  #endif  char		*strcpy(), *strcat();+ char		*makefnam();	/* filename fixup routine */    static char   **lst;		/* files list */  static int	lnum;		/* length of files list */****************** 93,99 ****  {  	char		opt = 0;/* selected action */  	char	       *a;	/* option pointer */- 	char	       *makefnam();	/* filename fixup routine */  	void		upper();/* case conversion routine */  	char	       *index();/* string index utility */  	char	       *envfind();	/* environment searcher */--- 100,105 ----****************** 101,111 ****--- 107,121 ----  	char	       *arctemp2, *calloc(), *mktemp();  #if	GEMDOS  	void		exitpause();+ 	int		append;  #endif  #if	MTS  	fortran void	guinfo();  	char		gotinf[4];  #endif+ #if	UNIX+ 	struct	stat	sbuf;+ #endif    	if (num < 3) {  		printf("ARC - Archive utility, Version 5.21, created on 04/22/87 at 15:05:21\n");****************** 198,207 ****  		if (arctemp[n - 1] != CUTOFF)  			arctemp[n] = CUTOFF;  	}  #if	!MSDOS! 	strcat(arctemp, mktemp("AXXXXXX"));  #else  	strcat(arctemp, "$ARCTEMP");  #endif  #else  	guinfo("SHFSEP	", gotinf);--- 208,224 ----  		if (arctemp[n - 1] != CUTOFF)  			arctemp[n] = CUTOFF;  	}+ #if	UNIX+ 	else	strcpy(arctemp, "/tmp/");+ #endif  #if	!MSDOS! 	{! 		static char tempname[] = "AXXXXXX";! 		strcat(arctemp, mktemp(tempname));! 	}  #else  	strcat(arctemp, "$ARCTEMP");+ 	arctemp2 = NULL;  #endif  #else  	guinfo("SHFSEP	", gotinf);****************** 223,229 ****  #endif    	/* create archive names, supplying defaults */! 	makefnam(arg[2], ".arc", arcname);  	/* makefnam(".$$$",arcname,newname); */  	sprintf(newname, "%s.arc", arctemp);  	makefnam(".BAK", arcname, bakname);--- 240,253 ----  #endif    	/* create archive names, supplying defaults */! #if	UNIX! 	if (!stat(arg[2],&sbuf))! 		strcpy(arcname,arg[2]);! 	else! 		makefnam(arg[2],".arc",arcname);! #else! 	makefnam(arg[2], ".ARC", arcname);! #endif  	/* makefnam(".$$$",arcname,newname); */  	sprintf(newname, "%s.arc", arctemp);  	makefnam(".BAK", arcname, bakname);****************** 298,306 ****--- 322,346 ----  	for (n = 0; n < lnum;) {/* expand indirect references */  		if (*lst[n] == '@')  			expandlst(n);+ #if	GEMDOS		/* redirect stdout from the desktop...*/+ 		else if (*lst[n] == '>') {+ 			arctemp2 = (++lst[n]);+ 			lst[n] = lst[lnum-1];	/* delete this entry */+ 			lnum--;+ 			if (arctemp2[0] == '>') {+ 				append = 1;+ 				arctemp2++;+ 			}+ 			else	append = 0;+ 		}+ #endif  		else  			n++;  	}+ #if	GEMDOS+ 	if (arctemp2)+ 		freopen(arctemp2,append ? "a" : "w",stdout);+ #endif    	/* act on whatever action command was given */  ****************** 349,355 ****  #endif  	return nerrs;  }! static  expandlst(n)			/* expand an indirect reference */  	int		n;	/* number of entry to expand */  {--- 389,395 ----  #endif  	return nerrs;  }! static	void  expandlst(n)			/* expand an indirect reference */  	int		n;	/* number of entry to expand */  {diff -c /usr2/polymnia/hyc/News/arc/arc.h arc/arc.h*** /usr2/polymnia/hyc/News/arc/arc.h	Wed Jul  6 02:26:56 1988--- arc/arc.h	Sun Jul 31 18:45:33 1988****************** 1,5 ****  /*!  * $Header: arc.h,v 1.7 88/06/01 17:51:06 hyc Locked $   */    #undef	MSDOS--- 1,5 ----  /*!  * $Header: arc.h,v 1.9 88/07/31 18:43:18 hyc Exp $   */    #undef	MSDOS****************** 27,32 ****--- 27,34 ----  #if	MSDOS || GEMDOS  #define	DOS	1  #define	CUTOFF	'\\'+ #define	OPEN_R	"rb"+ #define	OPEN_W	"wb"  #endif    #if	!MSDOS****************** 37,53 ****  #if	BSD || SYSV  #define	UNIX	1  #define	CUTOFF	'/'  #include <ctype.h>  #endif    #if	MTS! #define rindex strrchr! #define index strchr! #undef  USEGFINFO		/* define this to use GFINFO for directory */! #define USECATSCAN		/* scanning, else use CATSCAN/FILEINFO... */  #define	CUTOFF	sepchr[0]  #endif    /*  ARC - Archive utility - ARC Header          Version 2.17, created on 04/22/87 at 13:09:43--- 39,60 ----  #if	BSD || SYSV  #define	UNIX	1  #define	CUTOFF	'/'+ #define	OPEN_R	"r"+ #define	OPEN_W	"w"  #include <ctype.h>  #endif    #if	MTS! #define	USEGFINFO	0	/* define this to use GFINFO for directory */! #define	USECATSCAN	1	/* scanning, else use CATSCAN/FILEINFO... */  #define	CUTOFF	sepchr[0]  #endif  + #if	MTS || SYSV+ #define	rindex	strrchr+ #define	index	strchr+ #endif+   /*  ARC - Archive utility - ARC Header          Version 2.17, created on 04/22/87 at 13:09:43****************** 69,75 ****  #define ARCVER 9		/* archive header version code   */  #define STRLEN 100		/* system standard string length */  #define FNLEN 13		/* file name length              */! #define MAXARG 25		/* maximum number of arguments   */    #ifndef DONT_DEFINE		/* Defined by arcdata.c */  #include "arcs.h"--- 76,82 ----  #define ARCVER 9		/* archive header version code   */  #define STRLEN 100		/* system standard string length */  #define FNLEN 13		/* file name length              */! #define MAXARG 400		/* maximum number of arguments   */    #ifndef DONT_DEFINE		/* Defined by arcdata.c */  #include "arcs.h"diff -c /usr2/polymnia/hyc/News/arc/arcadd.c arc/arcadd.c*** /usr2/polymnia/hyc/News/arc/arcadd.c	Wed Jul  6 02:26:57 1988--- arc/arcadd.c	Sun Jul 31 18:47:27 1988****************** 1,5 ****  /*!  * $Header: arcadd.c,v 1.8 88/06/13 00:31:15 hyc Locked $   */    /*--- 1,5 ----  /*!  * $Header: arcadd.c,v 1.9 88/07/31 18:45:14 hyc Exp $   */    /******************* 231,237 ****  	int             upd = 0;/* true if replacing an entry */    #if	!MTS! 	if (!(f = fopen(path, "rb")))  #else  	if (image)  		f = fopen(path, "rb");--- 231,237 ----  	int             upd = 0;/* true if replacing an entry */    #if	!MTS! 	if (!(f = fopen(path, OPEN_R)))  #else  	if (image)  		f = fopen(path, "rb");****************** 246,251 ****--- 246,280 ----  		}  		return;  	}+ #if	!DOS+ 	if (strlen(name) >= FNLEN) {+ 		if (warn) {+ 			char	buf[STRLEN];+ 			printf("WARNING: File %s name too long!\n", name);+ 			name[FNLEN-1]='\0';+ 			while(1) {+ 				printf("  Truncate to %s (y/n)? ", name);+ 				fflush(stdout);+ 				fgets(buf, STRLEN, stdin);+ 				*buf = toupper(*buf);+ 				if (*buf == 'Y' || *buf == 'N')+ 					break;+ 			}+ 			if (*buf == 'N') {+ 				printf("Skipping...\n");+ 				fclose(f);+ 				return;+ 			}+ 		}+ 		else {+ 			if (note)+ 				printf("Skipping file: %s - name too long.\n",+ 					name);+ 			fclose(f);+ 			return;+ 		}+ 	}+ #endif  	strcpy(nhdr.name, name);/* save name */  	nhdr.size = 0;		/* clear out size storage */  	nhdr.crc = 0;		/* clear out CRC check storage */****************** 257,269 ****  	int	inlen;  	struct	GDDSECT	*region;  ! 	region=gdinfo(f->_fd);  	inlen=region->GDINLEN;! 	buffer=malloc(inlen);   /* maximum line length */  	setbuf(f,buffer);          	f->_bufsiz=inlen;        ! 	f->_mods|=0x00040000;   /* Don't do "$continue with" */! 	f->_mods&=0xfff7ffff;   /* turn it off, if set... */  	}  	getstamp(path, &nhdr.date, &nhdr.time);  #endif--- 286,298 ----  	int	inlen;  	struct	GDDSECT	*region;  ! 	region=gdinfo(f->_fd._fdub);  	inlen=region->GDINLEN;! 	buffer=malloc(inlen);	/* maximum line length */  	setbuf(f,buffer);          	f->_bufsiz=inlen;        ! 	f->_mods|=_NOIC;	/* Don't do "$continue with" */! 	f->_mods&=~_IC;		/* turn it off, if set... */  	}  	getstamp(path, &nhdr.date, &nhdr.time);  #endif****************** 325,331 ****  	hdrver = ARCVER;		/* anything but end marker */  	writehdr(&nhdr, new);	/* write out header skeleton */  	pack(f, new, &nhdr);	/* pack file into archive */- 	strcpy(nhdr.name, name);  	fseek(new, starts, 0);	/* move back to header skeleton */  	writehdr(&nhdr, new);	/* write out real header */  	fseek(new, nhdr.size, 1);	/* skip over data to next header */--- 354,359 ----diff -c /usr2/polymnia/hyc/News/arc/arcdata.c arc/arcdata.c*** /usr2/polymnia/hyc/News/arc/arcdata.c	Wed Jul  6 02:26:59 1988--- arc/arcdata.c	Sun Jul 31 18:48:38 1988****************** 1,5 ****  /*!  * $Header: arcdata.c,v 1.6 88/06/01 19:17:58 hyc Locked $   */    /*  ARC - Archive utility - ARCDATA--- 1,5 ----  /*!  * $Header: arcdata.c,v 1.7 88/07/31 18:47:22 hyc Exp $   */    /*  ARC - Archive utility - ARCDATAdiff -c /usr2/polymnia/hyc/News/arc/arcdos.c arc/arcdos.c*** /usr2/polymnia/hyc/News/arc/arcdos.c	Wed Jul  6 02:27:00 1988--- arc/arcdos.c	Sun Jul 31 18:49:42 1988****************** 1,5 ****  /*!  * $Header: arcdos.c,v 1.5 88/06/13 00:40:49 hyc Locked $   */    /*--- 1,5 ----  /*!  * $Header: arcdos.c,v 1.6 88/07/31 18:48:09 hyc Exp $   */    /******************* 35,40 ****--- 35,41 ----  #endif    #if	SYSV+ #include <sys/times.h>  struct timeval {  	long tv_sec;  	long tv_usec;****************** 78,100 ****  	*time = ret[0];  #endif  #if	UNIX! 	char	       *ctime();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -