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

📄 patches

📁 汇编源代码大全
💻
📖 第 1 页 / 共 3 页
字号:
! 	struct stat    *buf;! 	int             day, hr, min, sec, yr, imon;! 	static char     mon[4], *mons[12] = {! 				   "Jan", "Feb", "Mar", "Apr", "May", "Jun",! 				    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"! 	};  ! 	buf = (struct stat *) malloc(sizeof(struct stat));! 	fstat(fileno(f), buf);! ! 	sscanf(ctime(&(buf->st_mtime)), "%*4s%3s%d%d:%d:%d%d", mon, &day, &hr, &min,! 	       &sec, &yr);! 	for (imon = 0; imon < 12 && strcmp(mon, mons[imon]); imon++);! ! 	*date = (unsigned short) (((yr - 1980) << 9) + ((imon + 1) << 5) + day);! 	*time = (unsigned short) ((hr << 11) + (min << 5) + sec / 2);  #endif  #if	MTS  	fortran         timein(),--- 79,93 ----  	*time = ret[0];  #endif  #if	UNIX! 	struct stat	buf;! 	struct tm	*localtime(), *t;  ! 	fstat(fileno(f), &buf);! 	t=localtime(&(buf.st_mtime));! 	*date = (unsigned short) (((t->tm_year - 80) << 9) +! 				((t->tm_mon + 1) << 5) + t->tm_mday);! 	*time = (unsigned short) ((t->tm_hour << 11) +! 				(t->tm_min << 5) + t->tm_sec / 2);  #endif  #if	MTS  	fortran         timein(),diff -c /usr2/polymnia/hyc/News/arc/arcext.c arc/arcext.c*** /usr2/polymnia/hyc/News/arc/arcext.c	Wed Jul  6 02:27:01 1988--- arc/arcext.c	Fri Jul 22 14:53:29 1988****************** 155,161 ****  		}  	}  #if	!MTS! 	if (!(f = fopen(fix, "wb")))  #else  	{  		fortran         create();--- 155,161 ----  		}  	}  #if	!MTS! 	if (!(f = fopen(fix, OPEN_W)))  #else  	{  		fortran         create();diff -c /usr2/polymnia/hyc/News/arc/arcio.c arc/arcio.c*** /usr2/polymnia/hyc/News/arc/arcio.c	Wed Jul  6 02:27:02 1988--- arc/arcio.c	Sun Jul 31 18:50:20 1988****************** 1,5 ****  /*!  * $Header: arcio.c,v 1.7 88/06/02 16:27:32 hyc Locked $   */    /*  ARC - Archive utility - ARCIO--- 1,5 ----  /*!  * $Header: arcio.c,v 1.9 88/07/31 18:49:19 hyc Exp $   */    /*  ARC - Archive utility - ARCIO****************** 102,112 ****  #if	MTS  	(void) atoe(hdr->name, strlen(hdr->name));  #endif! 	for (i = 0; i<4; hdr->size<<=8, hdr->size += dummy[16-i], i++);  	hdr->date = (short) ((dummy[18] << 8) + dummy[17]);  	hdr->time = (short) ((dummy[20] << 8) + dummy[19]);  	hdr->crc = (short) ((dummy[22] << 8) + dummy[21]);! 	for (i = 0; i<4; hdr->length<<=8, hdr->length += dummy[26-i], i++);  #endif    	if (hdr->date > olddate--- 102,112 ----  #if	MTS  	(void) atoe(hdr->name, strlen(hdr->name));  #endif! 	for (i = 0, hdr->size=0; i<4; hdr->size<<=8, hdr->size += dummy[16-i], i++);  	hdr->date = (short) ((dummy[18] << 8) + dummy[17]);  	hdr->time = (short) ((dummy[20] << 8) + dummy[19]);  	hdr->crc = (short) ((dummy[22] << 8) + dummy[21]);! 	for (i = 0, hdr->length=0; i<4; hdr->length<<=8, hdr->length += dummy[26-i], i++);  #endif    	if (hdr->date > olddate****************** 175,187 ****  	FILE           *t;	/* file to write to */  {  	c &= 0xff;! 	if (t)  #if	UNIX  		fputc(c, t);  #else  		if (fputc(c, t) == EOF)  			abort("Write fail (disk full?)");  #endif  }    /*--- 175,190 ----  	FILE           *t;	/* file to write to */  {  	c &= 0xff;! 	if (t) {  #if	UNIX  		fputc(c, t);+ 		if (ferror(t))+ 			abort("Write failed");  #else  		if (fputc(c, t) == EOF)  			abort("Write fail (disk full?)");  #endif+ 	}  }    /*diff -c /usr2/polymnia/hyc/News/arc/arclzw.c arc/arclzw.c*** /usr2/polymnia/hyc/News/arc/arclzw.c	Wed Jul  6 02:27:19 1988--- arc/arclzw.c	Sun Jul 31 18:50:49 1988****************** 1,5 ****  /*!  * $Header: arclzw.c,v 1.4 88/06/01 16:27:59 hyc Locked $   */    /*--- 1,5 ----  /*!  * $Header: arclzw.c,v 1.6 88/07/31 18:49:49 hyc Exp $   */    /******************* 59,65 ****  	unsigned char   follower;	/* char following string */  	unsigned short  next;	/* ptr to next in collision list */  	unsigned short  predecessor;	/* code for preceeding string */! };            /* string_tab[TABSIZE];	/* the code string table */      /* definitions for the new dynamic Lempel-Zev crunching */--- 59,65 ----  	unsigned char   follower;	/* char following string */  	unsigned short  next;	/* ptr to next in collision list */  	unsigned short  predecessor;	/* code for preceeding string */! };            /* string_tab[TABSIZE];	   the code string table */      /* definitions for the new dynamic Lempel-Zev crunching */diff -c /usr2/polymnia/hyc/News/arc/arcmatch.c arc/arcmatch.c*** /usr2/polymnia/hyc/News/arc/arcmatch.c	Wed Jul  6 02:27:20 1988--- arc/arcmatch.c	Sun Jul 31 18:51:22 1988****************** 1,5 ****  /*!  * $Header: arcmatch.c,v 1.5 88/06/01 19:41:08 hyc Locked $   */    /*--- 1,5 ----  /*!  * $Header: arcmatch.c,v 1.6 88/07/31 18:50:18 hyc Exp $   */    /******************* 67,72 ****--- 67,77 ----  	upper(t);		/* avoid case problems */  #endif	/* UNIX */  #if	GEMDOS+ 	char *strstr(), *i;	/* allow "*.*" to mean '*' */+ 	if (i=strstr(t,"*.*")) {+ 		i++;+ 		*i='\0';+ 	}  	return(pnmatch(n, t, 0));  #else  	/* first match name part */diff -c /usr2/polymnia/hyc/News/arc/arcmisc.c arc/arcmisc.c*** /usr2/polymnia/hyc/News/arc/arcmisc.c	Wed Jul  6 02:27:21 1988--- arc/arcmisc.c	Sun Jul 31 18:52:44 1988****************** 1,6 ****  /*   * Miscellaneous routines to get ARC running on non-MSDOS systems...!  * $Header: arcmisc.c,v 1.7 88/06/12 19:23:13 hyc Locked $    */    #include <stdio.h>--- 1,6 ----  /*   * Miscellaneous routines to get ARC running on non-MSDOS systems...!  * $Header: arcmisc.c,v 1.8 88/07/31 18:50:56 hyc Exp $    */    #include <stdio.h>****************** 55,61 ****  #include <sys/types.h>  #include <sys/dir.h>  #include <sys/stat.h>! 	int	rename();  #endif    #if	SYSV--- 55,61 ----  #include <sys/types.h>  #include <sys/dir.h>  #include <sys/stat.h>! 	int	rename(), unlink();  #endif    #if	SYSV****************** 65,72 ****  #define DIRECT direct  #endif    char           *strcpy(), *strcat(), *malloc();! int             strlen();    int  move(oldnam, newnam)--- 65,85 ----  #define DIRECT direct  #endif  + #if	BSD+ char	*+ memset(s, c, n)		/* oops. Thought it was standard BSD, but my Sun */+ 	char	*s;	/* fooled me again. -- hyc */+ 	int	c, n;+ {+ 	register int i;+ 	for(i=0;i<n;i++)+ 		s[i]=c;+ 	return(s);+ }+ #endif+   char           *strcpy(), *strcat(), *malloc();! int             strlen(), strcmp(), match();    int  move(oldnam, newnam)****************** 73,79 ****--- 86,94 ----  	char           *oldnam, *newnam;  {  	FILE           *fopen(), *old, *new;+ #if	!MTS  	struct stat     oldstat;+ #endif  	char           *strcpy();  	void		filecopy();  #if	GEMDOS****************** 81,99 ****  #else  	if (rename(oldnam, newnam))  #endif  	{  		if (stat(oldnam, &oldstat))	/* different partition? */  			return (-1);! 		old = fopen(oldnam, "rb");  		if (old == NULL)  			return (-1);! 		new = fopen(newnam, "wb");  		if (new == NULL)  			return (-1);  		filecopy(old, new, oldstat.st_size);! 		unlink(oldnam);  	}  	return 0;  }    static void--- 96,118 ----  #else  	if (rename(oldnam, newnam))  #endif+ #if	!MTS  	{  		if (stat(oldnam, &oldstat))	/* different partition? */  			return (-1);! 		old = fopen(oldnam, OPEN_R);  		if (old == NULL)  			return (-1);! 		new = fopen(newnam, OPEN_W);  		if (new == NULL)  			return (-1);  		filecopy(old, new, oldstat.st_size);! 		return(unlink(oldnam));  	}  	return 0;+ #else+ 	return(-1);+ #endif  }    static void****************** 270,276 ****  	int             alphasort();  	int             scandir();  #endif				/* UNIX */! 	int             fmatch();  	static int      Nnum = 0, ii;  	char		*rindex();  --- 289,295 ----  	int             alphasort();  	int             scandir();  #endif				/* UNIX */! 	int             fmatch(), free();  	static int      Nnum = 0, ii;  	char		*rindex();  diff -c /usr2/polymnia/hyc/News/arc/arcpack.c arc/arcpack.c*** /usr2/polymnia/hyc/News/arc/arcpack.c	Wed Jul  6 02:27:22 1988--- arc/arcpack.c	Sun Jul 31 18:53:25 1988****************** 1,5 ****  /*!  * $Header: arcpack.c,v 1.9 88/06/02 16:27:36 hyc Locked $   */    /*  ARC - Archive utility - ARCPACK--- 1,5 ----  /*!  * $Header: arcpack.c,v 1.11 88/07/31 18:52:08 hyc Exp $   */    /*  ARC - Archive utility - ARCPACK****************** 24,30 ****  #endif    void	setcode(), sqinit_cm(), sqputc_cm(), init_cm(), putc_cm();! void	filecopy(), abort(), putc_tst();  int	getch(), addcrc();    /* stuff for non-repeat packing */--- 24,30 ----  #endif    void	setcode(), sqinit_cm(), sqputc_cm(), init_cm(), putc_cm();! void	filecopy(), abort(), putc_tst(), init_sq(), scan_sq();  int	getch(), addcrc();    /* stuff for non-repeat packing */****************** 155,161 ****  	/* standard cleanups common to all methods */    	if (note)! 		printf("done. (%ld%%)\n",100L - (100L*hdr->size)/hdr->length);  }    /*--- 155,162 ----  	/* standard cleanups common to all methods */    	if (note)! 		printf("done. (%ld%%)\n",hdr->length == 0 ?! 				0L : 100L - (100L*hdr->size)/hdr->length);  }    /*diff -c /usr2/polymnia/hyc/News/arc/arcrun.c arc/arcrun.c*** /usr2/polymnia/hyc/News/arc/arcrun.c	Wed Jul  6 02:27:22 1988--- arc/arcrun.c	Sun Jul 31 18:53:59 1988****************** 1,5 ****  /*!  * $Header: arcrun.c,v 1.3 88/06/01 19:57:16 hyc Locked $   */    /*--- 1,5 ----  /*!  * $Header: arcrun.c,v 1.4 88/07/31 18:52:50 hyc Exp $   */    /******************* 22,27 ****--- 22,29 ----  #include "arc.h"    void	rempath(), openarc(), closearc(), abort();+ int	readhdr(), match(), unpack();+ static	void	runfile();  char	*strcat();    void****************** 33,39 ****  	char           *makefnam();	/* filename fixer */  	char            buf[STRLEN];	/* filename buffer */  	FILE           *fopen();/* file opener */- 	int             runfile();  	char	       *dummy[2];    	dummy[0]="dummy";--- 35,40 ----****************** 56,62 ****  	closearc(0);		/* close archive after changes */  }  ! static          int  runfile(hdr, num, arg)		/* run a file */  	struct heads   *hdr;	/* pointer to header data */  	int             num;	/* number of arguments */--- 57,63 ----  	closearc(0);		/* close archive after changes */  }  ! static  void  runfile(hdr, num, arg)		/* run a file */  	struct heads   *hdr;	/* pointer to header data */  	int             num;	/* number of arguments */****************** 120,126 ****  	if (warn)  		if (tmp = fopen(buf, "r"))  			abort("Temporary file %s already exists", buf);! 	if (!(tmp = fopen(buf, "wb")))  		abort("Unable to create temporary file %s", buf);    	if (note)--- 121,127 ----  	if (warn)  		if (tmp = fopen(buf, "r"))  			abort("Temporary file %s already exists", buf);! 	if (!(tmp = fopen(buf, OPEN_W)))  		abort("Unable to create temporary file %s", buf);    	if (note)diff -c /usr2/polymnia/hyc/News/arc/arcsq.c arc/arcsq.c

⌨️ 快捷键说明

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