home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume17 / parseargs / patch01 / PATCH next >
Encoding:
Text File  |  1991-03-18  |  2.4 KB  |  62 lines

  1. *** doc/env_parse.inc.OLD    Mon Mar 18 09:10:32 1991
  2. --- doc/env_parse.inc    Sat Mar 16 15:19:28 1991
  3. ***************
  4. *** 62,66 ****
  5.   undefined, then parsing behavior set by the programmer is used.
  6.   If the programmer has not explicitly used
  7.   .IR parsecntl (3)
  8. ! to modify the parsing behavior will be ``!Prompt + !Ignore'' for Unix
  9. ! MS-DOS, OS/2, and AmigaDOS systems, and ``Prompt'' for VMS systems.
  10. --- 62,68 ----
  11.   undefined, then parsing behavior set by the programmer is used.
  12.   If the programmer has not explicitly used
  13.   .IR parsecntl (3)
  14. ! to modify the parsing behavior, then the default behavior will be
  15. ! ``Flags1st'' for Unix systems, ``!Prompt + !Ignore'' for AmigaDOS
  16. ! systems, ``CaseIgnore'' for MS-DOS and OS/2 systems, and ``Prompt''
  17. ! for VMS systems.
  18. *** xparse.c.OLD    Mon Mar 18 09:10:36 1991
  19. --- xparse.c    Mon Mar 18 08:51:08 1991
  20. ***************
  21. *** 537,543 ****
  22. --- 537,553 ----
  23.      else  anchor = ad;
  24.   
  25.        /* set default parse-flags */
  26. + #ifndef ibm_style
  27.      cmd_flags(argd) = pa_DEFAULTS;
  28. + #else
  29. +    {
  30. +       char *pfx = getenv( "SWITCHAR" );
  31. +       if ( pfx  &&  *pfx == '-' )
  32. +          cmd_flags(argd) = pa_FLAGS1ST;
  33. +       else
  34. +          cmd_flags(argd) = pa_DEFAULTS;
  35. +    }
  36. + #endif
  37.   
  38.        /* if new-style, get the purpose from the command name */
  39.      if ( !old_style  &&  cmd_name(argd) ) {
  40. ***************
  41. *** 1168,1176 ****
  42.   **
  43.   **    If the environment variable "PARSECNTL" is empty or undefined, then
  44.   **    parsing behavior set by the programmer is used.  If the programmer has
  45. ! **    not explicitly used parsecntl(3) to modify the parsing behavior will
  46. ! **    be "!Prompt + !Ignore" for Unix and AmigaDOS systems, "Prompt" for
  47. ! **    VMS systems, and "CaseIgnore" for MS-DOS and OS/2 systems.
  48.   **
  49.   ** ^REQUIREMENTS:
  50.   **    <cmd> must point to an array that has been declared using the CMD_XXXX
  51. --- 1178,1187 ----
  52.   **
  53.   **    If the environment variable "PARSECNTL" is empty or undefined, then
  54.   **    parsing behavior set by the programmer is used.  If the programmer has
  55. ! **    not explicitly used parsecntl(3) to modify the parsing behavior, then
  56. ! **    the default behavior will be "Flags1st" for Unix Systems,
  57. ! **    "!Prompt + !Ignore" for AmigaDOS systems, "Prompt" for VMS systems,
  58. ! **    and "CaseIgnore" for MS-DOS and OS/2 systems.
  59.   **
  60.   ** ^REQUIREMENTS:
  61.   **    <cmd> must point to an array that has been declared using the CMD_XXXX
  62.