SCCS-vsn: usr.bin/diff/diff/diff.c 4.3
SCCS-vsn: usr.bin/diff/diff/diff.h 4.5
SCCS-vsn: usr.bin/diff/diff/diffreg.c 4.9
-static char sccsid[] = "@(#)diff.c 4.2 %G%";
+static char sccsid[] = "@(#)diff.c 4.3 %G%";
talloc(n)
{
register char *p;
talloc(n)
{
register char *p;
- p = malloc((unsigned)n);
- if(p!=NULL)
+
+ if ((p = malloc((unsigned)n)) != NULL)
return(p);
noroom();
}
char *
return(p);
noroom();
}
char *
-ralloc(p,n) /*compacting reallocation */
char *p;
{
register char *q;
char *realloc();
char *p;
{
register char *q;
char *realloc();
- free(p);
- free(dummy);
- dummy = malloc(1);
- q = realloc(p, (unsigned)n);
- if(q==NULL)
+
+ if ((q = realloc(p, (unsigned)n)) == NULL)
-/* diff.h 4.4 83/07/01 */
+/* diff.h 4.5 85/06/03 */
/*
* diff - common declarations
/*
* diff - common declarations
struct stat stb1, stb2;
struct stat stb1, stb2;
struct stat stb1, stb2;
struct stat stb1, stb2;
-/*
- * This is allocated early, and used
- * to reset the free storage pointer to effect space compaction.
- */
-char *dummy;
-
char *malloc(), *talloc(), *ralloc();
char *savestr(), *splice(), *splicen();
char *mktemp(), *copytemp(), *rindex();
char *malloc(), *talloc(), *ralloc();
char *savestr(), *splice(), *splicen();
char *mktemp(), *copytemp(), *rindex();
-static char sccsid[] = "@(#)diffreg.c 4.8 %G%";
+static char sccsid[] = "@(#)diffreg.c 4.9 %G%";
if ((stb1.st_mode & S_IFMT) == S_IFDIR)
file1 = splice(file1, file2);
else if ((stb2.st_mode & S_IFMT) == S_IFDIR)
if ((stb1.st_mode & S_IFMT) == S_IFDIR)
file1 = splice(file1, file2);
else if ((stb2.st_mode & S_IFMT) == S_IFDIR)