KARSTEN@TFL.DK (Karsten Nyblad, TFL, Denmark) (01/02/90)
Hi, As promised I have corrected the problem i PATCH, that SYS!SCRATCH had to denote a directory on the same disk as the output files of PATCH. This posting contains a short how-to-update-to-V5.9C too. The VMS_SHARE file attached to this posting contains two files: PATCH.DIFF, which is a resubmission of an old patch, that I have already submited to the mailing list, and PATCH2.DIFF which corrects the problem with SYS!SCRATCH. YOU CAN'T UPDATE TO VERSION 5.9C USING DIFF/PATCH WITHOUT HAVING PATCHED PATCH WITH THE FIRST PATCH. The .DIFF files Geoff has created contain VMS directory specifications. VAX C can convert some UNIX style directory specifications to VMS style specifications, but it can't convert mixed style. Without the first patch, PATCH will create files specifications like ./#.NEWS_SRC$ADD_TRANSFORM.C. Here is how to patch PATCH: 1) Let your default directory be the directory of the sources of PATCH. 2) Let SYS!SCRATCH be a directory on the same disk as the default directory. 3) If you have not already applied the first patch, then patch "-R" <patch.diff 4) patch "-R" <patch2.diff 5) @BUILD_PATCH The patches and this update procedures are made so that they bypass the bugs they correct. Here is how to update to V5.9C: 1) Place the sources of version 5.9 (not 5.9A or 5.9B) in #.NEWS_SRC$. 2) Rename #.NEWS_SRC$NEWSMAIL.C to #.NEWS_SRC$NEWSVMSMAIL.C. 3) If you update from V5.9 delete #.NEWS_BUILD$NEWS_LIBRARY.OLB and #.NEWS_BUILD$NEWS_LIBRARYD.OLD. This step is optional if you update from V5.9A or V5.9B. 4) Copy the .DIFF files Geoff has submitted to the mailing list into one file: COPY *.DIFF HELP.DIFF If you have changed NEWS, you might want to apply the patches to one file at a time. In that case apply the patches one by one repeating step 6 for each .DIFF file. 5) Let your default directory be the directory containing NEWS_SRC.DIR and NEWS_BUILD.DIR. 6) PATCH <HELP.DIFF This command generates lots of output. You might want to do it in batch. 7) SET DEF #.NEWS_SRC$ 8) @NEWS_BUILD This command generates lots of output. You might want to do it in batch. I hope I have remembered all steps needed. I have recieved requests for the entire PATCH from Rolf Sonneveld, Charles Smith and Xev Gittler. I will mail it as soon as possible. We have had problems recieving E-mail since 21-DEC, so there might be more request staled by a mailer on the way to me. I think the problem has been corrected by now, but please mail me if any of you have not recieved it by 7-JAN-1990. Karsten Nyblad TFL, A Danish Telecommmunication Research Laboratory E-mail: karsten@tfl.dk !| ................... Cut between dotted lines and save. ................... !|........................................................................... !| VAX/VMS archive file created by VMS_SHARE V06.10 7-FEB-1989. !| !| VMS_SHARE was written by James Gray (Gray:OSBUSouth@Xerox.COM) from !| VMS_SHAR by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au). !| !| To unpack, simply save, concatinate all parts into one file and !| execute (@) that file. !| !| This archive was created by user KARSTEN !| on 30-DEC-1989 14:36:02.57. !| !| It contains the following 2 files: !| PATCH.DIFF !| PATCH2.DIFF !| !|============================================================================ ! SET SYMBOL/SCOPE=( NOLOCAL, NOGLOBAL ) ! VERSION = F!GETSYI( "VERSION" ) ! IF VERSION .GES "V4.4" THEN GOTO VERSION_OK ! WRITE SYS!OUTPUT "You are running VMS ''VERSION'; ", - "VMS_SHARE V06.10 7-FEB-1989 requires VMS V4.4 or higher." ! EXIT 44 | SS!_ABORT !VERSION_OK: ! GOTO START !| !UNPACK_FILE: ! WRITE SYS!OUTPUT "Creating ''FILE_IS'" ! DEFINE/USER_MODE SYS!OUTPUT NL: ! EDIT/TPU/COMMAND=SYS!INPUT/NODISPLAY/OUTPUT='FILE_IS'/NOSECTION - VMS_SHARE_DUMMY.DUMMY b_part := CREATE_BUFFER( "{Part}", GET_INFO( COMMAND_LINE, "file_name" ) ) ; s_file_spec := GET_INFO( COMMAND_LINE, "output_file" ); SET( OUTPUT_FILE , b_part, s_file_spec ); b_errors := CREATE_BUFFER( "{Errors}" ); i_errors := 0; pat_beg_1 := ANCHOR & "-+-+-+ Beginning"; pat_beg_2 := LINE_BEGIN & "+-+-+-+ Beginning"; pat_end := ANCHOR & "+-+-+-+-+ End"; POSITION ( BEGINNING_OF( b_part ) ); LOOP EXITIF SEARCH( SPAN( ' ' )@r_trail & LINE_END, FORWARD) = 0; POSITION( r_trail ); ERASE( r_trail ); ENDLOOP ; POSITION( BEGINNING_OF( b_part ) ); i_append_line := 0; LOOP EXITIF MARK ( NONE ) = END_OF( b_part ); s_x := ERASE_CHARACTER( 1 ) ; IF s_x = '+' THEN r_skip := SEARCH( pat_beg_1, FORWARD, EXACT ); IF r_skip <> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ERASE_LINE; ENDIF ; ENDIF; IF s_x = '-' THEN r_skip := SEARCH( pat_end, FORWARD, EXACT ) ; IF r_skip <> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); m_skip := MARK( NONE ); r_skip := SEARCH( pat_beg_2, FORWARD, EXACT ); IF r_skip <> 0 THEN POSITION( END_OF( r_skip ) ); MOVE_HORIZONTAL( -CURRENT_OFFSET ) ; MOVE_VERTICAL( 1 ); MOVE_HORIZONTAL( -1 ); ELSE POSITION( END_OF( b_part ) ); ENDIF; ERASE( CREATE_RANGE( m_skip, MARK( NONE ), NONE ) ); ENDIF; ENDIF ; IF s_x = 'V' THEN s_x := ''; IF i_append_line <> 0 THEN APPEND_LINE ; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF; i_append_line := 1 ; MOVE_VERTICAL( 1 ); ENDIF; IF s_x = 'X' THEN s_x := ''; IF i_append_line <> 0 THEN APPEND_LINE; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF ; i_append_line := 0; MOVE_VERTICAL( 1 ); ENDIF; IF s_x <> '' THEN i_errors := i_errors + 1; s_text := CURRENT_LINE; POSITION( b_errors ); COPY_TEXT ( "The following line could not be unpacked properly:" ); SPLIT_LINE ; COPY_TEXT( s_x ); COPY_TEXT( s_text ); POSITION( b_part ); MOVE_VERTICAL ( 1 ); ENDIF; ENDLOOP; POSITION( BEGINNING_OF( b_part ) ); LOOP r_x := SEARCH ( "`", FORWARD, EXACT ); EXITIF r_x = 0; POSITION( r_x ); ERASE_CHARACTER( 1 ); COPY_TEXT( ASCII( INT( ERASE_CHARACTER( 3 ) ) ) ); ENDLOOP ; IF i_errors = 0 THEN SET( NO_WRITE, b_errors, ON ); ELSE POSITION ( BEGINNING_OF( b_errors ) ); COPY_TEXT( FAO ( "The following |UL errors were detected while unpacking |AS", i_errors , s_file_spec ) ); SPLIT_LINE; SET( OUTPUT_FILE, b_errors, "SYS!COMMAND" ) ; ENDIF; EXIT; ! DELETE VMS_SHARE_DUMMY.DUMMY;* ! CHECKSUM 'FILE_IS ! WRITE SYS!OUTPUT " CHECKSUM ", - F!ELEMENT( CHECKSUM_IS .EQ. CHECKSUM!CHECKSUM, ",", "failed||,passed." ) ! RETURN !| !START: ! FILE_IS = "PATCH.DIFF" ! CHECKSUM_IS = 494013192 ! COPY SYS!INPUT VMS_SHARE_DUMMY.DUMMY X*** util.c X--- util.c;-1 X************** X*** 33,40 X `032 X `035ifdef VMS V /* This is not robust -- we just rename the file, hoping for the best. X */ V| if (*to == '/' `124`124 *to == '<' `124`124 *to == '`091' `124`124 strc Xhr(to,':') |= 0) X| Strcpy(bakname, to); X else `123 X `009Strcpy(bakname, "./"); X `009Strcat(bakname, to); X--- 33,39 ----- X `032 X `035ifdef VMS V /* This is not robust -- we just rename the file, hoping for the best. X */ X| if (*to == '/') Strcpy(bakname, to); X else `123 X `009Strcpy(bakname, "./"); X `009Strcat(bakname, to); ! GOSUB UNPACK_FILE ! FILE_IS = "PATCH2.DIFF" ! CHECKSUM_IS = 1579820730 ! COPY SYS!INPUT VMS_SHARE_DUMMY.DUMMY X*** util.c X--- util.c;2 X************** X*** 9,17 X move`095file(from,to) X char *from, *to; X `123 X- `035ifdef VMS X- char toname`091512`093; X- `035else X char bakname`091512`093; X `035endif X Reg1 char *s; X--- 9,14 ----- X move`095file(from,to) X char *from, *to; X `123 X char bakname`091512`093; X Reg1 char *s; X Reg2 int i; X************** X*** 13,19 X char toname`091512`093; X `035else X char bakname`091512`093; X- `035endif X Reg1 char *s; X Reg2 int i; X Reg3 int fromfd; X--- 10,15 ----- X char *from, *to; X `123 X char bakname`091512`093; X Reg1 char *s; X Reg2 int i; X Reg3 int fromfd; X************** X*** 36,41 X `125 X `032 X `035ifdef VMS V if (*to == '/' `124`124 *to == '<' `124`124 *to == '`091' `124`124 strc Xhr(to,':') |= 0) X Strcpy(toname, to); X else `123 X--- 32,38 ----- X `125 X `032 X `035ifdef VMS V+ /* This is not robust -- we just rename the file, hoping for the best. X */ V if (*to == '/' `124`124 *to == '<' `124`124 *to == '`091' `124`124 strc Xhr(to,':') |= 0) X Strcpy(bakname, to); X else `123 X************** X*** 37,43 X `032 X `035ifdef VMS V if (*to == '/' `124`124 *to == '<' `124`124 *to == '`091' `124`124 strc Xhr(to,':') |= 0) X| Strcpy(toname, to); X else `123 X `009Strcpy(toname, "./"); X `009Strcat(toname, to); X--- 34,40 ----- X `035ifdef VMS V /* This is not robust -- we just rename the file, hoping for the best. X */ V if (*to == '/' `124`124 *to == '<' `124`124 *to == '`091' `124`124 strc Xhr(to,':') |= 0) X| Strcpy(bakname, to); X else `123 X `009Strcpy(bakname, "./"); X `009Strcat(bakname, to); X************** X*** 39,46 V if (*to == '/' `124`124 *to == '<' `124`124 *to == '`091' `124`124 strc Xhr(to,':') |= 0) X Strcpy(toname, to); X else `123 X| `009Strcpy(toname, "./"); X| `009Strcat(toname, to); X `125 X i=rename (from, toname); X if (i) `123 X--- 36,43 ----- V if (*to == '/' `124`124 *to == '<' `124`124 *to == '`091' `124`124 strc Xhr(to,':') |= 0) X Strcpy(bakname, to); X else `123 X| `009Strcpy(bakname, "./"); X| `009Strcat(bakname, to); X `125 X i=rename (from, bakname); V /* printf ("Attempted to rename `037s to `037s; status `037d`092n", from, X bakname, i); */ X************** X*** 42,53 X `009Strcpy(toname, "./"); X `009Strcat(toname, to); X `125 X| i=rename (from, toname); X| if (i) `123 X| say3("Could not rename from `037s to `037s,`092n", from, toname); X| say1("We try copying and deleting the file instead`092n"); X| `125 X| if (i) `123 /* Using two conditions to make syntax of program fit */ X `035else X Strcpy(bakname, to); X Strcat(bakname, origext?origext:ORIGEXT); X--- 39,46 ----- X `009Strcpy(bakname, "./"); X `009Strcat(bakname, to); X `125 X| i=rename (from, bakname); V| /* printf ("Attempted to rename `037s to `037s; status `037d`092n", from, X bakname, i); */ X `035else X Strcpy(bakname, to); X Strcat(bakname, origext?origext:ORIGEXT); X************** X*** 86,92 X `009say3("Moving `037s to `037s.`092n", from, to); X `035endif X if (link(from, to) < 0) `123`009`009/* different file system? */ X- `035endif /* VMS */ X `009Reg4 int tofd; X `009tofd = creat(to, 0666); X `009if (tofd < 0) `123 X--- 79,84 ----- X `009say3("Moving `037s to `037s.`092n", from, to); X `035endif X if (link(from, to) < 0) `123`009`009/* different file system? */ X `009Reg4 int tofd; X `009 X `009tofd = creat(to, 0666); X************** X*** 88,93 X if (link(from, to) < 0) `123`009`009/* different file system? */ X `035endif /* VMS */ X `009Reg4 int tofd; X `009tofd = creat(to, 0666); X `009if (tofd < 0) `123 X `009 say3("patch: can't create `037s, output is in `037s.`092n", X--- 80,86 ----- X `035endif X if (link(from, to) < 0) `123`009`009/* different file system? */ X `009Reg4 int tofd; X+ `009 X `009tofd = creat(to, 0666); X `009if (tofd < 0) `123 X `009 say3("patch: can't create `037s, output is in `037s.`092n", X************** X*** 104,109 X `009Close(tofd); X `125 X Unlink(from); X return 0; X `125 X `032 X--- 97,103 ----- X `009Close(tofd); X `125 X Unlink(from); X+ `035endif /* VMS */ X return 0; X `125 ! GOSUB UNPACK_FILE ! EXIT