[comp.os.minix] Diffs to RCS 5.5 for MINIX-PC

fredriks@cbnewse.cb.att.com (lars.fredriksen) (03/06/91)

Here are the diffs you were so eager to get. Two things to note, the config
script creates a config.h that needs a little fixup. This is Minix`s problem,
not the config script, since Minix has structures in place for things it doesn't
yet support. First move stdio.h so it is the last include file to be included.
Secondly, set the flag "has_sigaction" to 0.


Also note that the rcstest script croaks half way through on a here document.
If any on you shell gurus figure this one out, please send me e-mail.


Enjoy,

	Lars Fredriksen


Organization: Flaaklypa Hackers
To: fredriks@ihlpm.att.com
Subject: rcs.cd.shar
X-Mailer: W-MAIL 3.63/MINIX (11/05/90)
Message-Id: <910304.AA0404@ludvig.UUCP>
Date: Mon, 4 Mar 91 14:24:42
Status: R

echo x - rcs.cdif
sed '/^X/s///' > rcs.cdif << '/'
X*** ci.c	Thu Feb 28 20:20:47 1991
X--- tmp/ci.c	Thu Feb 28 20:12:32 1991
X***************
X*** 35,40 ****
X--- 35,43 ----
X  
X  
X  /* $Log: ci.c,v $
X+  * Revision 5.12.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.12  1990/12/31  01:00:12  eggert
X   * Don't use uninitialized storage when handling -{N,n}.
X   *
X***************
X*** 216,222 ****
X  static struct hshentry newdelta;	/* new delta to be inserted	*/
X  static struct Symrev *assoclst, *lastassoc;
X  
X! mainProg(ciId, "ci", "$Id: ci.c,v 5.12 1990/12/31 01:00:12 eggert Exp $")
X  {
X  	static const char cmdusage[] =
X  		"\nci usage: ci -{fklqru}[rev] -mmsg -{nN}name -sstate -t[textfile] -Vn file ...";
X--- 219,225 ----
X  static struct hshentry newdelta;	/* new delta to be inserted	*/
X  static struct Symrev *assoclst, *lastassoc;
X  
X! mainProg(ciId, "ci", "$Id: ci.c,v 5.12.1.1 1991/02/16 21:28:44 root Exp $")
X  {
X  	static const char cmdusage[] =
X  		"\nci usage: ci -{fklqru}[rev] -mmsg -{nN}name -sstate -t[textfile] -Vn file ...";
X***************
X*** 353,361 ****
X  
X          /* now handle all filenames */
X          do {
X!         finptr=frewrite=NULL;
X! 	fcopy = foutptr = NULL;
X! 	workptr = NULL;
X          targetdelta=nil;
X          olddeltanum=nil;
X  	ffree();
X--- 356,364 ----
X  
X          /* now handle all filenames */
X          do {
X!         finptr=frewrite=(FILE *) NULL;
X! 	fcopy = foutptr = (FILE *) NULL;
X! 	workptr = (FILE *) NULL;
X          targetdelta=nil;
X          olddeltanum=nil;
X  	ffree();
X***************
X*** 489,495 ****
X  		}
X                  if (&newdelta==Head) {
X                          /* prepend new one */
X! 			foutptr = NULL;
X                          if (!(expfilename=
X  			      buildrevision(gendeltas,targetdelta,false,false))) continue;
X                          if (!mustcheckin(expfilename,targetdelta)) continue;
X--- 492,498 ----
X  		}
X                  if (&newdelta==Head) {
X                          /* prepend new one */
X! 			foutptr = (FILE *) NULL;
X                          if (!(expfilename=
X  			      buildrevision(gendeltas,targetdelta,false,false))) continue;
X                          if (!mustcheckin(expfilename,targetdelta)) continue;
X***************
X*** 521,530 ****
X  
X                  /* rewrite rest of RCS file */
X                  fastcopy(finptr,frewrite);
X! 		ffclose(finptr); finptr=NULL; /* Help the file system. */
X          }
X! 	ffclose(frewrite); frewrite=NULL;
X! 	ffclose(workptr); workptr=NULL;
X  	seteid();
X  	if ((r = chmod(newRCSfilename,newRCSmode)) == 0) {
X  	    ignoreints();
X--- 524,533 ----
X  
X                  /* rewrite rest of RCS file */
X                  fastcopy(finptr,frewrite);
X! 		ffclose(finptr); finptr=(FILE *) NULL; /* Help the file system. */
X          }
X! 	ffclose(frewrite); frewrite=(FILE *) NULL;
X! 	ffclose(workptr); workptr=(FILE *) NULL;
X  	seteid();
X  	if ((r = chmod(newRCSfilename,newRCSmode)) == 0) {
X  	    ignoreints();
X*** co.c	Thu Feb 28 20:21:01 1991
X--- tmp/co.c	Thu Feb 28 20:12:58 1991
X***************
X*** 34,39 ****
X--- 34,42 ----
X  
X  
X  /* $Log: co.c,v $
X+  * Revision 5.6.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.6  1990/12/04  05:18:38  eggert
X   * Don't checkaccesslist() unless necessary.
X   * Use -I for prompts and -q for diagnostics.
X***************
X*** 151,157 ****
X  static struct hshentries *gendeltas;	/* deltas to be generated	*/
X  static struct hshentry *targetdelta;	/* final delta to be generated	*/
X  
X! mainProg(coId, "co", "$Id: co.c,v 5.6 1990/12/04 05:18:38 eggert Exp $")
X  {
X  	static const char cmdusage[] =
X  		"\nco usage: co -{flpqru}[rev] -ddate -jjoinlist -sstate -w[login] -Vn file ...";
X--- 154,160 ----
X  static struct hshentries *gendeltas;	/* deltas to be generated	*/
X  static struct hshentry *targetdelta;	/* final delta to be generated	*/
X  
X! mainProg(coId, "co", "$Id: co.c,v 5.6.1.1 1991/02/16 21:28:44 root Exp $")
X  {
X  	static const char cmdusage[] =
X  		"\nco usage: co -{flpqru}[rev] -ddate -jjoinlist -sstate -w[login] -Vn file ...";
X***************
X*** 260,267 ****
X  
X          /* now handle all filenames */
X          do {
X!         finptr=frewrite=NULL;
X! 	fcopy = foutptr = NULL;
X  	ffree();
X  
X  	if (!pairfilenames(argc, argv, lockflag?rcswriteopen:rcsreadopen, true, tostdout))
X--- 263,270 ----
X  
X          /* now handle all filenames */
X          do {
X!         finptr=frewrite= (FILE *) NULL;
X! 	fcopy = foutptr = (FILE *) NULL;
X  	ffree();
X  
X  	if (!pairfilenames(argc, argv, lockflag?rcswriteopen:rcsreadopen, true, tostdout))
X***************
X*** 329,335 ****
X  			if (changelock<0 || !checkaccesslist())
X  			    continue;
X  		    } else {
X! 			ffclose(frewrite);  frewrite=NULL;
X  			seteid();
X  			ignoreints();
X  			r = unlink(newRCSfilename);
X--- 332,338 ----
X  			if (changelock<0 || !checkaccesslist())
X  			    continue;
X  		    } else {
X! 			ffclose(frewrite);  frewrite= (FILE *) NULL;
X  			seteid();
X  			ignoreints();
X  			r = unlink(newRCSfilename);
X***************
X*** 372,379 ****
X  		if (changelock && !nerror) {
X                          /* rewrite the rest of the RCSfile */
X                          fastcopy(finptr,frewrite);
X! 			ffclose(finptr); finptr=NULL; /*Help the file system.*/
X!                         ffclose(frewrite); frewrite=NULL;
X  			seteid();
X  			if ((r = chmod(newRCSfilename, RCSstat.st_mode & ~(S_IWUSR|S_IWGRP|S_IWOTH))) == 0) {
X  			    ignoreints();
X--- 375,382 ----
X  		if (changelock && !nerror) {
X                          /* rewrite the rest of the RCSfile */
X                          fastcopy(finptr,frewrite);
X! 			ffclose(finptr); finptr= (FILE *) NULL; /*Help the file system.*/
X!                         ffclose(frewrite); frewrite= (FILE *) NULL;
X  			seteid();
X  			if ((r = chmod(newRCSfilename, RCSstat.st_mode & ~(S_IWUSR|S_IWGRP|S_IWOTH))) == 0) {
X  			    ignoreints();
X*** ident.c	Thu Feb 28 20:21:16 1991
X--- tmp/ident.c	Thu Feb 28 20:13:24 1991
X***************
X*** 29,34 ****
X--- 29,37 ----
X   */
X  
X  /* $Log: ident.c,v $
X+  * Revision 5.0.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.0  1990/08/22  08:12:37  eggert
X   * Don't limit output to known keywords.
X   * Remove arbitrary limits and lint.  Ansify and Posixate.
X***************
X*** 73,79 ****
X  static int match P((FILE*));
X  static int scanfile P((FILE*));
X  
X! mainProg(identId, "ident", "$Id: ident.c,v 5.0 1990/08/22 08:12:37 eggert Exp $")
X  /*  Ident searches the named files for all occurrences
X   *  of the pattern $keyword:...$, where the keywords are
X   *  Author, Date, Header, Id, Log, RCSfile, Revision, Source, and State.
X--- 76,82 ----
X  static int match P((FILE*));
X  static int scanfile P((FILE*));
X  
X! mainProg(identId, "ident", "$Id: ident.c,v 5.0.1.1 1991/02/16 21:28:44 root Exp $")
X  /*  Ident searches the named files for all occurrences
X   *  of the pattern $keyword:...$, where the keywords are
X   *  Author, Date, Header, Id, Log, RCSfile, Revision, Source, and State.
X***************
X*** 95,101 ****
X     }
X  
X     while ( --argc > 0 ) {
X!       if ( (fp = fopen(*++argv, "r") ) == NULL ) {
X  	 VOID fprintf(stderr,  "%s error: can't open %s\n", cmdid, *argv);
X  	 status = EXIT_FAILURE;
X           continue;
X--- 98,104 ----
X     }
X  
X     while ( --argc > 0 ) {
X!       if ( (fp = fopen(*++argv, "r") ) == (FILE *) NULL ) {
X  	 VOID fprintf(stderr,  "%s error: can't open %s\n", cmdid, *argv);
X  	 status = EXIT_FAILURE;
X           continue;
X*** rcs.c	Thu Feb 28 20:22:02 1991
X--- tmp/rcs.c	Thu Feb 28 20:14:37 1991
X***************
X*** 31,36 ****
X--- 31,39 ----
X  
X  
X  /* $Log: rcs.c,v $
X+  * Revision 5.7.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.7  1990/12/18  17:19:21  eggert
X   * Fix bug with multiple -n and -N options.
X   *
X***************
X*** 213,222 ****
X  static struct hshentry *cuthead, *cuttail, *delstrt;
X  static struct hshentries *gendeltas;
X  
X! mainProg(rcsId, "rcs", "$Id: rcs.c,v 5.7 1990/12/18 17:19:21 eggert Exp $")
X  {
X  	static const char cmdusage[] =
X  		"\nrcs usage: rcs -alogins -Aoldfile -{blu}[rev] -cstring -e[logins] -i -{LU} -{nN}name[:rev] -orange -sstate[:rev] -t[textfile] -Vn file ...";
X  
X  	const char *branchsym, *commsyml, *textfile;
X  	int branchflag, expmode, initflag;
X--- 216,232 ----
X  static struct hshentry *cuthead, *cuttail, *delstrt;
X  static struct hshentries *gendeltas;
X  
X! mainProg(rcsId, "rcs", "$Id: rcs.c,v 5.7.1.1 1991/02/16 21:28:44 root Exp $")
X  {
X+ #ifdef _MINIX
X+ 	static const char cmd1usage[] =
X+ 		"\nrcs usage: rcs -alogins -Aoldfile -{blu}[rev] -cstring -e[logins] -i -{LU}\n";
X+ 	static const char cmd2usage[] =
X+ 		"                 -{nN}name[:rev] -orange -sstate[:rev] -t[textfile] -Vn file ...\n";
X+ #else
X  	static const char cmdusage[] =
X  		"\nrcs usage: rcs -alogins -Aoldfile -{blu}[rev] -cstring -e[logins] -i -{LU} -{nN}name[:rev] -orange -sstate[:rev] -t[textfile] -Vn file ...";
X+ #endif
X  
X  	const char *branchsym, *commsyml, *textfile;
X  	int branchflag, expmode, initflag;
X***************
X*** 389,399 ****
X--- 399,417 ----
X  			    break;
X  			/* fall into */
X                  default:
X+ #ifdef _MINIX
X+ 			faterror("unknown option: %s%s%s", *argv, cmd1usage, cmd2usage);
X+ #else
X  			faterror("unknown option: %s%s", *argv, cmdusage);
X+ #endif
X                  };
X          }  /* end processing of options */
X  
X+ #ifdef _MINIX
X+ 	if (argc<1) faterror("no input file%s%s", cmd1usage, cmd2usage);
X+ #else
X  	if (argc<1) faterror("no input file%s", cmdusage);
X+ #endif
X          if (nerror) {
X  	    diagnose("%s aborted\n",cmdid);
X  	    exitmain(EXIT_FAILURE);
X***************
X*** 406,413 ****
X  
X          /* now handle all filenames */
X          do {
X! 	foutptr = NULL;
X!         finptr=frewrite=NULL;
X  	ffree();
X  
X          if ( initflag ) {
X--- 424,431 ----
X  
X          /* now handle all filenames */
X          do {
X! 	foutptr = (FILE *) NULL;
X!         finptr=frewrite=(FILE *) NULL;
X  	ffree();
X  
X          if ( initflag ) {
X***************
X*** 493,499 ****
X          if ( Head )
X             puttree(Head, frewrite);
X  	putdesc(textflag,textfile);
X! 	foutptr = NULL;
X  
X          if ( Head) {
X  	    if (!delrev.strt) {
X--- 511,517 ----
X          if ( Head )
X             puttree(Head, frewrite);
X  	putdesc(textflag,textfile);
X! 	foutptr = (FILE *) NULL;
X  
X          if ( Head) {
X  	    if (!delrev.strt) {
X***************
X*** 505,512 ****
X                      /* copy rest of delta text nodes that are not deleted      */
X              }
X          }
X! 	if (finptr) {ffclose(finptr); finptr=NULL;} /* Help the file system. */
X!         ffclose(frewrite);   frewrite = NULL;
X          if ( ! nerror ) {  /*  move temporary file to RCS file if no error */
X  	    /* update mode */
X  	    seteid();
X--- 523,530 ----
X                      /* copy rest of delta text nodes that are not deleted      */
X              }
X          }
X! 	if (finptr) {ffclose(finptr); finptr=(FILE *) NULL;} /* Help the file system. */
X!         ffclose(frewrite);   frewrite = (FILE *) NULL;
X          if ( ! nerror ) {  /*  move temporary file to RCS file if no error */
X  	    /* update mode */
X  	    seteid();
X***************
X*** 758,764 ****
X  	struct cbuf cb;
X  
X  	for (;;) {
X! 		foutptr = NULL;
X                  nextlex();
X                  if (!(nextdelta=getnum())) {
X                      if(delta)
X--- 776,782 ----
X  	struct cbuf cb;
X  
X  	for (;;) {
X! 		foutptr = (FILE *) NULL;
X                  nextlex();
X                  if (!(nextdelta=getnum())) {
X                      if(delta)
X***************
X*** 881,887 ****
X          /* go ahead with breaking  */
X  	messagefile = maketemp(0);
X  	errno = 0;
X!         if ( (mailmess = fopen(messagefile, "w")) == NULL) {
X  	    efaterror(messagefile);
X          }
X  
X--- 899,905 ----
X          /* go ahead with breaking  */
X  	messagefile = maketemp(0);
X  	errno = 0;
X!         if ( (mailmess = fopen(messagefile, "w")) == (FILE *) NULL) {
X  	    efaterror(messagefile);
X          }
X  
X***************
X*** 1345,1351 ****
X          if ( cuthead )  {
X  	    cutfilename = maketemp(3);
X  	    errno = 0;
X!             if ( (fcut = fopen(cutfilename, "w")) == NULL) {
X  		efaterror(cutfilename);
X              }
X  
X--- 1363,1369 ----
X          if ( cuthead )  {
X  	    cutfilename = maketemp(3);
X  	    errno = 0;
X!             if ( (fcut = fopen(cutfilename, "w")) == (FILE *) NULL) {
X  		efaterror(cutfilename);
X              }
X  
X*** rcsdiff.c	Thu Feb 28 20:22:25 1991
X--- tmp/rcsdiff.c	Thu Feb 28 20:15:23 1991
X***************
X*** 36,41 ****
X--- 36,44 ----
X  
X  
X  /* $Log: rcsdiff.c,v $
X+  * Revision 5.7.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.7  1990/12/13  06:54:07  eggert
X   * GNU diff 1.15 has -u.
X   *
X***************
X*** 120,126 ****
X  
X  static int exitstatus;
X  
X! mainProg(rcsdiffId, "rcsdiff", "$Id: rcsdiff.c,v 5.7 1990/12/13 06:54:07 eggert Exp $")
X  {
X      static const char cmdusage[] =
X  	    "\nrcsdiff usage: rcsdiff [-q] [-rrev1 [-rrev2]] [-Vn] [diff options] file ...";
X--- 123,129 ----
X  
X  static int exitstatus;
X  
X! mainProg(rcsdiffId, "rcsdiff", "$Id: rcsdiff.c,v 5.7.1.1 1991/02/16 21:28:44 root Exp $")
X  {
X      static const char cmdusage[] =
X  	    "\nrcsdiff usage: rcsdiff [-q] [-rrev1 [-rrev2]] [-Vn] [diff options] file ...";
X***************
X*** 252,258 ****
X  
X      /* now handle all filenames */
X      do {
X! 	    finptr=NULL;
X  	    ffree();
X  
X  	    if (pairfilenames(argc, argv, rcsreadopen, true, false) != 1)
X--- 255,261 ----
X  
X      /* now handle all filenames */
X      do {
X! 	    finptr= (FILE *) NULL;
X  	    ffree();
X  
X  	    if (pairfilenames(argc, argv, rcsreadopen, true, false) != 1)
X*** rcsedit.c	Thu Feb 28 20:22:38 1991
X--- tmp/rcsedit.c	Thu Feb 28 20:15:48 1991
X***************
X*** 36,41 ****
X--- 36,44 ----
X  
X  
X  /* $Log: rcsedit.c,v $
X+  * Revision 5.5.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.5  1990/12/30  05:07:35  eggert
X   * Fix report of busy RCS files when !defined(O_CREAT) | !defined(O_EXCL).
X   *
X***************
X*** 136,142 ****
X  
X  #include "rcsbase.h"
X  
X! libId(editId, "$Id: rcsedit.c,v 5.5 1990/12/30 05:07:35 eggert Exp $")
X  
X  static void keyreplace P((enum markers,const struct hshentry*,FILE*));
X  
X--- 139,145 ----
X  
X  #include "rcsbase.h"
X  
X! libId(editId, "$Id: rcsedit.c,v 5.5.1.1 1991/02/16 21:28:44 root Exp $")
X  
X  static void keyreplace P((enum markers,const struct hshentry*,FILE*));
X  
X***************
X*** 200,207 ****
X--- 203,219 ----
X   */
X  {
X  	const char *tmpptr;
X+ #if _MINIX && !ESTDIO
X+ 		/* Patch since Minix standard stdio do not know of "w+" mode */
X+ 	fclose(fcopy);
X+         if ((fedit=fopen(resultfile,"r+"))==(FILE *) NULL) {
X+                 faterror("Can't open working file %s",resultfile);
X+         }
X+ #else
X+ 
X          fedit=fcopy;
X  	arewind(fedit);
X+ #endif
X          editline = 1; linecorr=0;
X          tmpptr=editfile; editfile=resultfile; resultfile=tmpptr;
X          if (tostdout)
X***************
X*** 713,719 ****
X  	struct buf *dirt;
X  
X  	sp = RCSname;
X! 	dirt = &dirtfname[frewrite != NULL];
X  	bufalloc(dirt, strlen(sp)+1);
X  	tp = dirt->string;
X  	if ((lp = strrchr(sp,SLASH)))
X--- 725,731 ----
X  	struct buf *dirt;
X  
X  	sp = RCSname;
X! 	dirt = &dirtfname[frewrite != (FILE *) NULL];
X  	bufalloc(dirt, strlen(sp)+1);
X  	tp = dirt->string;
X  	if ((lp = strrchr(sp,SLASH)))
X***************
X*** 732,738 ****
X  	*tp = '\0'; /* same length as RCSname */
X  	tp = dirt->string;
X  
X! 	f = NULL;
X  
X  	seteid();
X  	ignoreints();
X--- 744,750 ----
X  	*tp = '\0'; /* same length as RCSname */
X  	tp = dirt->string;
X  
X! 	f = (FILE *) NULL;
X  
X  	seteid();
X  	ignoreints();
X***************
X*** 754,760 ****
X  		    /* We already have a lock somewhere else.  */
X  		    if (f) {
X  			/* Discard the first acquired lock.  */
X! 			ffclose(frewrite);  frewrite = NULL;
X  			if (unlink(newRCSfilename) < 0) {
X  			    setrid();
X  			    efaterror(newRCSfilename);
X--- 766,772 ----
X  		    /* We already have a lock somewhere else.  */
X  		    if (f) {
X  			/* Discard the first acquired lock.  */
X! 			ffclose(frewrite);  frewrite = (FILE *) NULL;
X  			if (unlink(newRCSfilename) < 0) {
X  			    setrid();
X  			    efaterror(newRCSfilename);
X*** rcsgen.c	Thu Feb 28 20:23:10 1991
X--- tmp/rcsgen.c	Thu Feb 28 20:16:26 1991
X***************
X*** 31,36 ****
X--- 31,39 ----
X  
X  
X  /* $Log: rcsgen.c,v $
X+  * Revision 5.6.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.6  1990/12/27  19:54:26  eggert
X   * Fix bug: rcs -t inserted \n, making RCS file grow.
X   *
X***************
X*** 110,116 ****
X  
X  #include "rcsbase.h"
X  
X! libId(genId, "$Id: rcsgen.c,v 5.6 1990/12/27 19:54:26 eggert Exp $")
X  
X  int interactiveflag;  /* Should we act as if stdin is a tty?  */
X  struct cbuf curlogmsg;  /* buffer for current log message */
X--- 113,119 ----
X  
X  #include "rcsbase.h"
X  
X! libId(genId, "$Id: rcsgen.c,v 5.6.1.1 1991/02/16 21:28:44 root Exp $")
X  
X  int interactiveflag;  /* Should we act as if stdin is a tty?  */
X  struct cbuf curlogmsg;  /* buffer for current log message */
X***************
X*** 334,340 ****
X                  /* get new description */
X  		if (finptr) {
X                          /*skip old description*/
X! 			foutptr = NULL;
X  			getdesc(false);
X                  }
X  		aprintf(frew,"\n\n%s\n%c",Kdesc,SDELIM);
X--- 337,343 ----
X                  /* get new description */
X  		if (finptr) {
X                          /*skip old description*/
X! 			foutptr = (FILE *) NULL;
X  			getdesc(false);
X                  }
X  		aprintf(frew,"\n\n%s\n%c",Kdesc,SDELIM);
X***************
X*** 341,347 ****
X                  if (textfile) {
X                          old1='\n';
X                          /* copy textfile */
X! 			txt = NULL;
X  			if (*textfile=='-' || (txt=fopen(textfile,"r"))) {
X  				while (txt ? (c=getc(txt))!=EOF : (c = *++textfile)) {
X  					if (c==SDELIM) afputc(c,frew); /*double up*/
X--- 344,350 ----
X                  if (textfile) {
X                          old1='\n';
X                          /* copy textfile */
X! 			txt = (FILE *) NULL;
X  			if (*textfile=='-' || (txt=fopen(textfile,"r"))) {
X  				while (txt ? (c=getc(txt))!=EOF : (c = *++textfile)) {
X  					if (c==SDELIM) afputc(c,frew); /*double up*/
X*** rcslex.c	Thu Feb 28 20:23:31 1991
X--- tmp/rcslex.c	Thu Feb 28 20:17:01 1991
X***************
X*** 39,44 ****
X--- 39,47 ----
X  
X  
X  /* $Log: rcslex.c,v $
X+  * Revision 5.5.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.5  1990/12/04  05:18:47  eggert
X   * Use -I for prompts and -q for diagnostics.
X   *
X***************
X*** 114,120 ****
X  
X  #include "rcsbase.h"
X  
X! libId(lexId, "$Id: rcslex.c,v 5.5 1990/12/04 05:18:47 eggert Exp $")
X  
X  static struct hshentry *nexthsh;  /*pointer to next hash entry, set by lookup*/
X  
X--- 117,123 ----
X  
X  #include "rcsbase.h"
X  
X! libId(lexId, "$Id: rcslex.c,v 5.5.1.1 1991/02/16 21:28:44 root Exp $")
X  
X  static struct hshentry *nexthsh;  /*pointer to next hash entry, set by lookup*/
X  
X***************
X*** 903,909 ****
X--- 906,916 ----
X  #if has_vfprintf
X  	if (vfprintf(stream, format, args) == EOF)
X  #else
X+ #	ifdef _MINIX
X+ 	_doprintf(stream, format, args);
X+ #	else
X  	_doprnt(format, args, stream);
X+ #	endif
X  	if (ferror(stream))
X  #endif
X  		IOerror();
X*** rlog.c	Thu Feb 28 20:24:35 1991
X--- tmp/rlog.c	Thu Feb 28 20:18:18 1991
X***************
X*** 36,41 ****
X--- 36,44 ----
X  
X  
X  /* $Log: rlog.c,v $
X+  * Revision 5.5.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.5  1990/11/01  05:03:55  eggert
X   * Permit arbitrary data in logs and comment leaders.
X   *
X***************
X*** 177,183 ****
X  static struct stateattri *statelist;
X  
X  
X! mainProg(rlogId, "rlog", "$Id: rlog.c,v 5.5 1990/11/01 05:03:55 eggert Exp $")
X  {
X  	static const char cmdusage[] =
X  		"\nrlog usage: rlog -{bhLRt} -ddates -l[lockers] -rrevs -sstates -w[logins] -Vn file ...";
X--- 180,186 ----
X  static struct stateattri *statelist;
X  
X  
X! mainProg(rlogId, "rlog", "$Id: rlog.c,v 5.5.1.1 1991/02/16 21:28:44 root Exp $")
X  {
X  	static const char cmdusage[] =
X  		"\nrlog usage: rlog -{bhLRt} -ddates -l[lockers] -rrevs -sstates -w[logins] -Vn file ...";
X***************
X*** 281,287 ****
X  
X          /* now handle all filenames */
X          do {
X! 	    finptr = NULL;
X  	    ffree();
X  
X  	    if (!pairfilenames(argc, argv, rcsreadopen, true, false))
X--- 284,290 ----
X  
X          /* now handle all filenames */
X          do {
X! 	    finptr = (FILE *) NULL;
X  	    ffree();
X  
X  	    if (!pairfilenames(argc, argv, rcsreadopen, true, false))
X***************
X*** 333,339 ****
X  		aprintf(stdout, symbolFormat, curassoc->symbol, curassoc->num);
X  	    aputs(commentFormat, stdout);
X  	    awrite(Comment.string, Comment.size, stdout);
X! 	    aputs("\"\n", stdout);
X  	    if (VERSION(5)<=RCSversion  ||  Expand != KEYVAL_EXPAND)
X  		aprintf(stdout, "keyword substitution: %s\n",
X  			expand_names[Expand]
X--- 336,346 ----
X  		aprintf(stdout, symbolFormat, curassoc->symbol, curassoc->num);
X  	    aputs(commentFormat, stdout);
X  	    awrite(Comment.string, Comment.size, stdout);
X! #ifdef _MINIX
X!  	    aprintf(stdout, "\"\n");  /* Due to bug in ACK, stdout is not defined if it occurs last*/
X! #else
X!  	    aputs(" \" \n " , stdout ); 
X! #endif
X  	    if (VERSION(5)<=RCSversion  ||  Expand != KEYVAL_EXPAND)
X  		aprintf(stdout, "keyword substitution: %s\n",
X  			expand_names[Expand]
X*** conf.sh	Thu Feb 28 20:21:13 1991
X--- tmp/conf.sh	Thu Feb 28 20:13:19 1991
X***************
X*** 1,6 ****
X  #!/bin/sh
X  # Output RCS compile-time configuration.
X! Id='$Id: conf.sh,v 5.6 1990/11/01 05:03:28 eggert Exp $'
X  #	Copyright 1990 by Paul Eggert
X  #	Distributed under license by the Free Software Foundation, Inc.
X  
X--- 1,6 ----
X  #!/bin/sh
X  # Output RCS compile-time configuration.
X! Id='$Id: conf.sh,v 5.6.1.1 1991/02/16 21:28:44 root Exp $'
X  #	Copyright 1990 by Paul Eggert
X  #	Distributed under license by the Free Software Foundation, Inc.
X  
X***************
X*** 28,34 ****
X  # Direct standard output to "a.h"; later parts of this procedure need it.
X  # Standard error can be ignored if a.h is OK,
X  # and can be inspected for clues otherwise.
X! exec >a.h || exit
X  
X  # The Makefile overrides the following defaults.
X  : ${C='cc -O'}
X--- 28,34 ----
X  # Direct standard output to "a.h"; later parts of this procedure need it.
X  # Standard error can be ignored if a.h is OK,
X  # and can be inspected for clues otherwise.
X! #exec >a.h || exit
X  
X  # The Makefile overrides the following defaults.
X  : ${C='cc -O'}
X*** rcsbase.h	Thu Feb 28 20:22:15 1991
X--- tmp/rcsbase.h	Thu Feb 28 20:15:08 1991
X***************
X*** 2,8 ****
X  /*
X   *                     RCS common definitions and data structures
X   */
X! #define RCSBASE "$Id: rcsbase.h,v 5.5 1990/12/04 05:18:43 eggert Exp $"
X  
X  /* Copyright (C) 1982, 1988, 1989 Walter Tichy
X     Copyright 1990 by Paul Eggert
X--- 2,8 ----
X  /*
X   *                     RCS common definitions and data structures
X   */
X! #define RCSBASE "$Id: rcsbase.h,v 5.5.1.1 1991/02/16 21:28:44 root Exp $"
X  
X  /* Copyright (C) 1982, 1988, 1989 Walter Tichy
X     Copyright 1990 by Paul Eggert
X***************
X*** 43,48 ****
X--- 43,51 ----
X  
X  
X  /* $Log: rcsbase.h,v $
X+  * Revision 5.5.1.1  1991/02/16  21:28:44  root
X+  * Port to MINIX
X+  *
X   * Revision 5.5  1990/12/04  05:18:43  eggert
X   * Use -I for prompts and -q for diagnostics.
X   *
X***************
X*** 143,148 ****
X--- 146,161 ----
X  /* standard include files */
X  
X  #include "conf.h"
X+ #ifdef _MINIX
X+ #	define Kbranch	Kbr
X+ #	define checksig	chksig
X+ #	define checksid chksid
X+ #	define getprevid	gpid
X+ #	define getprevdate	gpdate
X+ #	define getprevrev	gprev
X+ #	define updateaccess	updtaccess
X+ #	define updateassoc	updtasoc
X+ #endif
X  
X  #if !MAKEDEPEND
X  
X*** Makefile	Thu Feb 28 20:20:29 1991
X--- tmp/Makefile	Thu Feb 28 20:49:52 1991
X***************
X*** 1,4 ****
X! # $Id: Makefile,v 5.8 1990/12/13 06:54:06 eggert Exp $
X  # Copyright (C) 1982, 1988, 1989 Walter Tichy
X  #   Copyright 1990 by Paul Eggert
X  #   Distributed under license by the Free Software Foundation, Inc.
X--- 1,4 ----
X! # $Id: Makefile,v 5.8.1.1 1991/02/16 21:28:44 root Exp $
X  # Copyright (C) 1982, 1988, 1989 Walter Tichy
X  #   Copyright 1990 by Paul Eggert
X  #   Distributed under license by the Free Software Foundation, Inc.
X***************
X*** 80,86 ****
X  #DIFF3 = ${DIFF}3
X  #DIFF3_TYPE = bin
X  
X!  DIFF = /bin/diff
X   DIFF_FLAGS = -n
X   DIFF_L = 0
X   DIFF3 = /usr/lib/diff3
X--- 80,86 ----
X  #DIFF3 = ${DIFF}3
X  #DIFF3_TYPE = bin
X  
X!  DIFF = /usr/bin/diff
X   DIFF_FLAGS = -n
X   DIFF_L = 0
X   DIFF3 = /usr/lib/diff3
X***************
X*** 96,102 ****
X  #SENDMAIL = "/bin/mail"
X  #SENDMAIL = "/etc/delivermail", "-w"
X  #SENDMAIL = "/usr/lib/sendmail"
X!  SENDMAIL = "/bin/mail"
X  
X  
X  #	Decide what loader libraries you need.
X--- 96,102 ----
X  #SENDMAIL = "/bin/mail"
X  #SENDMAIL = "/etc/delivermail", "-w"
X  #SENDMAIL = "/usr/lib/sendmail"
X!  SENDMAIL = "/usr/bin/mail"
X  
X  
X  #	Decide what loader libraries you need.
X***************
X*** 105,116 ****
X  LDLIBS =
X  
X  
X  #	Decide what C compiler flags you need.
X  
X  # Optimize.  Put in options that work well for your compiler.
X  # Options to try with GCC include -fdelayed-branch, -finline-functions,
X  # -fomit-frame-pointer, and -fstrength-reduce.
X! CC_O = -O
X  
X  # Make all initialized data read-only (not just string literals).
X  # This option can improve performance by making initialized data shared.
X--- 105,123 ----
X  LDLIBS =
X  
X  
X+ #	Determine what kind of object files you have 
X+ #
X+ #O=s	Minix ACK compiler uses .s object files
X+ #O=o	All other compilers??
X+ 
X+  O=s
X  #	Decide what C compiler flags you need.
X  
X  # Optimize.  Put in options that work well for your compiler.
X  # Options to try with GCC include -fdelayed-branch, -finline-functions,
X  # -fomit-frame-pointer, and -fstrength-reduce.
X! #CC_O = -O
X! CC_O = -F -D_MINIX -D_POSIX_SOURCE
X  
X  # Make all initialized data read-only (not just string literals).
X  # This option can improve performance by making initialized data shared.
X***************
X*** 207,213 ****
X  	sh rcstest -v
X  
X  clean ::
X! 	rm -f a.* *.o conf.h conf.error ${RCSCOMMANDS}
X  
X  conf.h : conf.sh # Makefile
X  	C='${CC} ${CFLAGS}' \
X--- 214,220 ----
X  	sh rcstest -v
X  
X  clean ::
X! 	rm -f a.* *.${O} conf.h conf.error ${RCSCOMMANDS}
X  
X  conf.h : conf.sh # Makefile
X  	C='${CC} ${CFLAGS}' \
X***************
X*** 222,239 ****
X  	mv a.h $@
X  	rm -f a.*
X  
X! CIFILES = ci.o rcslex.o rcssyn.o rcsgen.o rcsedit.o rcskeys.o rcsmap.o \
X! 	rcsrev.o rcsutil.o rcsfnms.o partime.o maketime.o rcskeep.o rcsfcmp.o
X  ci : ${CIFILES}
X! 	${CC} ${CFLAGS} ${CIFILES} ${LDLIBS} -o $@
X  
X! COFILES = co.o rcslex.o rcssyn.o rcsgen.o rcsedit.o rcskeys.o rcsmap.o \
X! 	rcsrev.o rcsutil.o rcsfnms.o partime.o maketime.o
X  co : ${COFILES}
X! 	${CC} ${CFLAGS} ${COFILES} ${LDLIBS} -o $@
X  
X! ident : ident.o rcsmap.o
X! 	${CC} ${CFLAGS} ident.o rcsmap.o ${LDLIBS} -o $@
X  
X  merge : merge.sh
X  	DIFF=${DIFF} DIFF3=${DIFF3} DIFF3_TYPE=${DIFF3_TYPE} sh $@.sh >$@.o
X--- 229,246 ----
X  	mv a.h $@
X  	rm -f a.*
X  
X! CIFILES = ci.${O} rcslex.${O} rcssyn.${O} rcsgen.${O} rcsedit.${O} rcskeys.${O} rcsmap.${O} \
X! 	rcsrev.${O} rcsutil.${O} rcsfnms.${O} partime.${O} maketime.${O} rcskeep.${O} rcsfcmp.${O}
X  ci : ${CIFILES}
X! 	${CC} ${CFLAGS} ${CIFILES} ${LDLIBS} -i -o $@
X  
X! COFILES = co.${O} rcslex.${O} rcssyn.${O} rcsgen.${O} rcsedit.${O} rcskeys.${O} rcsmap.${O} \
X! 	rcsrev.${O} rcsutil.${O} rcsfnms.${O} partime.${O} maketime.${O}
X  co : ${COFILES}
X! 	${CC} ${CFLAGS} ${COFILES} ${LDLIBS} -i -o $@
X  
X! ident : ident.${O} rcsmap.${O}
X! 	${CC} ${CFLAGS} ident.${O} rcsmap.${O} ${LDLIBS} -i -o $@
X  
X  merge : merge.sh
X  	DIFF=${DIFF} DIFF3=${DIFF3} DIFF3_TYPE=${DIFF3_TYPE} sh $@.sh >$@.o
X***************
X*** 240,272 ****
X  	chmod +x $@.o
X  	mv $@.o $@
X  
X! RLOG = rlog.o rcslex.o rcsmap.o rcssyn.o rcsrev.o rcsutil.o partime.o \
X! 	maketime.o rcsfnms.o
X  rlog : ${RLOG}
X! 	${CC} ${CFLAGS} ${RLOG} ${LDLIBS} -o $@
X  
X! RCS = rcs.o rcslex.o rcssyn.o rcsrev.o rcsutil.o rcsgen.o rcsedit.o rcskeys.o \
X! 	rcsmap.o rcsfnms.o
X  rcs : ${RCS}
X! 	${CC} ${CFLAGS} ${RCS} ${LDLIBS} -o $@
X  
X! RCSDIFF = rcsdiff.o rcsutil.o rcsfnms.o rcsmap.o rcsrev.o rcssyn.o rcslex.o \
X! 	maketime.o partime.o
X  rcsdiff : ${RCSDIFF}
X! 	${CC} ${CFLAGS} ${RCSDIFF} ${LDLIBS} -o $@
X  
X! RCSMERGE = rcsmerge.o rcsutil.o rcsfnms.o rcsmap.o rcsrev.o rcssyn.o rcslex.o
X  rcsmerge : ${RCSMERGE}
X! 	${CC} ${CFLAGS} ${RCSMERGE} ${LDLIBS} -o $@
X  
X  SOURCE=	ci.c co.c ident.c maketime.c partime.c rcs.c \
X  	rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
X  	rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsmerge.c rcsrev.c rcssyn.c \
X  	rcsutil.c rlog.c
X! OBJECT=	ci.o co.o ident.o maketime.o partime.o rcs.o \
X! 	rcsdiff.o rcsedit.o rcsfcmp.o rcsfnms.o rcsgen.o \
X! 	rcskeep.o rcskeys.o rcslex.o rcsmap.o rcsmerge.o rcsrev.o rcssyn.o \
X! 	rcsutil.o rlog.o
X  
X  lint : conf.h
X  	${LINT} ${LINTFLAGS} -Dlint=1 ${SOURCE}
X--- 247,279 ----
X  	chmod +x $@.o
X  	mv $@.o $@
X  
X! RLOG = rlog.${O} rcslex.${O} rcsmap.${O} rcssyn.${O} rcsrev.${O} rcsutil.${O} partime.${O} \
X! 	maketime.${O} rcsfnms.${O}
X  rlog : ${RLOG}
X! 	${CC} ${CFLAGS} ${RLOG} ${LDLIBS} -i -o $@
X  
X! RCS = rcs.${O} rcslex.${O} rcssyn.${O} rcsrev.${O} rcsutil.${O} rcsgen.${O} rcsedit.${O} rcskeys.${O} \
X! 	rcsmap.${O} rcsfnms.${O}
X  rcs : ${RCS}
X! 	${CC} ${CFLAGS} ${RCS} ${LDLIBS} -i -o $@
X  
X! RCSDIFF = rcsdiff.${O} rcsutil.${O} rcsfnms.${O} rcsmap.${O} rcsrev.${O} rcssyn.${O} rcslex.${O} \
X! 	maketime.${O} partime.${O}
X  rcsdiff : ${RCSDIFF}
X! 	${CC} ${CFLAGS} ${RCSDIFF} ${LDLIBS} -i -o $@
X  
X! RCSMERGE = rcsmerge.${O} rcsutil.${O} rcsfnms.${O} rcsmap.${O} rcsrev.${O} rcssyn.${O} rcslex.${O}
X  rcsmerge : ${RCSMERGE}
X! 	${CC} ${CFLAGS} ${RCSMERGE} ${LDLIBS} -i -o $@
X  
X  SOURCE=	ci.c co.c ident.c maketime.c partime.c rcs.c \
X  	rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
X  	rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsmerge.c rcsrev.c rcssyn.c \
X  	rcsutil.c rlog.c
X! OBJECT=	ci.${O} co.${O} ident.${O} maketime.${O} partime.${O} rcs.${O} \
X! 	rcsdiff.${O} rcsedit.${O} rcsfcmp.${O} rcsfnms.${O} rcsgen.${O} \
X! 	rcskeep.${O} rcskeys.${O} rcslex.${O} rcsmap.${O} rcsmerge.${O} rcsrev.${O} rcssyn.${O} \
X! 	rcsutil.${O} rlog.${O}
X  
X  lint : conf.h
X  	${LINT} ${LINTFLAGS} -Dlint=1 ${SOURCE}
/