+-+-+-+ Beginning of part 15 +-+-+-+ X Reg2 long beginning_of_this_line; X Reg3 bool this_line_is_command = FALSE; X--- 1063,1072 ----- X void X do_ed_script() X `123 X+ #ifdef VMS X+ fprintf (stderr, "Ed scripts not supported\n"); X+ exit(1); X+ #else X Reg1 char *t; X Reg2 long beginning_of_this_line; X Reg3 bool this_line_is_command = FALSE; X************** X*** 1120,1123 X else X chmod(outname, filemode); X set_signals(1); X `125 X--- 1124,1128 ----- X else X chmod(outname, filemode); X set_signals(1); X+ #endif X `125 X==============================util.diff=================== X*** util.c_unix X--- util.c X************** X*** 61,67 X if (debug & 4) X say3("Moving %s to %s.\n", to, bakname); X #endif X! if (link(to, bakname) < 0) `123 X say3("patch: can't backup %s, output is in %s\n", X to, from); X return -1; X--- 61,68 ----- X if (debug & 4) X say3("Moving %s to %s.\n", to, bakname); X #endif X! #ifdef VMS X! if (vms_rename(to,bakname) < 0) `123 X say3("patch: can't backup %s, output is in %s\n", X to, from); X return -1; X************** X*** 66,71 X to, from); X return -1; X `125 X while (unlink(to) >= 0) ; X `125 X #ifdef DEBUGGING X--- 67,78 ----- X to, from); X return -1; X `125 X+ #else X+ if (link(to, bakname) < 0) `123 X+ say3("patch: can't backup %s, output is in %s\n", X+ to, from); X+ return -1; X+ `125 X while (unlink(to) >= 0) ; X #endif X `125 X************** X*** 67,72 X return -1; X `125 X while (unlink(to) >= 0) ; X `125 X #ifdef DEBUGGING X if (debug & 4) X--- 74,80 ----- X return -1; X `125 X while (unlink(to) >= 0) ; X+ #endif X `125 X #ifdef DEBUGGING X if (debug & 4) X************** X*** 72,77 X if (debug & 4) X say3("Moving %s to %s.\n", from, to); X #endif X if (link(from, to) < 0) `123 /* different file system? */ X Reg4 int tofd; X X--- 80,88 ----- X if (debug & 4) X say3("Moving %s to %s.\n", from, to); X #endif X+ #ifdef VMS V+ if (vms_rename(from, to) < 0) `123 /* different file system? X */ X+ #else X if (link(from, to) < 0) `123 /* different file system? */ X #endif X Reg4 int tofd; X************** X*** 73,78 X say3("Moving %s to %s.\n", from, to); X #endif X if (link(from, to) < 0) `123 /* different file system? */ X Reg4 int tofd; X X tofd = creat(to, 0666); X--- 84,90 ----- V if (vms_rename(from, to) < 0) `123 /* different file system? X */ X #else X if (link(from, to) < 0) `123 /* different file system? */ X+ #endif X Reg4 int tofd; X X tofd = creat(to, 0666); X************** X*** 362,364 X `125 X return name; X `125 X--- 374,426 ----- X `125 X return name; X `125 X+ #ifdef VMS X+ /* Make something to replace "link" (although it is different.) */ X+ #include X+ X+ int vms_rename (src_name, dst_name) X+ char *src_name, *dst_name; X+ /*- X+ Function to rename a disk file. If the function succeeds then 0 X+ is returned, if it fails -1 is returned. X+ X+ Parameters: X+ X+ src_name: Original name of the file. X+ X+ dst_name: Desired name of the file. X+ -*/ X+ `123 X+ int status; X+ struct FAB srcfab, dstfab; X+ struct NAM srcnam, dstnam; X+ char srcesa[NAM$C_MAXRSS], dstesa[NAM$C_MAXRSS]; X+ X+ srcfab = cc$rms_fab; X+ dstfab = cc$rms_fab; X+ srcnam = cc$rms_nam; X+ dstnam = cc$rms_nam; X+ V+ /* Set up the Extended String in the source and destination NAM blocks * X/ X+ srcnam.nam$l_esa = srcesa; X+ srcnam.nam$b_ess = NAM$C_MAXRSS; X+ dstnam.nam$l_esa = dstesa; X+ dstnam.nam$b_ess = NAM$C_MAXRSS; X+ X+ /* Connect the NAM blocks with their respected FABs */ X+ srcfab.fab$l_nam = &srcnam; X+ dstfab.fab$l_nam = &dstnam; X+ X+ /* Set default file types and lengths, and name and lengths */ X+ dstfab.fab$l_dna = srcfab.fab$l_dna = ""; X+ dstfab.fab$b_dns = srcfab.fab$b_dns = 0; X+ srcfab.fab$l_fna = src_name; X+ srcfab.fab$b_fns = strlen(src_name); X+ dstfab.fab$l_fna = dst_name; X+ dstfab.fab$b_fns = strlen (dst_name); X+ X+ status = SYS$RENAME(&srcfab, NULL, NULL, &dstfab); X+ X+ return (status & 1 ? 0 : -1); X+ `125 X+ #endif $ GOSUB UNPACK_FILE $ EXIT -+-+-+-+-+ End of part 15 +-+-+-+-+-