🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.sources
Article #11

C Swing v3.6.3 patches, part 06/07

#11
From: flowers
Date: Thu, 29 Oct 1992 17:42
1547 lines
50224 bytes
Submitted-by: flowers@memstvx1.memst.edu (Harry Flowers)
Posting-number: Volume 3, Issue 217
Archive-name: cswing/patch2_06
Patch-to: cswing: Volume 3, Issue 35-52,93

-+-+-+-+-+-+-+-+ START OF PART 6 -+-+-+-+-+-+-+-+
X!     **  if node was in SYS$SYSROOT and sysroot_flag is set to 1,
X!     **  add node for SYS$COMMON and increment sysroot_flag to
X!     **`09ensure we won't try to do this twice
X      */
X      if (sysroot_flag == 1) `7B
X          sysroot_flag = 2;
X**************
X*** 251,269
X      /*
X      **  call set_def to go to desired directory
X      */
X!     set_default(directory);
X!`20
X!     /*
X!     **  find where we start
X!     */
X!     set_init_position();
X!`20
X!     /*
X!     **  repair display
X!     */
X!     refresh_display();
X!`20
X! #endif
X      return(TRUE);
X  `7D
X `20
X--- 273,284 -----
X      **  add node for SYS$COMMON and increment sysroot_flag to
X      **`09ensure we won't try to do this twice
X      */
X!     if (sysroot_flag == 1) `7B
X!         sysroot_flag = 2;
X! `09if(set_default(cmndir))
X! `09   first_translation`5B0`5D = 0;
X!         add_directory_structure(cmndir);
X!     `7D
X      return(TRUE);
X  `7D
X `20
X**************
X*** 488,493
X                  /*
X                  **  it's not a disk, so translate further
X                  */
X                  strcat(trans`5Bi`5D,tail);
X                  added += add_dstructure(trans`5Bi`5D);
X              `7D
X--- 503,511 -----
X                  /*
X                  **  it's not a disk, so translate further
X                  */
X+ `09`09if (trans`5Bi`5D`5Bstrlen(trans`5Bi`5D)-1`5D != ':' &&
X+ `09`09    trans`5Bi`5D`5Bstrlen(trans`5Bi`5D)-1`5D != '`5D' )
X+ `09`09   strcat(trans`5Bi`5D,":");
X                  strcat(trans`5Bi`5D,tail);
X                  added += add_dstructure(trans`5Bi`5D);
X              `7D
$ CALL UNPACK SWING_24_C.PAT;363 1999929390
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dswing_38.c;1
X--- disk$disk1:`5Bflowers.swing.src`5Dswing_38.c;2
X**************
X*** 24,29
X  **         -----------------------------------------------------
X  **          8-MAY-1990  Initial Version v3.2               MA
X  **         24-Jun-1991  Changed from More to MOST          MA
X  **
X  **************************************************************/
X  `20
X--- 24,35 -----
X  **         -----------------------------------------------------
X  **          8-MAY-1990  Initial Version v3.2               MA
X  **         24-Jun-1991  Changed from More to MOST          MA
X+ **         10-Oct-1992  Added ability to MOST a series
X+ **                      of selected files for use with
X+ **                      windows, to use MOST_SWITCHES
X+ **                      and MOST_EDITOR if defined, to
X+ **                      spawn if not captive, and to use
X+ **                      all other functions in MOST        FM
X  **
X  **************************************************************/
X `20
X**************
X*** 26,32
X  **         24-Jun-1991  Changed from More to MOST          MA
X  **
X  **************************************************************/
X! `20
X  /*
X  **  swing_38
X  **
X--- 32,38 -----
X  **                      all other functions in MOST        FM
X  **
X  **************************************************************/
X!`20
X  /*
X  **  swing_38
X  **
X**************
X*** 30,36
X  /*
X  **  swing_38
X  **
X! **  type/less/more routines
X  */
X  #include ctype
X  #include stdio
X--- 36,42 -----
X  /*
X  **  swing_38
X  **
X! **  type/most routines
X  */
X  #include ctype
X  #include stdio
X**************
X*** 40,45
X  #include "swing.h"
X  #include "swing_refs.h"
X  #include "more_descrip.h"
X `20
X  char`09*more_argv`5B`5D = `7B "most_less", "", "", (char *) NULL `7D;
X `20
X--- 46,52 -----
X  #include "swing.h"
X  #include "swing_refs.h"
X  #include "more_descrip.h"
X+ #include "trmdef.h"
X `20
X  /*
X  **  type the current file or selected files via most
X**************
X*** 41,47
X  #include "swing_refs.h"
X  #include "more_descrip.h"
X `20
X! char`09*more_argv`5B`5D = `7B "most_less", "", "", (char *) NULL `7D;
X `20
X  #define EDITOR_SIZE 40
X `20
X--- 48,63 -----
X  #include "more_descrip.h"
X  #include "trmdef.h"
X `20
X! /*
X! **  type the current file or selected files via most
X! */
X! most_files(n)
X! NODE *n;
X! `7B
X!     FILER *tmp;
X!     char *most_args`5B500`5D;
X!     int num_most_args = 0;
X!     int screen;
X `20
X      /*
X      **  initial set of most_args`5B`5D could receive most's switches (-bck
Vlstvw)
X**************
X*** 43,49
X `20
X  char`09*more_argv`5B`5D = `7B "most_less", "", "", (char *) NULL `7D;
X `20
X! #define EDITOR_SIZE 40
X `20
X  more_file(dir,filename)
X  char *dir;
X--- 59,75 -----
X      int num_most_args = 0;
X      int screen;
X `20
X!     /*
X!     **  initial set of most_args`5B`5D could receive most's switches (-bck
Vlstvw)
X!     **  and extended_switches (+d, +linenumber, +/string),
X!     **  so these lines are here as an example,
X!     **  but we don't use them.
X!     **
X!     most_args`5Bmost_args`5D = (char *) malloc(strlen("-csv")+1);
X!     strcpy(most_args`5Bnum_most_args++`5D,"-csv");
X!     most_args`5Bnum_most_args`5D = (char *) malloc(strlen("+d")+1);
X!     strcpy(most_args`5Bnum_most_args++`5D,"+d");
X!     */
X `20
X      if (!files_selected)
X      `7B
X**************
X*** 45,53
X `20
X  #define EDITOR_SIZE 40
X `20
X! more_file(dir,filename)
X! char *dir;
X! char *filename;
X `20
X  `7B
X      int i, proc_id, status, length, screen;
X--- 71,106 -----
X      strcpy(most_args`5Bnum_most_args++`5D,"+d");
X      */
X `20
X!     if (!files_selected)
X!     `7B
X!         /*
X!         **  most the current file
X!         */
X!         if (access(curr_file_ptr->filename,0) == 0)
X!         `7B
X!             tmp = current_file_ptr(curr_file_no);
X!             most_args`5Bnum_most_args`5D = (char *) malloc(strlen(tmp->fil
Vename)+1);
X!             strcpy(most_args`5Bnum_most_args++`5D,tmp->filename);
X!         `7D
X!         else
X!         `7B
X!             sprintf(junk,"%s is not accessable",curr_file_ptr->filename);
X!             warning(junk);
X!             return(FALSE);
X!         `7D
X!     `7D
X!     else
X!     `7B
X!         /*
X!         **  confirm intention to most the selected files
X!         */
X!         if (files_selected == 1)
X!             sprintf(junk,"type the selected file via most Y/N `5BN`5D");
X!         else
X!             sprintf(junk,"type the %d selected files via most Y/N `5BN`5D"
V,
X!                     files_selected);
X!         if (!confirm_user(junk,"Y"))
X!            return(FALSE);
X `20
X          /*
X          **  most the selected files
X**************
X*** 49,56
X  char *dir;
X  char *filename;
X `20
X! `7B
X!     int i, proc_id, status, length, screen;
X `20
X      `7B
X          smg$save_physical_screen(&paste,&screen);
X--- 102,133 -----
X          if (!confirm_user(junk,"Y"))
X             return(FALSE);
X `20
X!         /*
X!         **  most the selected files
X!         */
X!         tmp = first_file_ptr;
X!         while(tmp)
X!         `7B
X!             if (tmp->rendition)
X!             `7B
X!                 /*
X!                 **  yup, this one's been chosen
X!                 */
X!                 if (access(tmp->filename,0) == 0)
X!                 `7B
X!                 most_args`5Bnum_most_args`5D =
X!                     (char *) malloc(strlen(tmp->filename)+1);
X!                 strcpy(most_args`5Bnum_most_args++`5D,tmp->filename);
X!                 `7D
X!                 else
X!                 `7B
X!                 sprintf(junk,"%s is not accessable",tmp->filename);
X!                 warning(junk);
X!                 `7D
X!             `7D
X!             tmp = tmp->forw_ptr;
X!         `7D
X!     `7D
X `20
X      /*
X      **  if no files were accessible, return
X**************
X*** 52,57
X  `7B
X      int i, proc_id, status, length, screen;
X `20
X      `7B
X          smg$save_physical_screen(&paste,&screen);
X             do_more_file(filename);
X--- 129,141 -----
X          `7D
X      `7D
X `20
X+     /*
X+     **  if no files were accessible, return
X+     **  else do it
X+     */
X+     if (!num_most_args)
X+         return(FALSE);
X+     else
X      `7B
X          smg$save_physical_screen(&paste,&screen);
X          disable_broadcasts();
X**************
X*** 54,60
X `20
X      `7B
X          smg$save_physical_screen(&paste,&screen);
X!            do_more_file(filename);
X          smg$restore_physical_screen(&paste,&screen);
X          return(TRUE);
X      `7D
X--- 138,148 -----
X      else
X      `7B
X          smg$save_physical_screen(&paste,&screen);
X!         disable_broadcasts();
X!`20
X!             do_most_files(num_most_args,most_args);
X!`20
X!         enable_broadcasts();
X          smg$restore_physical_screen(&paste,&screen);
X      `7D
X `20
X**************
X*** 56,62
X          smg$save_physical_screen(&paste,&screen);
X             do_more_file(filename);
X          smg$restore_physical_screen(&paste,&screen);
X-         return(TRUE);
X      `7D
X  `7D
X `20
X--- 144,149 -----
X `20
X          enable_broadcasts();
X          smg$restore_physical_screen(&paste,&screen);
X      `7D
X `20
X      return(TRUE);
X**************
X*** 58,64
X          smg$restore_physical_screen(&paste,&screen);
X          return(TRUE);
X      `7D
X- `7D
X `20
X  more_exception(sigarr, mecharr)
X  int *sigarr, *mecharr;
X--- 145,150 -----
X          enable_broadcasts();
X          smg$restore_physical_screen(&paste,&screen);
X      `7D
X `20
X      return(TRUE);
X  `7D
X**************
X*** 60,66
X      `7D
X  `7D
X `20
X! more_exception(sigarr, mecharr)
X  int *sigarr, *mecharr;
X  `7B
X      /*
X--- 146,155 -----
X          smg$restore_physical_screen(&paste,&screen);
X      `7D
X `20
X!     return(TRUE);
X! `7D
X!`20
X! most_exception(sigarr, mecharr)
X  int *sigarr, *mecharr;
X  `7B
X      /*
X**************
X*** 69,76
X      lib$sig_to_ret(sigarr, mecharr);
X      return(SS$_UNWIND);
X  `7D
X! do_more_file(filename)
X! char *filename;
X  `7B
X      VAXC$ESTABLISH(more_exception);
X      most_less(filename,1);
X--- 158,167 -----
X      lib$sig_to_ret(sigarr, mecharr);
X      return(SS$_UNWIND);
X  `7D
X!`20
X! do_most_files(num_most_args,most_args)
X! int num_most_args;
X! char *most_args`5B`5D;
X  `7B
X      VAXC$ESTABLISH(most_exception);
X      most_less(num_most_args,most_args);
X**************
X*** 72,80
X  do_more_file(filename)
X  char *filename;
X  `7B
X!     VAXC$ESTABLISH(more_exception);
X!     most_less(filename,1);
X! /*  more_argv`5B1`5D = "-a";
X!     more_argv`5B2`5D = filename;
X!     most_less(3, more_argv); */
X  `7D
X--- 163,168 -----
X  int num_most_args;
X  char *most_args`5B`5D;
X  `7B
X!     VAXC$ESTABLISH(most_exception);
X!     most_less(num_most_args,most_args);
X  `7D
$ CALL UNPACK SWING_38_C.PAT;363 490846982
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dswing_4.c;1
X--- disk$disk1:`5Bflowers.swing.src`5Dswing_4.c;2
X**************
X*** 49,54
X      FILE *fp;
X      char line`5BSPEC_SIZE+1`5D;
X      char trans`5BSPEC_SIZE+1`5D;
X     `20
X      fp = NULL;
X      sprintf(trans,"SWING$SAVE:%s",d->save_file_ss);
X--- 49,55 -----
X      FILE *fp;
X      char line`5BSPEC_SIZE+1`5D;
X      char trans`5BSPEC_SIZE+1`5D;
X+     globalref try_000000;
X     `20
X      fp = NULL;
X      sprintf(trans,"SWING$SAVE:%s",d->save_file_ss);
X**************
X*** 55,61
X `20
X      fp = fopen(trans,"r");
X     `20
X!     if (fp == NULL && !strstr(d->save_file_ss,"_000000_"))
X      `7B
X          int i=0,j=0;
X          while (strncmp(&trans`5Bi`5D,"__",2))
X--- 56,62 -----
X `20
X      fp = fopen(trans,"r");
X     `20
X!     if (fp == NULL && !strstr(d->save_file_ss,"_000000_") && try_000000)
X      `7B
X          int i=0,j=0;
X          while (strncmp(&trans`5Bi`5D,"__",2))
X**************
X*** 71,76
X              while (d->dir_name`5Bi++`5D != '`5B');
X  `09    strcpy(&d->dir_name`5Bi`5D,"000000`5D");
X  `09    d->dir_name`5Bi+7`5D = 0;
X  `09`7D
X      `7D
X      if (fp == NULL)
X--- 72,80 -----
X              while (d->dir_name`5Bi++`5D != '`5B');
X  `09    strcpy(&d->dir_name`5Bi`5D,"000000`5D");
X  `09    d->dir_name`5Bi+7`5D = 0;
X+ `09    strcpy(&d->name`5B0`5D,"000000");
X+ `09    d->name`5B6`5D = 0;
X+ `09    strcpy(d->save_file_ss,&line`5B11`5D);
X  `09`7D
X      `7D
X      if (fp == NULL)
$ CALL UNPACK SWING_4_C.PAT;363 1819150796
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dswing_8.c;1
X--- disk$disk1:`5Bflowers.swing.src`5Dswing_8.c;2
X**************
X*** 878,884
X                  warning(junk);
X              `7D
X              break;
X! /* Type/less/more by Mats */
X  case SMG$K_TRM_UPPERCASE_Y:
X  case SMG$K_TRM_LOWERCASE_Y:
X              if (file_type == SHOW_DIRS)
X--- 878,884 -----
X                  warning(junk);
X              `7D
X              break;
X!`20
X  case SMG$K_TRM_UPPERCASE_Y:
X  case SMG$K_TRM_LOWERCASE_Y:
X              if (file_type == SHOW_DIRS)
X**************
X*** 887,893
X                  break;
X              `7D
X              /*
X!             **  type the current file
X              */
X              curr_file_ptr = current_file_ptr(curr_file_no);
X              if (access(curr_file_ptr->filename,0) == 0)
X--- 887,893 -----
X                  break;
X              `7D
X              /*
X!             **  type the current file or selected files via most
X              */
X              curr_file_ptr = current_file_ptr(curr_file_no);
X              if (most_files(n))
X**************
X*** 890,896
X              **  type the current file
X              */
X              curr_file_ptr = current_file_ptr(curr_file_no);
X!             if (access(curr_file_ptr->filename,0) == 0)
X              `7B
X                  tmp = current_file_ptr(curr_file_no);
X                  strcpy(current_filename,tmp->filename);
X--- 890,896 -----
X              **  type the current file or selected files via most
X              */
X              curr_file_ptr = current_file_ptr(curr_file_no);
X!             if (most_files(n))
X              `7B
X                  tmp = current_file_ptr(curr_file_no);
X                  strcpy(current_filename,tmp->filename);
X**************
X*** 894,900
X              `7B
X                  tmp = current_file_ptr(curr_file_no);
X                  strcpy(current_filename,tmp->filename);
X-                 more_file(n->dir_name,curr_file_ptr->filename);
X                  reasses_files(file_type,n,current_filename);
X                  if (total_files == 0)
X                  `7B
X--- 894,899 -----
X              `7B
X                  tmp = current_file_ptr(curr_file_no);
X                  strcpy(current_filename,tmp->filename);
X                  reasses_files(file_type,n,current_filename);
X                  if (total_files == 0)
X                  `7B
X**************
X*** 901,911
X                      no_files(n);
X                      return(TRUE);
X                  `7D
X-             `7D
X-             else
X-             `7B
X-                 sprintf(junk,"%s is not accessable",curr_file_ptr->filenam
Ve);
X-                 warning(junk);
X              `7D
X              break;
X `20
X--- 900,905 -----
X                      no_files(n);
X                      return(TRUE);
X                  `7D
X              `7D
X              break;
X `20
$ CALL UNPACK SWING_8_C.PAT;363 558514100
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dswing_9.c;1
X--- disk$disk1:`5Bflowers.swing.src`5Dswing_9.c;2
X**************
X*** 23,28
X  **         Date        Change                          Initials
X  **         ----------------------------------------------------
X  **         31-JUL-1989 Initial Version v3.0               SJB
X  **
X  **************************************************************/
X  `20
X--- 23,29 -----
X  **         Date        Change                          Initials
X  **         ----------------------------------------------------
X  **         31-JUL-1989 Initial Version v3.0               SJB
X+ **         21-SEP-1992 Added page and prompt features     FM
X  **
X  **************************************************************/
X  `20
X**************
X*** 29,35
X  /*
X  **  swing_9`09`09HELP PROCESSING
X  */
X! #include "hlpdef"
X  #include ssdef
X  #include stdio
X  #include jpidef
X--- 30,36 -----
X  /*
X  **  swing_9`09`09HELP PROCESSING
X  */
X! #include "hlpdef.h"
X  #include ssdef
X  #include stdio
X  #include jpidef
X**************
X*** 33,38
X  #include ssdef
X  #include stdio
X  #include jpidef
X  #include "swing.h"
X  #include "swing_refs.h"
X  #include "more_descrip.h"
X--- 34,40 -----
X  #include ssdef
X  #include stdio
X  #include jpidef
X+ #include rmsdef
X  #include "swing.h"
X  #include "swing_refs.h"
X  #include "more_descrip.h"
X**************
X*** 37,43
X  #include "swing_refs.h"
X  #include "more_descrip.h"
X `20
X! extern lib$put_output(), lib$get_input();
X `20
X  int help_initialized = 0;
X `20
X--- 39,45 -----
X  #include "swing_refs.h"
X  #include "more_descrip.h"
X `20
X! #define LBR$_ENDTOPIC 2525256
X `20
X  extern lib$put_output(), lib$get_input();
X `20
X**************
X*** 39,44
X `20
X  extern lib$put_output(), lib$get_input();
X `20
X  int help_initialized = 0;
X `20
X  /*
X--- 41,48 -----
X `20
X  #define LBR$_ENDTOPIC 2525256
X `20
X+ extern lib$put_output(), lib$get_input();
X+`20
X  int help_initialized = 0;
X  int  lines_output;
X  char input_present;
X**************
X*** 40,45
X  extern lib$put_output(), lib$get_input();
X `20
X  int help_initialized = 0;
X `20
X  /*
X  **  we'll check for the presence of the help file in`20
X--- 44,54 -----
X  extern lib$put_output(), lib$get_input();
X `20
X  int help_initialized = 0;
X+ int  lines_output;
X+ char input_present;
X+ char input_string`5B132`5D = '/0';
X+ int  input_length;
X+ int  input_status;
X `20
X  $DESCRIPTOR(input_string_desc,input_string);
X  $DESCRIPTOR(string1_desc, " ");
X**************
X*** 41,46
X `20
X  int help_initialized = 0;
X `20
X  /*
X  **  we'll check for the presence of the help file in`20
X  **
X--- 50,59 -----
X  int  input_length;
X  int  input_status;
X `20
X+ $DESCRIPTOR(input_string_desc,input_string);
X+ $DESCRIPTOR(string1_desc, " ");
X+ $DESCRIPTOR(string2_desc, "Press RETURN to continue ... ");
X+`20
X  /*
X  **  we'll check for the presence of the help file in`20
X  **
X**************
X*** 168,173
X      return(SS$_UNWIND);
X  `7D
X `20
X  lbr_output_help(start)
X  char *start;
X  `7B
X--- 181,261 -----
X      return(SS$_UNWIND);
X  `7D
X `20
X+ /*
X+ **  output-routine for paged library display
X+ **  substitute for lib$put_output in calls to lbr$output_help()
X+ */
X+ help$put_output(output)
X+ struct dsc$descriptor *output;
X+ `7B
X+     int`09status;
X+`20
X+     /*
X+     **  if help page is not full, increment lines_output
X+     **  else, prompt for input from user, and if it's not
X+     **      a carriage_return, inform lbr$output_help()
X+     */
X+     if (lines_output < (page_length - 4))
X+ `09lines_output++;
X+     else
X+         if (lines_output == (page_length - 4)) `7B
X+ `09    status = lib$put_output (&string1_desc);
X+ `09    input_status = lib$get_input (&input_string_desc,
X+ `09    `09`09`09`09  &string2_desc,
X+ `09`09`09`09`09  &input_length);
X+ `09    if ((input_length > 0) `7C`7C (input_status == RMS$_EOF)) `7B
X+ `09        input_present = TRUE;
X+ `09`09return(LBR$_ENDTOPIC);
X+ `09    `7D
X+ `09    lines_output = page_length - 3;
X+ `09`7D
X+`20
X+         /*
X+ `09**  see if we need to clear the screen
X+ `09*/
X+ `09if (lines_output > (page_length - 4)) `7B
X+             status = lib$erase_page(&1,&1);
X+             lines_output = 0;
X+ `09`7D
X+`20
X+     status = lib$put_output(output);
X+     return(status);
X+ `7D
X+`20
X+ /*
X+ **  input-routine for paged library display
X+ **  substitute for lib$get_input in calls to lbr$output_help()
X+ */
X+ help$get_input(input,prompt,x_input_length)
X+ struct dsc$descriptor *input;
X+ struct dsc$descriptor *prompt;
X+ int x_input_length;
X+ `7B
X+     /*
X+     **  if we already have input, use it
X+     **  else get input
X+     */
X+     if (input_present) `7B
X+     `09strncpy(input->dsc$a_pointer,
X+ `09`09input_string_desc.dsc$a_pointer,
X+ `09`09input_length);
X+ `09input->dsc$w_length = input_length;
X+         input_present = FALSE;
X+     `7D
X+     else `7B
X+         input_status = lib$get_input(input,prompt,&input_length);
X+ `09input->dsc$w_length = input_length;
X+     `7D
X+`20
X+     /*
X+     **  generate a page break after every input gotten
X+     */
X+     lines_output = page_length - 3;
X+     x_input_length = input_length;
X+`20
X+     return (input_status);
X+ `7D
X+`20
X  lbr_output_help(start)
X  char *start;
X  `7B
X**************
X*** 178,186
X      **  can crash if given a rubbish help file
X      */
X      VAXC$ESTABLISH(help_exception);
X!    `20
X!     flags = HLP$M_PROMPT;
X!     i = lbr$output_help(&lib$put_output,`09/* output-routine */
X                          &SCREEN_WIDTH,`09`09/* output-width */
X                          DSC1(start),`09`09/* line-desc */
X                          DSC2(help_spec),`09/* library-name */
X--- 266,283 -----
X      **  can crash if given a rubbish help file
X      */
X      VAXC$ESTABLISH(help_exception);
X!`20
X!     /*
X!     **  initialize variables for input and output routines.
X!     */
X!     input_present = FALSE;
X!     flags = HLP$M_HELP `7C HLP$M_PROMPT `7C HLP$M_PAGE;
X!     lines_output = 0;
X!`20
X!     /*
X!     **  display the help
X!     */
X!     i = lbr$output_help(&help$put_output,`09/* output-routine */
X                          &SCREEN_WIDTH,`09`09/* output-width */
X                          DSC1(start),`09`09/* line-desc */
X                          DSC2(help_spec),`09/* library-name */
X**************
X*** 185,191
X                          DSC1(start),`09`09/* line-desc */
X                          DSC2(help_spec),`09/* library-name */
X                          &flags,             `09/* flags */
X!                         &lib$get_input);`09/* input-routine */
X      if (i != SS$_NORMAL)
X          panic(i,"help","swing help");
X  `7D
X--- 282,288 -----
X                          DSC1(start),`09`09/* line-desc */
X                          DSC2(help_spec),`09/* library-name */
X                          &flags,             `09/* flags */
X!                         &help$get_input);`09/* input-routine */
X      if (i != SS$_NORMAL)
X          panic(i,"help","swing help");
X  `7D
$ CALL UNPACK SWING_9_C.PAT;363 403169567
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dswing.c;1
X--- disk$disk1:`5Bflowers.swing.src`5Dswing.c;5
X**************
X*** 56,66
X  #define UAI$M_CAPTIVE`09`098
X  #endif
X `20
X- /* Here is the decl for more, Mats`20
X-`20
X- char`09*more_argv`5B`5D = `7B "more", "", (char *) NULL `7D;
X- */
X-`20
X  /*
X  **  maximum no of directory structures we'll try to load at startup
X  */
X--- 56,61 -----
X  #define UAI$M_CAPTIVE`09`098
X  #endif
X `20
X  /*
X  **  maximum no of directory structures we'll try to load at startup
X  */
X**************
X*** 115,121
X  `7B
X      char dir`5BSPEC_SIZE+1`5D,name`5BSPEC_SIZE+1`5D,tmp_dir`5BSPEC_SIZE+1`
V5D;
X      int i, status, arg_no, c, uaflags, iosb`5B2`5D, filmgr_start;
X!     globaldef int captive;
X      char arg_list`5BSPEC_SIZE+1`5D;
X      char arg`5BMAX_ARGS`5D`5BSPEC_SIZE+1`5D;
X `20
X--- 110,116 -----
X  `7B
X      char dir`5BSPEC_SIZE+1`5D,name`5BSPEC_SIZE+1`5D,tmp_dir`5BSPEC_SIZE+1`
V5D;
X      int i, status, arg_no, c, uaflags, iosb`5B2`5D, filmgr_start;
X!     globaldef int captive, try_000000, spec_to_root, comm_to_root;
X      char arg_list`5BSPEC_SIZE+1`5D;
X      char arg`5BMAX_ARGS`5D`5BSPEC_SIZE+1`5D;
X      int arg_decrement_flag;
X**************
X*** 118,123
X      globaldef int captive;
X      char arg_list`5BSPEC_SIZE+1`5D;
X      char arg`5BMAX_ARGS`5D`5BSPEC_SIZE+1`5D;
X `20
X      /* Small check to see if this is a supported terminal
X      ** More info in swing_39.c
X--- 113,119 -----
X      globaldef int captive, try_000000, spec_to_root, comm_to_root;
X      char arg_list`5BSPEC_SIZE+1`5D;
X      char arg`5BMAX_ARGS`5D`5BSPEC_SIZE+1`5D;
X+     int arg_decrement_flag;
X `20
X      /* Small check to see if this is a supported terminal
X      ** More info in swing_39.c
X**************
X*** 156,162
X      captive = (uaflags & UAI$M_CAPTIVE);
X `20
X      /*
X!     **  check for -f or /f`5Bile_manager`5D, -v or /v`5Bersion`5D, -h or /
Vh`5Belp`5D args
X      */
X      filmgr_start = FALSE;
X      if (argc > 1)
X--- 152,167 -----
X      captive = (uaflags & UAI$M_CAPTIVE);
X `20
X      /*
X!     **  check for qualifier args:
X!     **
X!     **  -h or /h  Show Help list of command line arguments
X!     **  -v or /v  Show Version of this program
X!     **  -f or /f  Start up in File_manager
X!     **  -0 or /0  Look for and use a device__000000__SWSVE.DAT file if a
X!     **                    device__directory__SWSVE.DAT file is not found
X!     **                    in the SWING$SAVE directory.
X!     **  -s or /s  Exits in SYS$SPECIFIC restore SYS$SYSROOT as default dir
V.
X!     **  -c or /c  Exits in SYS$COMMON   restore SYS$SYSROOT as default dir
V.
X      */
X      filmgr_start = FALSE;
X  #ifdef ALWAYS_TRY_000000
X**************
X*** 159,166
X      **  check for -f or /f`5Bile_manager`5D, -v or /v`5Bersion`5D, -h or /
Vh`5Belp`5D args
X      */
X      filmgr_start = FALSE;
X!     if (argc > 1)
X!     `7B
X  `09for (arg_no = 1; arg_no < argc; arg_no++)
X  `09`7B
X  `09    if ((strcmp(argv`5Barg_no`5D,"-f")==0) `7C`7C
X--- 164,186 -----
X      **  -c or /c  Exits in SYS$COMMON   restore SYS$SYSROOT as default dir
V.
X      */
X      filmgr_start = FALSE;
X! #ifdef ALWAYS_TRY_000000
X!     try_000000 = TRUE;
X! #else
X!     try_000000 = FALSE;
X! #endif
X! #ifdef SPECIFIC_EXITS_TO_SYSROOT
X!     spec_to_root = TRUE;
X! #else
X!     spec_to_root = FALSE;
X! #endif
X! #ifdef COMMON_EXITS_TO_SYSROOT
X!     comm_to_root = TRUE;
X! #else
X!     comm_to_root = FALSE;
X! #endif
X!`20
X!     if (argc > 1) `7B
X  `09for (arg_no = 1; arg_no < argc; arg_no++)
X  `09`7B
X  `09    /*
X**************
X*** 163,168
X      `7B
X  `09for (arg_no = 1; arg_no < argc; arg_no++)
X  `09`7B
X  `09    if ((strcmp(argv`5Barg_no`5D,"-f")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/f",2)==0))
X  `09    `7B
X--- 183,244 -----
X      if (argc > 1) `7B
X  `09for (arg_no = 1; arg_no < argc; arg_no++)
X  `09`7B
X+ `09    /*
X+ `09    **  test for qualifiers which evoke printing to screen and
X+ `09    **  then exit:  -h or /h, -v or /v
X+ `09    **
X+ `09    **  Note that -h will not output descriptions of qualifiers
X+ `09    **  other than -f if they have been made defaults via logicals
X+ `09    **  in SWING.H or via inclusion in CSWING's foreign command
X+ `09    **  definition.
X+ `09    */
X+ `09    arg_decrement_flag = FALSE;
X+ `09    if ((strcmp(argv`5Barg_no`5D,"-h")==0) `7C`7C
X+ `09       (strncmp(argv`5Barg_no`5D,"/h",2)==0)) `7B
X+ `09`09printf("\nUsage:\n");
X+ `09`09printf(" swing -h  Show this Help.\n");
X+ `09`09printf(" swing -v  Show Version of this program.\n");
X+ `09`09sprintf(junk," swing`5B -f`5D");
X+ `09`09if (!try_000000)
X+ `09`09    strcat(junk,"`5B -0`5D");
X+ `09`09if (!spec_to_root)
X+ `09`09    strcat(junk,"`5B -s`5D");
X+ `09`09if (!comm_to_root)
X+ `09`09    strcat(junk,"`5B -c`5D");
X+ `09`09strcat(junk,"`5B dir`5D`5B,dir...`5D\n\n");
X+ `09`09printf("%s",junk);
X+ `09`09printf("  -f  Start up directly in the File manager.\n");
X+ `09`09if (!try_000000) `7B
X+ `09`09 printf("  -0  Look for and use a device__000000__SWSVE.DAT\n");
X+ `09`09 printf("       file if a device__directory__SWSVE.DAT file\n");
X+ `09`09 printf("       is not found in the SWING$SAVE directory.\n");
X+ `09`09`7D
X+ `09`09if (!spec_to_root) `7B
X+ `09`09 printf("  -s  Exits in SYS$SPECIFIC restore SYS$SYSROOT as\n");
X+ `09`09 printf("       the default dir.\n");
X+ `09`09`7D
X+ `09`09if (!comm_to_root) `7B
X+ `09`09 printf("  -c  Exits in SYS$COMMON   restore SYS$SYSROOT as\n");
X+ `09`09 printf("       the default dir.\n");
X+ `09`09`7D
X+ `09`09printf(" dir  Use VMS syntax including brackets (e.g.,\n");
X+ `09`09printf("       `5Btopdir.subdir`5D or device:`5Btopdir.subdir`5D\n")
V;
X+ `09`09printf("       or `5B.subdir`5D).  You can also use logical\n");
X+ `09`09printf("       dir names (e.g., SYS$EXAMPLES).  If a dir\n");
X+ `09`09printf("       is not specified, your current default is\n");
X+ `09`09printf("       assumed.\n\n");
X+ `09`09exit(1);
X+ `09    `7D
X+ `09    if ((strcmp(argv`5Barg_no`5D,"-v")==0) `7C`7C
X+ `09`09(strncmp(argv`5Barg_no`5D,"/v",2)==0)) `7B
X+ `09`09printf(VERSION);
X+ `09`09exit(1);
X+ `09    `7D
X+`20
X+ `09    /*
X+ `09    **  test for qualifiers which modify program behavior: -f or /f
X+ `09    **  -0 or /0, -s or /s, -c or /c
X+ `09    */
X  `09    if ((strcmp(argv`5Barg_no`5D,"-f")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/f",2)==0))
X  `09    `7B
X**************
X*** 169,174
X  `09`09filmgr_start = TRUE;`09/* Invoke file manager at start */
X  `09`09for (i = arg_no; i+1 < argc; i++) argv`5Bi`5D = argv`5Bi+1`5D;
X  `09`09argc--;`09`09/* Move args down and decrement arg count */
X  `09    `7D
X  `09    if ((strcmp(argv`5Barg_no`5D,"-v")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/v",2)==0))
X--- 245,251 -----
X  `09`09filmgr_start = TRUE;`09/* Invoke file manager at start */
X  `09`09for (i = arg_no; i+1 < argc; i++) argv`5Bi`5D = argv`5Bi+1`5D;
X  `09`09argc--;`09`09/* Move args down and decrement arg count */
X+ `09`09arg_decrement_flag = TRUE;
X  `09    `7D
X  `09    if ((strcmp(argv`5Barg_no`5D,"-0")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/0",2)==0))
X**************
X*** 170,177
X  `09`09for (i = arg_no; i+1 < argc; i++) argv`5Bi`5D = argv`5Bi+1`5D;
X  `09`09argc--;`09`09/* Move args down and decrement arg count */
X  `09    `7D
X! `09    if ((strcmp(argv`5Barg_no`5D,"-v")==0) `7C`7C
X! `09       (strncmp(argv`5Barg_no`5D,"/v",2)==0))
X  `09    `7B
X  `09`09printf(VERSION);
X  `09`09exit(1);
X--- 247,254 -----
X  `09`09argc--;`09`09/* Move args down and decrement arg count */
X  `09`09arg_decrement_flag = TRUE;
X  `09    `7D
X! `09    if ((strcmp(argv`5Barg_no`5D,"-0")==0) `7C`7C
X! `09       (strncmp(argv`5Barg_no`5D,"/0",2)==0))
X  `09    `7B
X  `09`09try_000000 = TRUE;`09/* Try device root DAT file */
X  `09`09for (i = arg_no; i+1 < argc; i++) argv`5Bi`5D = argv`5Bi+1`5D;
X**************
X*** 173,180
X  `09    if ((strcmp(argv`5Barg_no`5D,"-v")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/v",2)==0))
X  `09    `7B
X! `09`09printf(VERSION);
X! `09`09exit(1);
X  `09    `7D
X  `09    if ((strcmp(argv`5Barg_no`5D,"-h")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/h",2)==0))
X--- 250,259 -----
X  `09    if ((strcmp(argv`5Barg_no`5D,"-0")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/0",2)==0))
X  `09    `7B
X! `09`09try_000000 = TRUE;`09/* Try device root DAT file */
X! `09`09for (i = arg_no; i+1 < argc; i++) argv`5Bi`5D = argv`5Bi+1`5D;
X! `09`09argc--;`09`09/* Move args down and decrement arg count */
X! `09`09arg_decrement_flag = TRUE;
X  `09    `7D
X  `09    if ((strcmp(argv`5Barg_no`5D,"-s")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/s",2)==0))
X**************
X*** 176,183
X  `09`09printf(VERSION);
X  `09`09exit(1);
X  `09    `7D
X! `09    if ((strcmp(argv`5Barg_no`5D,"-h")==0) `7C`7C
X! `09       (strncmp(argv`5Barg_no`5D,"/h",2)==0))
X  `09    `7B
X  `09`09printf("Usage: swing `5B-f`5D`5B-v`5D`5B-h`5D `5Bdirectory`5D`5B,dir
Vectory...`5D");
X  `09`09printf("\nf=file manager first   v=version only   h=this help");
X--- 255,262 -----
X  `09`09argc--;`09`09/* Move args down and decrement arg count */
X  `09`09arg_decrement_flag = TRUE;
X  `09    `7D
X! `09    if ((strcmp(argv`5Barg_no`5D,"-s")==0) `7C`7C
X! `09       (strncmp(argv`5Barg_no`5D,"/s",2)==0))
X  `09    `7B
X  `09`09spec_to_root = TRUE; /* SYS$SPECIFIC->SYS$SYSROOT on exit */
X  `09`09for (i = arg_no; i+1 < argc; i++) argv`5Bi`5D = argv`5Bi+1`5D;
X**************
X*** 179,187
X  `09    if ((strcmp(argv`5Barg_no`5D,"-h")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/h",2)==0))
X  `09    `7B
X! `09`09printf("Usage: swing `5B-f`5D`5B-v`5D`5B-h`5D `5Bdirectory`5D`5B,dir
Vectory...`5D");
X! `09`09printf("\nf=file manager first   v=version only   h=this help");
X! `09`09exit(1);
X  `09    `7D
X  `09`7D
X      `7D
X--- 258,267 -----
X  `09    if ((strcmp(argv`5Barg_no`5D,"-s")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/s",2)==0))
X  `09    `7B
X! `09`09spec_to_root = TRUE; /* SYS$SPECIFIC->SYS$SYSROOT on exit */
X! `09`09for (i = arg_no; i+1 < argc; i++) argv`5Bi`5D = argv`5Bi+1`5D;
X! `09`09argc--;`09`09/* Move args down and decrement arg count */
X! `09`09arg_decrement_flag = TRUE;
X  `09    `7D
X  `09    if ((strcmp(argv`5Barg_no`5D,"-c")==0) `7C`7C
X  `09       (strncmp(argv`5Barg_no`5D,"/c",2)==0))
X**************
X*** 183,188
X  `09`09printf("\nf=file manager first   v=version only   h=this help");
X  `09`09exit(1);
X  `09    `7D
X  `09`7D
X      `7D
X  `09`09
X--- 263,284 -----
X  `09`09argc--;`09`09/* Move args down and decrement arg count */
X  `09`09arg_decrement_flag = TRUE;
X  `09    `7D
X+ `09    if ((strcmp(argv`5Barg_no`5D,"-c")==0) `7C`7C
X+ `09       (strncmp(argv`5Barg_no`5D,"/c",2)==0))
X+ `09    `7B
X+ `09`09comm_to_root = TRUE;    /* SYS$COMMON->SYS$SYSROOT on exit */
X+ `09`09for (i = arg_no; i+1 < argc; i++) argv`5Bi`5D = argv`5Bi+1`5D;
X+ `09`09argc--;`09`09/* Move args down and decrement arg count */
X+ `09`09arg_decrement_flag = TRUE;
X+ `09    `7D
X+`20
X+ `09    /*
X+ `09    **  make sure we pick up "print_then_exit" qualifiers if they
X+ `09    **  were preceded in the command line by "modify_behavior"
X+ `09    **  qualifier(s)
X+ `09    */
X+ `09    if (arg_decrement_flag)
X+ `09`09arg_no -= 1;
X  `09`7D
X      `7D
X  `09`09
X**************
X*** 266,278
X      `7B
X          for (i = 0; i < arg_no; i++)
X          `7B
X!             if (!add_a_dstructure(arg`5Bi`5D))
X!             `7B
X!                 sprintf(junk,
X!                         "Failed to find directory %c%s%c",
X!                         '"',
X!                         arg`5Bi`5D,
X!                         '"');
X                  warning(junk);
X              `7D
X          `7D
X--- 362,416 -----
X      `7B
X          for (i = 0; i < arg_no; i++)
X          `7B
X! `09    /*
X! `09    **  if argument is a directory spec (i.e., without a device
X! `09    **  spec, and not a logical), enable use of specs relative
X! `09    **  to start_dir (e.g., `5B.junk`5D or `5B-.-.junk`5D)
X! `09    */
X! `09    if (arg`5Bi`5D`5B0`5D == '`5B')
X! `09    `7B
X! `09`09show_def(dir);
X! `09`09set_default(start_dir);    /* Yes, we need both of these */
X! `09`09status = chdir(start_dir); /* calls for some situations. */
X! `09`09status = chdir(arg`5Bi`5D);
X! `09`09if (status)
X! `09`09`7B
X! `09`09    sprintf(junk,
X! `09`09`09    "Cannot access directory %c%s%c",
X! `09`09`09    '"',
X! `09`09`09    arg`5Bi`5D,
X! `09`09`09    '"');
X! `09`09    warning(junk);
X! `09`09    set_default(dir);    /* Yes, we need both of these */
X! `09`09    status = chdir(dir); /* calls for some situations. */
X! `09`09`7D
X! `09`09else
X! `09`09`7B
X! `09`09    show_def(dir);
X! `09`09    if (!add_a_dstructure(dir))
X! `09`09    `7B
X! `09`09`09sprintf(junk,
X! `09`09`09`09"Failed to find directory %c%s%c",
X! `09`09`09`09'"',
X! `09`09`09`09dir,
X! `09`09`09`09'"');
X!                 `09warning(junk);
X! `09`09    `7D
X! `09`09`7D
X! `09    `7D
X! `09    /*
X! `09    **  else argument has a device spec or is a logical,
X! `09    **  so use it as is
X! `09    */
X! `09    else
X! `09    `7B
X! `09`09if (!add_a_dstructure(arg`5Bi`5D))
X! `09`09`7B
X! `09`09sprintf(junk,
X! `09`09`09"Failed to find directory %c%s%c",
X! `09`09`09'"',
X! `09`09`09arg`5Bi`5D,
X! `09`09`09'"');
X                  warning(junk);
X  `09`09`7D
X  `09    `7D
X**************
X*** 274,280
X                          arg`5Bi`5D,
X                          '"');
X                  warning(junk);
X!             `7D
X          `7D
X      `7D
X `20
X--- 412,419 -----
X  `09`09`09arg`5Bi`5D,
X  `09`09`09'"');
X                  warning(junk);
X! `09`09`7D
X! `09    `7D
X          `7D
X      `7D
X `20
X**************
X*** 323,329
X  /*** printf(">>> Entry with %s <<<\n",act); ***/
X      status=lib$find_file(DSC1(act),DSC2(result),&cntxt,0,0,0,0);
X      s2=lib$find_file_end(&cntxt);
X!     while (status&1`7C`7Cstatus==RMS$_FNF) `7B
X        act`5Bstrlen(act)-5`5D='\0'; strcpy(dir,act);
X        while (*ap!='.' && *ap!='`5B') ap--;
X        if (*ap=='.') `7B
X--- 462,468 -----
X  /*** printf(">>> Entry with %s <<<\n",act); ***/
X      status=lib$find_file(DSC1(act),DSC2(result),&cntxt,0,0,0,0);
X      s2=lib$find_file_end(&cntxt);
X!     while (status&1`7C`7Cstatus==RMS$_FNF`7C`7Cstatus==RMS$_DNF) `7B
X        act`5Bstrlen(act)-5`5D='\0'; strcpy(dir,act);
X        while (*ap!='.' && *ap!='`5B') ap--;
X        if (*ap=='.') `7B
X**************
X*** 694,699
X      char default_dir`5BSPEC_SIZE+1`5D;
X      int status;
X      DSTRUCTURE *tmp;
X `20
X      /*
X      **  switch off all future calls to panic
X--- 833,839 -----
X      char default_dir`5BSPEC_SIZE+1`5D;
X      int status;
X      DSTRUCTURE *tmp;
X+     globalref int spec_to_root, comm_to_root;
X `20
X      /*
X      **  switch off all future calls to panic
X**************
X*** 701,707
X      panicked_already = TRUE;
X `20
X      /*
X!     **  Recreate pasteborads & displays
X      **  They are destroyed by SMG exit handler
X      */
X      status = smg$create_pasteboard(&paste);
X--- 841,847 -----
X      panicked_already = TRUE;
X `20
X      /*
X!     **  Recreate pasteboards & displays
X      **  They are destroyed by SMG exit handler
X      */
X      status = smg$create_pasteboard(&paste);
X**************
X*** 777,783
X      if ((sense_mode`5B10`5D & 128) == 0) smg$set_keypad_mode(&keyboard,&0)
V;
X `20
X      /*
X!     **  show user where we are
X      */
X      show_def(default_dir);
X      sprintf(junk,"Current directory is %s",default_dir);
X--- 917,923 -----
X      if ((sense_mode`5B10`5D & 128) == 0) smg$set_keypad_mode(&keyboard,&0)
V;
X `20
X      /*
X!     **  get current default directory
X      */
X      show_def(default_dir);
X `20
X**************
X*** 780,785
X      **  show user where we are
X      */
X      show_def(default_dir);
X      sprintf(junk,"Current directory is %s",default_dir);
X      smg$put_line(&display_dcl,DSC1(junk),0,0,0,&1);
X `20
X--- 920,961 -----
X      **  get current default directory
X      */
X      show_def(default_dir);
X+`20
X+     /*
X+     **  if SPECIFIC_EXITS_TO_SYSROOT is defined in SWING.H or -s or /s wer
Ve
X+     **     used as command line arguments,
X+     **  and the default device is SYS$SPECIFIC,
X+     **  and sysroot_flag is set,
X+     **  then make the default device SYS$SYSROOT.
X+     */
X+     if (spec_to_root && strstr(default_dir,"SYS$SPECIFIC") && sysroot_flag
V) `7B
X+ `09strcpy(junk,"SYS$SYSROOT:");
X+ `09i = 0;
X+ `09while (default_dir`5Bi++`5D != '`5B');
X+         strcat(junk,&default_dir`5Bi-1`5D);
X+ `09strcpy(default_dir,junk);
X+ `09set_default(default_dir);
X+     `7D
X+`20
X+     /*
X+     **  if COMMMON_EXITS_TO_SYSROOT is defined in SWING.H or -c or /c were
X+     **     used as command line arguments,
X+     **  and the default device is SYS$COMMON,
X+     **  and sysroot_flag is set,
X+     **  then make the default device SYS$SYSROOT.
X+     */
X+     if (comm_to_root && strstr(default_dir,"SYS$COMMON") && sysroot_flag)
V `7B
X+ `09strcpy(junk,"SYS$SYSROOT:");
X+ `09i = 0;
X+ `09while (default_dir`5Bi++`5D != '`5B');
X+         strcat(junk,&default_dir`5Bi-1`5D);
X+ `09strcpy(default_dir,junk);
X+ `09set_default(default_dir);
X+     `7D
X+`20
X+     /*
X+     **  show user where we are
X+     */
X      sprintf(junk,"Current directory is %s",default_dir);
X      smg$put_line(&display_dcl,DSC1(junk),0,0,0,&1);
X `20
X**************
X*** 1186,1192
X      load_lines();
X      set_default(dir);
X `20
X-`20
X  label_1:
X      /*
X      **  If we haven't started the display we'll try to put the current`20
X--- 1362,1367 -----
X      load_lines();
X      set_default(dir);
X `20
X  label_1:
X      /*
X      **  If we haven't started the display we'll try to put the current`20
X**************
X*** 1522,1526
X  `09 o Fixed a bug in the code I submitted a while ago for searching for
X  `09   directories under a 000000 directory.  It doesn't work for
X  `09   directories that have a _ in their name.
X `20
X  */
X--- 1697,1760 -----
X  `09 o Fixed a bug in the code I submitted a while ago for searching for
X  `09   directories under a 000000 directory.  It doesn't work for
X  `09   directories that have a _ in their name.
X+`20
X+     920921 Foteos Macrides (MACRIDES@WFEB2.BITNET)
X+     `09o Fixed more bugs in code for searching for directories under a
X+ `09  000000 directory if the device__000000_SWSVE.DAT file exists
X+ `09  and the device__directory__SWSVE.DAT file doesn't.  Made this
X+ `09  behavior an option via a -0 or /0 qualifier.  It can be made
X+ `09  the default (i.e., regardless of whether -0 or /0 is entered on
X+ `09  the command line) by defining ALWAYS_TRY_000000 in SWING.H.
X+ `09o Enhanced or debugged aspects of logical device name handling.
X+ `09  However, earlier modifications to respect terminal and concealed
X+ `09  device logicals have broken some of CSWING's capacity to deal with
X+ `09  search lists, and it can't all be restored without a major rewrite.
X+ `09o Added code such that arguments or logicals which translate to
X+ `09  SYS$SYSROOT:`5Bdirectory`5D will cause SYS$SPECIFIC:`5Bdirectory`5D a
Vnd
X+ `09  SYS$COMMON:`5Bdirectory`5D trees to be displayed (SYS$SPECIFIC is not
X+ `09  in the SYS$SYSROOT search list, so it must be treated as a special
X+ `09  case).  Optional defines (SPECIFIC_EXITS_TO_SYSROOT and
X+ `09  COMMON_EXITS_TO_SYSROOT) in SWING.H enable setting the default
X+ `09  device to SYS$SYSROOT on exit in SYS$SPECIFIC or SYS$COMMON if an
X+ `09  original call was for SYS$SYSROOT.  Added a -s or /s and a -c or
X+ `09  /c qualifier to evoke this behavior if SPECIFIC_EXITS_TO_SYSROOT
X+ `09  and COMMON_EXITS_TO_SYSROOT, respectively, are not defined in
X+ `09  SWING.H.  For all other search lists that can be handled, the
X+ `09  default directory on exit is always that of the particular tree
X+ `09  you were in at the time of exit.
X+ `09o Modified the command line (-h) help module to describe the -0, -s
X+ `09  and -c qualifiers if they were not made defaults via logicals in
X+ `09  SWING.H or by including them in the foreign command definition
X+ `09  for CSWING.
X+     `09o Added capacity to handle relative directory specs (e.g., `5B.foo`
V5D or
X+ `09  `5B-.-.foo`5D).  An argument with such a spec is handled relative to
X+ `09  the directory from which CSWING was called, regardless of its
X+ `09  position in an argument list (e.g., the list  SYS$MANAGER,`5B`5D  wil
Vl
X+ `09  put up trees for SYS$SPECIFIC:`5BSYSMGR`5D, SYS$COMMON:`5BSYSMGR`5D,
V and
X+ `09  your calling default, in that order).
X+ `09o Added pause and prompt features for displays of CSWING.HLB (like
X+ `09  those when reading help libraries via DCL).  The help page length
X+ `09  is determined by the value of page_length, determined at startup
X+ `09  of CSWING.
X+`20
X+     921010 Foteos Macrides (MACRIDES@WFEB2.BITNET)
X+         o Modified swing_8.c and swing_38.c to enable calling MOST with a
X+ `09  set of selected files, and thereby use MOST's windowing features
X+ `09  for multiple files (and appropriately modified the quick help list
X+ `09  in swing_22.c).  Made numerous modifications/enhancements of MOST
X+ `09  for maximum compatibility with CSWING, as described in the header of
X+ `09  MOST's main.c.  Most noteably, command keys are now the same as or`20
X+ `09  homologous to those of CSWING wherever possible.  MOST called from
X+ `09  CSWING will read and use MOST_SWITCHES and MOST_EDITOR if defined,
X+ `09  can spawn editors and will use that defined for CSWING if its own
X+ `09  logical is not defined, and can spawn to DCL in a manner analogous
X+ `09  to spawns from CSWING (or will respect the 'captive' restriction if
X+ `09  set).  Also modified main.c so that a standalone MOST can be built
X+ `09  with the same code at that for CSWING.  Added confirmation of intent
X+ `09  to edit in swing_16.c and MOST (our users too often hit E with
X+ `09  intent to exit, not edit).  Provided a MOST.DOC_FM for this version
X+ `09  of MOST (Note that the original copyright applies to it, and to any
X+ `09  programs derived from it:  You must freely distribute the source
X+ `09  code.).
X `20
X  */
$ CALL UNPACK SWING_C.PAT;363 807449214
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dswing_defs.h;1
X--- disk$disk1:`5Bflowers.swing.src`5Dswing_defs.h;2
X**************
X*** 176,178
X `20
X  globaldef char this_user`5B41`5D;
X  globaldef char start_dir`5BSPEC_SIZE+1`5D;
X--- 176,181 -----
X `20
X  globaldef char this_user`5B41`5D;
X  globaldef char start_dir`5BSPEC_SIZE+1`5D;
X+`20
X+ /* this flag is set if SYS$SYSROOT has been replaced by SYS$SPECIFIC */
X+ globaldef int sysroot_flag = 0;
$ CALL UNPACK SWING_DEFS_H.PAT;363 2048682723
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dswing.h;1
X--- disk$disk1:`5Bflowers.swing.src`5Dswing.h;5
X**************
X*** 57,62
X  #define Q_EXITS_TO_ORIGINAL_DIR
X  */
X `20
X  /*
X  **  *** End of Site Customizations ***
X  */
X--- 57,97 -----
X  #define Q_EXITS_TO_ORIGINAL_DIR
X  */
X `20
X+ /* Define this if you want to seek and use a device__000000__SWSVE.DAT fil
Ve
X+ ** if a device__directory__SWSVE.DAT file was not found.  Defining it sets
X+ ** the intended behavior of v3.6.2 (with some bug fixes).  The consequence
X+ ** of using a __000000__ file is that a tree for the *entire* device is
X+ ** displayed.  I personally do not recommend defining it, because on occas
Vions
X+ ** when you really do want the entire device tree displayed it's easy enou
Vgh
X+ ** to include 000000 in the directory field of the command line argument.
X+ ** Moreover, I've added a command line qualifier so that if you do not
X+ ** define it, you can evoke this behavior by entering a -0 or /0 argument
X+ ** in the call to CSWING.`09`09`09`09`09FM: 11-Sep-92
X+ #define ALWAYS_TRY_000000
X+ */
X+`20
X+ /* Define this if you want to make SYS$SYSROOT the default device when you
X+ ** exit in a SYS$SPECIFIC tree and such (a) tree(s) had been put up via an
V`20
X+ ** argument or logical translation that had SYS$SYSROOT as the device.  No
Vte
X+ ** that this behavior will apply for all SYS$SPECIFIC trees if any have be
Ven
X+ ** put up via a SYS$$SYSROOT argument or translation, but not if all were
X+ ** put up via SYS$SPECIFIC:`5Bdirectory`5D arguments.  If you do not defin
Ve it,
X+ ** you can evoke this behavior by entering a -s or /s argument in the call
X+ ** to CSWING.`09`09`09`09`09`09`09FM: 11-Sep-92
X+ #define SPECIFIC_EXITS_TO_SYSROOT
X+ */
X+`20
X+ /* Define this if you want to make SYS$SYSROOT the default device when you
X+ ** exit in a SYS$COMMON tree and such (a) tree(s) had been put up via an`2
V0
X+ ** argument or logical translation that had SYS$SYSROOT as the device.  No
Vte
X+ ** that this behavior will apply for all SYS$COMMON trees if any have been
X+ ** put up via a SYS$$SYSROOT argument or translation, but not if all were
X+ ** put up via SYS$COMMON:`5Bdirectory`5D arguments.  If you do not define
V it,
X+ ** you can evoke this behavior by entering a -c or /c argument in the call
X+ ** to CSWING.`09`09`09`09`09`09`09FM: 11-Sep-92
X+ #define COMMON_EXITS_TO_SYSROOT
X+ */
X+`20
X  /*
X  **  *** End of Site Customizations ***
X  */
X**************
X*** 76,82
X  #define realloc`09VAXC$REALLOC_OPT
X  #endif
X `20
+-+-+-+-+-+-+-+-  END  OF PART 6 +-+-+-+-+-+-+-+-
Technical Details
Message-ID: <8880514@MVB.SAIC.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!news.hawaii.edu!s.u-tokyo!kekux!rcnpvx!ccsparc01!icspub!wnoc-kyo!sh.wide!wnoc-tyo-news!nec-tyo!nec-gw!sgiblab! darwin.sura.net!zaphod.mps.ohio-state.edu!usc!news.service.uci.edu!unogate!mvb.saic.com!vmsnet-sources

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!news.hawaii.edu!s.u-tokyo!kekux!rcnpvx!ccsparc01!icspub!wnoc-kyo!sh.wide!wnoc-tyo-news!nec-tyo!nec-gw!sgiblab! darwin.sura.net!zaphod.mps.ohio-state.edu!usc!news.service.uci.edu!unogate!mvb.saic.com!vmsnet-sources
Newsgroups: vmsnet.sources
Subject: C Swing v3.6.3 patches, part 06/07
Message-ID: <8880514@MVB.SAIC.COM>
From: flowers@memstvx1.memst.edu
Date: 29 Oct 92 17:42:24 GMT
Organization: Memphis State University
Approved: Mark.Berryman@Mvb.Saic.Com
Lines: 1547