Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!unido!tub!coma!wolfgang From: wolfgang@coma.UUCP (Wolfgang Obst) Newsgroups: comp.sources.bugs Subject: SHAPE - Official Patch (PATCH#1) Message-ID: <418@coma.UUCP> Date: 10 Jul 89 10:42:20 GMT Reply-To: wolfgang@coma.UUCP (Wolfgang Obst) Organization: Technical University of Berlin, Germany (West) Lines: 867 Here are the first official patches for the shape-toolkit. Besides the fixing of several bugs, one enhancement of shape is included: a special macro `hosttype' is supported for people working with a network file system on different machines. If this macro is set to a certain value, e.g.: hosttype = vax_ultrix_2_0 this value is used to mark the derived objects rather than the hostname. So derived objects are `up to date' even if you change the host. Make sure that your hosts are *really* compatible!! If you are working with incompatible hosts (e.g. VAXEN and SUNS), you should use the VARIANT SECTION within the Shapefile to define different variants and define the value of `hosttype' dependent of the activated variant. The shell archive below contains 4 files sh_3.11.pat1 sh_3.11.pat2 sh_3.11.pat3 vc_3.31.pat1 Apply the patches sh_3.11.pat{1,2,3} within the subdirectory .../src/shape, the patches vc_3.31.pat1 within the subdirectory .../src/vc using the patch(1) command. Keep on shapin' -Wolfgang -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Wolfgang Obst TU Berlin FB-20 Sekr. FR 5-6 UUCP: {unido!}coma!wolfgang Franklinstr. 28/29 BITNET: wolfgang@db0tui62 D-1000 Berlin (West) 10 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -------------------------------- CUT HERE ---------------------------------- #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # sh_3.11.pat1 # sh_3.11.pat2 # sh_3.11.pat3 # vc_3.31.pat1 # This archive created: Mon Jul 10 11:38:04 1989 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'sh_3.11.pat1' then echo shar: "will not over-write existing file 'sh_3.11.pat1'" else cat << \SHAR_EOF > 'sh_3.11.pat1' *** /tmp/attr.c Mon Mar 6 13:08:27 1989 --- attr.c Fri Mar 3 15:36:14 1989 *************** *** 2467,2477 **** /* not yet complete ???? */ /* a{bc,d,e}f mactches abcf adf & aef not implemented */ int i,j; ! char result[128]; char tmp_result[64]; - static char rechars[] = "^.$?*[]{}"; - j = 0; for(i = 0; i < strlen(patt); i++) --- 2467,2475 ---- /* not yet complete ???? */ /* a{bc,d,e}f mactches abcf adf & aef not implemented */ int i,j; ! static char result[128]; char tmp_result[64]; j = 0; for(i = 0; i < strlen(patt); i++) *************** *** 2494,2504 **** } } tmp_result[j]='\0'; ! ! (void) sprintf(result,"%s%s%s",(!(index(rechars,tmp_result[0]))) ? "^" : "", ! tmp_result, (!(index(rechars,tmp_result[strlen(tmp_result) - 1]))) ? ! "$" : ""); ! return(result); } --- 2492,2498 ---- } } tmp_result[j]='\0'; ! (void) sprintf(result,"^%s$",tmp_result); return(result); } *** /tmp/macro.c Mon Mar 6 13:17:05 1989 --- macro.c Mon Mar 6 13:21:58 1989 *************** *** 137,143 **** line[len-1] = '\0'; return (line); } ! /*NOTREACHED*/ } --- 137,143 ---- line[len-1] = '\0'; return (line); } ! return(NIL); } *** /tmp/version.c[1.54] Thu Mar 9 20:50:08 1989 --- version.c Thu Mar 9 20:52:35 1989 *************** *** 24,27 **** * Tel: +49-30-314-22972 * E-mail: shape@coma.uucp or shape@db0tui62.bitnet */ ! char *version () { static char ConfID[] = "3.11 (Mon Feb 27 11:20:46 MET 1989 by wolfgang@coma )"; return ConfID; } --- 24,27 ---- * Tel: +49-30-314-22972 * E-mail: shape@coma.uucp or shape@db0tui62.bitnet */ ! char *version () { static char ConfID[] = "3.11 Patchlevel_1\n\tThu Mar 9 20:51:10 MET 1989 by wolfgang@coma "; return ConfID; } SHAR_EOF fi if test -f 'sh_3.11.pat2' then echo shar: "will not over-write existing file 'sh_3.11.pat2'" else cat << \SHAR_EOF > 'sh_3.11.pat2' *** misc.c Tue Jun 13 11:08:10 1989 --- /tmp/misc.c Tue Jun 13 11:16:32 1989 *************** *** 25,117 **** * E-mail: shape@coma.uucp or shape@db0tui62.bitnet */ #ifndef lint ! static char *RCSid = "$Header: misc.c,v 3.5 89/02/21 17:11:54 wolfgang Exp $"; #endif - #ifndef lint - static char *ConfFlg = CFFLGS; /* should be defined from within Makefile */ - #endif /* ! * $Log: misc.c,v $ ! * Revision 3.5 89/02/21 17:11:54 wolfgang ! * append_mtime changed ! * ! * Revision 3.4 89/02/20 16:26:08 wolfgang ! * NET-RELEASE ! * ! * Revision 3.3 89/02/08 16:19:55 wolfgang ! * one comment added for lint. ! * .. ! * ! * Revision 3.2 89/02/08 12:46:32 wolfgang ! * performance improved. ! * ! * Revision 3.1 89/02/06 14:26:41 wolfgang ! * bug fixed. ! * ! * Revision 3.0 89/01/24 11:36:12 wolfgang ! * New System Generation ! * ! * Revision 2.19 89/01/23 16:14:42 wolfgang ! * inheritance of uda's is now suppressed ! * ! * Revision 2.18 89/01/03 13:12:23 wolfgang ! * changes done for lint ! * ! * Revision 2.17 88/12/22 12:36:39 wolfgang ! * dummy procedure free_linklist()m added. ! * ! * Revision 2.16 88/12/21 15:11:10 wolfgang ! * changes done for lint ! * ! * Revision 2.15 88/12/19 13:21:27 wolfgang ! * is_in_forcelist added(). ! * ! * Revision 2.14 88/11/23 12:35:48 wolfgang ! * Another dorpkey added. ! * ! * Revision 2.13 88/11/21 20:55:10 wolfgang ! * changes done for sun ! * ! * Revision 2.12 88/11/09 16:25:59 wolfgang ! * bugs fixed ! * ! * Revision 2.11 88/11/08 11:05:02 wolfgang ! * This version is part of a release ! * ! * Revision 2.10 88/11/03 17:29:46 wolfgang ! * calls of af_dropset added in compare_attrstring(). ! * ! * Revision 2.9 88/10/10 16:54:43 wolfgang ! * changed for the -t option. if (touchflg) nothing is restored. ! * ! * Revision 2.8 88/09/23 15:54:20 wolfgang ! * bug fixed in get_attr_type (retrn values). ! * ! * Revision 2.7 88/09/22 16:15:06 wolfgang ! * clleanup_links() changed (now recursive). ! * ! * Revision 2.6 88/09/07 11:23:30 wolfgang ! * unlinking of tmp file added to cleanup_links(). ! * ! * Revision 2.5 88/08/25 16:09:07 wolfgang ! * Message: ... restored from bpool changed; [busy] is supreesed and if ! * type = "" the "." is supressed. ! * ! * Revision 2.4 88/08/22 15:30:43 wolfgang ! * Two types added: syspath & host; are necessary for confid. ! * ! * Revision 2.3 88/08/22 11:24:06 wolfgang ! * Attribute string changed: added "." between name & type. ! * ! * Revision 2.2 88/08/19 10:05:59 wolfgang ! * bug fixed; if attrs were too long for bpool file, the identification ! * of the busy version had not been correct. ! * Furthermore the format of the string "... version restored ..." has ! * been changed, so that -2 .-2 for busy Version is supressed. ! * ! * Revision 2.1 88/08/18 13:19:41 wolfgang ! * minor bug fixes; mtime added to identification string of derived objects ! * */ #include --- 25,34 ---- * E-mail: shape@coma.uucp or shape@db0tui62.bitnet */ #ifndef lint ! static char *AFSid = "$__Header$"; #endif /* ! * $__Log$ */ #include *************** *** 471,479 **** Af_attrs *buf; int recdepth; { ! char attributes[MAX_ATTR]; ! (void) sprintf(attributes,"%s%s%s%s%s%d%d%d%d", buf->af_name, ".", buf->af_type, --- 388,406 ---- Af_attrs *buf; int recdepth; { ! char attributes[MAXATTRLENGTH]; ! static char pnt[MAXNAMLEN]; ! char x[MAXNAMLEN]; ! int len = 0; ! (void) sprintf(x,"%s%s%s%s",buf->af_syspath,buf->af_name,".",buf->af_type); ! if (!strcmp(x,pnt)) ! return; ! else ! (void) (strcpy(pnt,x)); ! if (!strcmp(expandmacro("$(hosttype)",""))) ! { ! (void) sprintf(attributes,"%s%s%s%s%s%d%d%d%d", buf->af_name, ".", buf->af_type, *************** *** 496,514 **** buf->af_stime, buf->af_ltime */ ); /* i = 0; while(buf->af_udattrs[i] != NIL) { ! if ((strlen(attributes) + strlen(buf->af_udattrs[i])) >= MAX_ATTR) errexit(29,NIL); (void) strcat(attributes,buf->af_udattrs[i]); i++; } */ ! if ((strlen(attributes) + strlen(longattrs[recdepth])) >= MAX_ATTR) ! errexit(29,NIL); ! (void) strcat(longattrs[recdepth],attributes); #ifdef DEBUG_MISC --- 423,470 ---- buf->af_stime, buf->af_ltime */ ); + } + else + { + (void) sprintf(attributes,"%s%s%s%s%s%d%d%d%d", + buf->af_name, + ".", + buf->af_type, + expandmacro("$(hosttype)"), + buf->af_syspath, + buf->af_gen, + buf->af_rev, + buf->af_state, + buf->af_mtime /* , + buf->af_owner.af_username, + buf->af_owner.af_userhost, + buf->af_author.af_username, + buf->af_author.af_userhost, + buf->af_locker.af_username, + buf->af_locker.af_userhost, + buf->af_size, + buf->af_mode, + buf->af_atime, + buf->af_ctime, + buf->af_stime, + buf->af_ltime */ + ); + } + /* i = 0; while(buf->af_udattrs[i] != NIL) { ! if ((strlen(attributes) + strlen(buf->af_udattrs[i])) >= MAXATTRLENGTH) errexit(29,NIL); (void) strcat(attributes,buf->af_udattrs[i]); i++; } */ ! len = strlen(longattrs[recdepth]); ! if ((longattrs[recdepth] = realloc(longattrs[recdepth], ! (unsigned) ( len + strlen(attributes) + sizeof(char)))) == NIL) ! errexit(10,"realloc"); (void) strcat(longattrs[recdepth],attributes); #ifdef DEBUG_MISC *************** *** 524,530 **** { char time[64]; /* (void) sprintf(time,"%d",testbuf->af_mtime); ! (void) strcat(longattrs[recdepth],time); */ } --- 480,486 ---- { char time[64]; /* (void) sprintf(time,"%d",testbuf->af_mtime); ! */ } *** version.c Tue Jun 13 11:35:08 1989 --- /tmp/version.c Tue Jun 13 11:35:17 1989 *************** *** 24,27 **** * Tel: +49-30-314-22972 * E-mail: shape@coma.uucp or shape@db0tui62.bitnet */ ! char *version () { static char ConfID[] = "3.11 Patchlevel_1\n\tThu Mar 9 20:51:10 MET 1989 by wolfgang@coma "; return ConfID; } --- 24,27 ---- * Tel: +49-30-314-22972 * E-mail: shape@coma.uucp or shape@db0tui62.bitnet */ ! char *version () { static char ConfID[] = "3.11 Patchlevel_2\n\tTue Jun 13 11:34:10 MET DST 1989 by wolfgang@coma "; return ConfID; } *** /u/shape/shapetools/src/shape/produce.c Mon Feb 27 17:16:59 1989 --- produce.c Wed Jun 28 14:55:57 1989 *************** *** 305,312 **** (void) strcat(comm," "); j = j + strlen(curdep) + 1; } - k++; curdep = cur->deplist[k]; } } i = i + 2; --- 305,312 ---- (void) strcat(comm," "); j = j + strlen(curdep) + 1; } curdep = cur->deplist[k]; + k++; } } i = i + 2; SHAR_EOF fi if test -f 'sh_3.11.pat3' then echo shar: "will not over-write existing file 'sh_3.11.pat3'" else cat << \SHAR_EOF > 'sh_3.11.pat3' *** /u/shape/shapetools/src/shape/shape.l Mon Feb 27 18:59:29 1989 --- shape.l Fri Jun 30 11:00:21 1989 *************** *** 136,142 **** Macroname [0-9a-zA-Z_-] Vcl "::=".* Vclass "vclass"{Layout}*{Ruledef}{Nocomment} ! Macrodef {Macroname}+{Layout}*"="{Layout}*{Nocomment} Rulesecstart "#%"{Layout}*"RULE-SECTION"{Layout}* Rulesecend "#%"{Layout}*"END-RULE-SECTION"{Layout}* Selectionrule {Rulesecstart}+{Any2}*{Rulesecend}+ --- 136,142 ---- Macroname [0-9a-zA-Z_-] Vcl "::=".* Vclass "vclass"{Layout}*{Ruledef}{Nocomment} ! Macrodef {Layout}*{Macroname}+{Layout}*"="{Layout}*{Nocomment} Rulesecstart "#%"{Layout}*"RULE-SECTION"{Layout}* Rulesecend "#%"{Layout}*"END-RULE-SECTION"{Layout}* Selectionrule {Rulesecstart}+{Any2}*{Rulesecend}+ *** /u/shape/shapetools/src/shape/produce.c Mon Feb 27 17:16:59 1989 --- produce.c Fri Jun 30 11:19:59 1989 *************** *** 1126,1131 **** --- 1126,1133 ---- if (noexflg) { + if(cmd[0] == '@') + cmd++; printf("%s\n", cmd); (void) fflush(stdout); reallydone = TRUE; *** /u/shape/shapetools/src/shape/version.c Fri Jun 30 11:58:20 1989 --- version.c Fri Jun 30 12:00:05 1989 *************** *** 24,27 **** * Tel: +49-30-314-22972 * E-mail: shape@coma.uucp or shape@db0tui62.bitnet */ ! char *version () { static char ConfID[] = "3.11 Patchlevel_2\n\tTue Jun 13 11:34:10 MET DST 1989 by wolfgang@coma "; return ConfID; } --- 24,27 ---- * Tel: +49-30-314-22972 * E-mail: shape@coma.uucp or shape@db0tui62.bitnet */ ! char *version () { static char ConfID[] = "3.11 Patchlevel_3\n\tThu Mar 9 20:51:10 MET 1989 by wolfgang@coma "; return ConfID; } SHAR_EOF fi if test -f 'vc_3.31.pat1' then echo shar: "will not over-write existing file 'vc_3.31.pat1'" else cat << \SHAR_EOF > 'vc_3.31.pat1' *** mkattr.c Thu Mar 9 22:26:51 1989 --- /tmp/mkattr.c[3.8] Thu Mar 9 22:41:29 1989 *************** *** 1,5 **** #ifndef lint ! static char *AFSid = "$Header: mkattr.c[3.6] Thu Feb 23 18:13:34 1989 axel@coma published $"; #ifdef CFFLGS static char *ConfFlg = CFFLGS; /* should be defined from within Makefile */ --- 1,5 ---- #ifndef lint ! static char *AFSid = "$Header: mkattr.c[3.8] Thu Mar 9 22:41:28 1989 axel@coma published $"; #ifdef CFFLGS static char *ConfFlg = CFFLGS; /* should be defined from within Makefile */ *************** *** 6,18 **** #endif #endif /* ! * Log for /u/shape/dist-tape/src/vc/mkattr.c[3.2] ! * Thu Feb 23 18:13:34 1989 axel@coma published $ * --- empty log message --- ! * mkattr.c[3.5] Thu Feb 23 18:13:34 1989 axel@coma published $ * --- empty log message --- ! * mkattr.c[3.6] Thu Feb 23 18:13:34 1989 axel@coma published $ * --- empty log message --- */ /*LINTLIBRARY*/ --- 6,24 ---- #endif #endif /* ! * Log for /u/axel/shape/apps/PATCH/mkattr.c[3.2] ! * Thu Mar 9 22:41:28 1989 axel@coma published $ * --- empty log message --- ! * mkattr.c[3.5] Thu Mar 9 22:41:28 1989 axel@coma published $ * --- empty log message --- ! * mkattr.c[3.6] Thu Mar 9 22:41:28 1989 axel@coma published $ * --- empty log message --- + * mkattr.c[3.7] Thu Mar 9 22:41:28 1989 axel@coma save $ + * --- empty log message --- + * mkattr.c[3.8] Thu Mar 9 22:41:28 1989 axel@coma published $ + * Corrected the regexp(3) pattern for distinguishing genuine version-numbers + * from symbolic names that contain numbers (e.g. rel1.0a). + * */ /*LINTLIBRARY*/ *************** *** 40,46 **** char *emsg, *re_comp(); int genno, revno, rc; ! if (emsg = re_comp("[0-9][0-9]*\\.[0-9][0-9]*")) { /* quite liberal RE */ logerr (emsg); return 0; } --- 46,52 ---- char *emsg, *re_comp(); int genno, revno, rc; ! if (emsg = re_comp("^[0-9][0-9]*\\.[0-9][0-9]*$")) { /* quite liberal RE */ logerr (emsg); return 0; } *** dosave.c Fri Mar 10 20:03:02 1989 --- /tmp/dosave.c[3.22] Fri Mar 10 20:04:16 1989 *************** *** 1,5 **** #ifndef lint ! static char *AFSid = "$Header: dosave.c[3.21] Thu Feb 23 18:13:30 1989 axel@coma published $"; #ifdef CFFLGS static char *ConfFlg = CFFLGS; /* should be defined from within Makefile */ --- 1,5 ---- #ifndef lint ! static char *AFSid = "$Header: dosave.c[3.22] Fri Mar 10 20:04:16 1989 axel@coma published $"; #ifdef CFFLGS static char *ConfFlg = CFFLGS; /* should be defined from within Makefile */ *************** *** 6,30 **** #endif #endif /* ! * Log for /u/shape/dist-tape/src/vc/dosave.c[3.8] ! * Thu Feb 23 18:13:30 1989 axel@coma save $ * Intention for change: * This is still a test. A minute ago, I was able to set an intention * but now I doubt, that I'll be allowed to set a user defined attribute * to the bus ! * dosave.c[3.9] Thu Feb 23 18:13:30 1989 axel@coma save $ * Intention for change: * This is still a test. A minute ago, I was able to set an intention * but now I doubt, that I'll be allowed to set a user defined attribute * to the bus ! * dosave.c[3.15] Thu Feb 23 18:13:30 1989 axel@coma published $ * --- empty log message --- ! * dosave.c[3.19] Thu Feb 23 18:13:30 1989 axel@coma published $ * --- empty log message --- ! * dosave.c[3.20] Thu Feb 23 18:13:30 1989 axel@coma save $ * --- empty log message --- ! * dosave.c[3.21] Thu Feb 23 18:13:30 1989 axel@coma published $ ! * --- empty log message --- */ #include --- 6,42 ---- #endif #endif /* ! * Log for /u/axel/shape/apps/PATCH/dosave.c[3.8] ! * Fri Mar 10 20:04:16 1989 axel@coma save $ * Intention for change: * This is still a test. A minute ago, I was able to set an intention * but now I doubt, that I'll be allowed to set a user defined attribute * to the bus ! * dosave.c[3.9] Fri Mar 10 20:04:16 1989 axel@coma save $ * Intention for change: * This is still a test. A minute ago, I was able to set an intention * but now I doubt, that I'll be allowed to set a user defined attribute * to the bus ! * dosave.c[3.15] Fri Mar 10 20:04:16 1989 axel@coma published $ * --- empty log message --- ! * dosave.c[3.19] Fri Mar 10 20:04:16 1989 axel@coma published $ * --- empty log message --- ! * dosave.c[3.21] Fri Mar 10 20:04:16 1989 axel@coma published $ * --- empty log message --- ! * dosave.c[3.22] Fri Mar 10 20:04:16 1989 axel@coma published $ ! * dosave.c[3.23] Fri Mar 10 16:21:55 1989 axel@coma save $ ! * dosave.c[3.22]: ! * In case of 'sbmt' with the -setvnum option, there was a problem when ! * a version was unchanged, and the last saved version had status "published". ! * sbmt complained about "version number too small". It is a feature of ! * AFS, that version numbers of objects with a status > proposed are ! * inalterable. "dosave" now sets the version number *before* the status ! * is set to published. ! * ! * Fixed a similar bug as in the previous version. It hit when submitting ! * a version with setvnum and no other saved versions exist. I also improved ! * SaveAVersion's strange and inconsistent diagnostic behaviour. ! * */ #include *************** *** 75,81 **** char spath[MAXNAMLEN], origpath[MAXNAMLEN], name[MAXNAMLEN], *afname, *aftype, *afvariant = NULL, str[80], messg[80], *note, *getnote(), *gettxt(), *vnum(), *getattr(), *as; ! int truth = TRUE; Af_attrs reqattrs, busyattrs, sattrs; Af_key busy, lastsave, skey, *newkey, ngkey, tmpkey; Af_set junkset; --- 87,93 ---- char spath[MAXNAMLEN], origpath[MAXNAMLEN], name[MAXNAMLEN], *afname, *aftype, *afvariant = NULL, str[80], messg[80], *note, *getnote(), *gettxt(), *vnum(), *getattr(), *as; ! int truth = TRUE, chflag = TRUE; Af_attrs reqattrs, busyattrs, sattrs; Af_key busy, lastsave, skey, *newkey, ngkey, tmpkey; Af_set junkset; *************** *** 154,165 **** } newkey = &skey; ThisTransaction.tr_done = TRUE; - if (options & SUBMIT) { - af_sstate (newkey, AF_PROPOSED); - af_sstate (newkey, AF_PUBLISHED); - } - (void)sprintf (messg, "saved version %s", vnum (newkey)); - logmsg (messg); } /* This was handling of newly created archive */ else { #ifdef PROJIMPL --- 166,171 ---- *************** *** 172,178 **** af_dropkey (&busy); abort_this (FALSE); } ! if (changed (&busy, &lastsave, &truth)) { /* Version alias problem: copy or ref */ if (options & TXTFSET) { note = gettxt (tfname); --- 178,184 ---- af_dropkey (&busy); abort_this (FALSE); } ! if (chflag = changed (&busy, &lastsave, &truth)) { /* Version alias problem: copy or ref */ if (options & TXTFSET) { note = gettxt (tfname); *************** *** 197,239 **** newkey = &skey; ThisTransaction.tr_done = TRUE; af_sudattr (newkey, AF_REMOVE, INTENT); - if (options & NEWGEN) { - if (myproject(proj)) { - af_newgen (newkey, &ngkey); - (void)sprintf (messg, - "saved version %s (aliassed by ", - vnum (newkey)); - (void)sprintf (messg, "%s%s due to new generation)", messg, vnum(&ngkey)); - logmsg (messg); - af_dropkey (newkey); - newkey = &ngkey; - if (options & SUBMIT) - setpublished (newkey); - } - else { - logmsg ("You must be project-admin to increase generation number."); - } - } - else { - (void)sprintf (messg, "saved version %s", vnum (newkey)); - logmsg (messg); - if (options & SUBMIT) - setpublished (newkey); - } } ! else { if (options & SUBMIT) { char *intent = (char *)0; ! intent = af_rudattr (&busy, INTENT); ! note = getnote ("Do you want to comment your modifications ?", truth, FALSE, intent); if (intent) free (intent); - af_sudattr (&busy, AF_REMOVE, INTENT); - setpublished (&lastsave); - (void)sprintf - (messg, "%s set to state \"published\" (no changes to be saved)", - fname); - logmsg (messg); newkey = &lastsave; } else { --- 203,215 ---- newkey = &skey; ThisTransaction.tr_done = TRUE; af_sudattr (newkey, AF_REMOVE, INTENT); } ! else { /* version is unchanged */ if (options & SUBMIT) { char *intent = (char *)0; ! note = getnote ("Do you want to state a comment ?", truth, FALSE, intent); if (intent) free (intent); newkey = &lastsave; } else { *************** *** 253,258 **** --- 229,244 ---- as = str; af_sudattr (newkey, AF_ADD, as); } + if (options & NEWGEN) { + if (myproject(proj)) { + af_newgen (newkey, &ngkey); + af_dropkey (newkey); + newkey = &ngkey; + } + else { + logmsg ("You must be project-admin to increase generation number."); + } + } if (options & SETVNUM) { if (!(mkvno(vnum(newkey)) == newvnum)) { /* do nothing */ if (af_svnum (newkey, gen(newvnum), rev(newvnum)) < 0) { *************** *** 262,267 **** --- 248,257 ---- } } } + if (options & SUBMIT) setpublished (newkey); + (void)sprintf (messg, "%s version %s%s.", (options & SUBMIT) ? "published" : + "saved", vnum (newkey), truth ? "" : " (no changes)"); + logmsg (messg); if (options & ATTRDEF) { as = getattr (atr_fname, proj, aftype, REWIND); af_sudattr (newkey, AF_ADD, as); *** version.c Thu Mar 9 22:38:31 1989 --- /tmp/version.c[3.32] Thu Mar 9 22:42:20 1989 *************** *** 2,7 **** * Prototype version procedure */ char *version () { ! static char ConfID[] = "3.31 (Wed Feb 22 16:31:32 1989 by axel@coma)"; return ConfID; } --- 2,7 ---- * Prototype version procedure */ char *version () { ! static char ConfID[] = "3.31 Patchlevel_1\n\tThu Mar 9 22:34:20 MET 1989 by axel@coma)"; return ConfID; } *** Makefile Tue Mar 14 18:14:31 1989 --- /tmp/Makefile[1.3] Tue Mar 14 18:21:00 1989 *************** *** 1,18 **** # ! # $Header: Makefile[1.2] Thu Feb 23 18:13:23 1989 axel@coma published $ # ! # Log for /u/shape/dist-tape/src/vc/Makefile[1.0] ! # Thu Feb 23 18:13:23 1989 axel@coma save $ # This Makefile is solely intended for the bootstrap installation # of the SHAPE version-control system. It should be invoked by a # master Make 'install' process defining the macros BASE, SYSTEM, and # possibly CONFIG from the commandline. # ! # Makefile[1.1] Thu Feb 23 18:13:23 1989 axel@coma published $ # added target 'depend:'. Works very nice. # ! # Makefile[1.2] Thu Feb 23 18:13:23 1989 axel@coma published $ # --- empty log message --- # # # Makefile for Version Control System --- 1,22 ---- # ! # $Header: Makefile[1.3] Tue Mar 14 18:21:00 1989 axel@coma save $ # ! # Log for /u/axel/shape/apps/PATCH/Makefile[1.0] ! # Tue Mar 14 18:21:00 1989 axel@coma save $ # This Makefile is solely intended for the bootstrap installation # of the SHAPE version-control system. It should be invoked by a # master Make 'install' process defining the macros BASE, SYSTEM, and # possibly CONFIG from the commandline. # ! # Makefile[1.1] Tue Mar 14 18:21:00 1989 axel@coma published $ # added target 'depend:'. Works very nice. # ! # Makefile[1.2] Tue Mar 14 18:21:00 1989 axel@coma published $ # --- empty log message --- + # Makefile[1.3] Tue Mar 14 18:21:00 1989 axel@coma save $ + # Fixed the rule for the installation. It installed in the wrong place + # and made the wrong (if any) links. + # # # # Makefile for Version Control System *************** *** 45,54 **** INSTALOWNER = shape INSTALGROUP = unib - BUCKS = $$ - - CC = cc -DCFFLGS='"$(BUCKS)Flags: <$<> $(CFLAGS) $$"' - CFLAGS = -g -D$(SYSTEM) $(CONFIG) -I$(INCLUDEDIR) LDFLAGS = -g --- 49,54 ---- *************** *** 151,157 **** install: all @echo -n installing version control system in $(INSTALDIR)...; \ ! (cd $(BASE)/bin; rm -f save retrv vadm vl sbmt vcat vlog) ; \ echo -n .; \ install -c -m 755 save $(INSTALDIR); \ echo -n .; \ --- 151,157 ---- install: all @echo -n installing version control system in $(INSTALDIR)...; \ ! (cd $(INSTALDIR); rm -f save retrv vadm vl sbmt vcat vlog) ; \ echo -n .; \ install -c -m 755 save $(INSTALDIR); \ echo -n .; \ *************** *** 161,171 **** echo -n .; \ install -c -m 755 vl $(INSTALDIR); \ echo -n .; \ ln save sbmt; \ echo -n .; \ ln retrv vcat; \ echo -n .; \ ! ln vl vlog; \ echo done depend: --- 161,172 ---- echo -n .; \ install -c -m 755 vl $(INSTALDIR); \ echo -n .; \ + (cd $(INSTALDIR); \ ln save sbmt; \ echo -n .; \ ln retrv vcat; \ echo -n .; \ ! ln vl vlog); \ echo done depend: SHAR_EOF fi exit 0 # End of shell archive