🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.sources
Article #9

C Swing v3.6.3 patches, part 04/07

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

-+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+
X!                  unsigned char *end, char *out, char *attributes)
X  `7B
X      int test, ii, fold, ii_max, j, ok;
X      unsigned char ch,attr;
X**************
X*** 85,90
X      ii = 0;
X      ii_max = 0;
X      fold = 0;
X      while(ch = *beg, (beg <= end) && (ch != '\n') && (ch != '\0'))
X        `7B
X            beg++;
X--- 92,100 -----
X      ii = 0;
X      ii_max = 0;
X      fold = 0;
X+     /*
X+     **  while character attributes need to be assigned
X+     */
X      while(ch = *beg, (beg <= end) && (ch != '\n') && (ch != '\0'))
X        `7B
X            beg++;
X**************
X*** 88,96
X      while(ch = *beg, (beg <= end) && (ch != '\n') && (ch != '\0'))
X        `7B
X            beg++;
X!           if (ii > ii_max) fold = 0;  /* beyond previous high */
X!           attr = ' ';
X!           if (!MOST_V_OPT && ch == '\015')                   /* `5EM */
X              `7B
X                  if (beg <= end)
X                    `7B
X--- 98,111 -----
X      while(ch = *beg, (beg <= end) && (ch != '\n') && (ch != '\0'))
X        `7B
X            beg++;
X!           if (ii > ii_max) /* beyond previous high       */
X!             fold = 0;      /* so turn off bolding via `5EM */    `20
X!           attr = ' '; /* turn off underlining or bolding attribute */
X!`20
X!           /*
X!           **  set up bolding of line if `5EM
X!           */
X!           if (!MOST_V_OPT && ch == '\015')
X              `7B
X                  if (beg <= end)
X                    `7B
X**************
X*** 99,105
X                        ii = 0;
X                    `7D
X              `7D
X!           else if (!MOST_V_OPT && ch == '\b')
X              `7B
X                  test = 1;
X                  ii--;
X--- 114,124 -----
X                        ii = 0;
X                    `7D
X              `7D
X!`20
X!           /*
X!           **  set up bolding or underlining of character if '\b' (`5EH)
X!           */
X!           else if (!MOST_V_OPT && ch == '\b' && ii != 0)
X              `7B
X                  test = 1;
X                  ii--;
X**************
X*** 104,109
X                  test = 1;
X                  ii--;
X              `7D
X            else if (test `7C`7C fold)
X              `7B
X                  test = 0;
X--- 123,132 -----
X                  test = 1;
X                  ii--;
X              `7D
X+          `20
X+           /*
X+           **  assign bolding or underlining attributes
X+           */
X            else if (test `7C`7C fold)
X              `7B
X                  test = 0;
X**************
X*** 107,113
X            else if (test `7C`7C fold)
X              `7B
X                  test = 0;
X!                 if (ch == out`5Bii`5D)
X                    attr = 'b';
X                  else if (out`5Bii`5D == '_')
X                    attr = 'u';
X--- 130,136 -----
X            else if (test `7C`7C fold)
X              `7B
X                  test = 0;
X!                 if (ch == out`5Bii`5D)       /* overstrike, therefore bold
V */
X                    attr = 'b';
X                  else if (out`5Bii`5D == '_') /* underline */
X                    attr = 'u';
X**************
X*** 109,115
X                  test = 0;
X                  if (ch == out`5Bii`5D)
X                    attr = 'b';
X!                 else if (out`5Bii`5D == '_')
X                    attr = 'u';
X `20
X                  if (fold && ch == ' ')
X--- 132,138 -----
X                  test = 0;
X                  if (ch == out`5Bii`5D)       /* overstrike, therefore bold
V */
X                    attr = 'b';
X!                 else if (out`5Bii`5D == '_') /* underline */
X                    attr = 'u';
X `20
X                  if (fold && ch == ' ')
X**************
X*** 113,119
X                    attr = 'u';
X `20
X                  if (fold && ch == ' ')
X!                   ii++;
X                  else
X                    `7B
X                        attributes`5Bii`5D = attr;
X--- 136,142 -----
X                    attr = 'u';
X `20
X                  if (fold && ch == ' ')
X!                   ii++;                  /* space, therefore no overstrike
V */
X                  else
X                    `7B
X                        attributes`5Bii`5D = attr; /* assign attribute */
X**************
X*** 116,122
X                    ii++;
X                  else
X                    `7B
X!                       attributes`5Bii`5D = attr;
X                        out`5Bii++`5D = ch;
X                    `7D
X                 `20
X--- 139,145 -----
X                    ii++;                  /* space, therefore no overstrike
V */
X                  else
X                    `7B
X!                       attributes`5Bii`5D = attr; /* assign attribute */
X                        out`5Bii++`5D = ch;
X                    `7D
X                 `20
X**************
X*** 121,127
X                    `7D
X                 `20
X              `7D
X!           else if (!MOST_T_OPT && ch == '\t')
X              `7B
X                  j = 8 * (ii/8 + 1) - ii;  /* 8 column tabs */
X                  while(j--)
X--- 144,154 -----
X                    `7D
X                 `20
X              `7D
X!`20
X!           /*
X!           **  expand tabs to 8 spaces if '\t' (`5EI)
X!           */
X!           else if (ch == '\t' && (!MOST_T_OPT `7C`7C !MOST_V_OPT))
X              `7B
X                  j = 8 * (ii/8 + 1) - ii;  /* 8 column tabs */
X                  while(j--)
X**************
X*** 130,135
X                        attributes`5Bii++`5D = attr;
X                    `7D
X              `7D
X            else
X              `7B
X                  out`5Bii`5D = ch;
X--- 157,166 -----
X                        attributes`5Bii++`5D = attr;
X                    `7D
X              `7D
X+            `20
X+           /*
X+           **  no bold or underline attribute
X+           */
X            else
X              `7B
X                  out`5Bii`5D = ch;
X**************
X*** 135,141
X                  out`5Bii`5D = ch;
X                  attributes`5Bii++`5D = attr;
X              `7D
X!       `7D
X      if (fold) ii = ii_max + 1;
X      if ((beg > end) && MOST_S_OPT && !MOST_W_OPT)
X        `7B
X--- 166,172 -----
X                  out`5Bii`5D = ch;
X                  attributes`5Bii++`5D = attr;
X              `7D
X!       `7D /* while */
X      if (fold) ii = ii_max + 1;
X `20
X      /*
X**************
X*** 137,143
X              `7D
X        `7D
X      if (fold) ii = ii_max + 1;
X!     if ((beg > end) && MOST_S_OPT && !MOST_W_OPT)
X        `7B
X            ok = 1;
X            if (*beg == '\n') beg++;
X--- 168,178 -----
X              `7D
X        `7D /* while */
X      if (fold) ii = ii_max + 1;
X!`20
X!     /*
X!     **  omit lines indented more than SELECTIVE_I_DISPLAY
X!     */
X!     if ((beg > end) && SELECTIVE_I_DISPLAY && !MOST_W_OPT)
X        `7B
X            ok = 1;
X            if (*beg == '\n') beg++;
X**************
X*** 145,151
X              `7B
X                  if (*beg != '\n') beg++;
X                  if (beg >= EOB) break;
X!                 if ((*beg == '\n') `7C`7C (apparant_distance(beg) >= MOST_
VS_OPT))
X                    `7B
X                        ok = 0;
X                    `7D
X--- 180,187 -----
X              `7B
X                  if (*beg != '\n') beg++;
X                  if (beg >= EOB) break;
X!                 if ((*beg == '\n') `7C`7C
X!                     (apparant_distance(beg) >= SELECTIVE_I_DISPLAY))
X                    `7B
X                        ok = 0;
X                    `7D
X**************
X*** 159,166
X                        attributes`5Bii++`5D = ' ';
X                    `7D
X              `7D
X!          `20
X!       `7D /* MOST_S_OPT */
X      out`5Bii`5D = '\0';
X      return(ii);
X  `7D
X--- 195,202 -----
X                        attributes`5Bii++`5D = ' ';
X                    `7D
X              `7D
X!       `7D /* SELECTIVE_I_DISPLAY */
X!`20
X      out`5Bii`5D = '\0';
X      return(ii);
X  `7D
X**************
X*** 166,171
X  `7D
X `20
X `20
X  void output(char *line, int len, char *attr, char d_char)
X  `7B
X      int
X--- 202,210 -----
X  `7D
X `20
X `20
X+ /*
X+ **  output a formatted line to the display
X+ */
X  void output(char *line, int len, char *attr, char d_char)
X  `7B
X      int
X**************
X*** 169,177
X  void output(char *line, int len, char *attr, char d_char)
X  `7B
X      int
X!       i,ii,k, bold,b_len,n_len, s_len, u_len, work_len, j, mark, ok, quit,
X!       count, max_col, save, dollar;
X!     char ch, at, out`5B500`5D, *n_str, *b_str, *s_str, *u_str, work`5B20`5
VD;
X `20
X      b_str = "\033`5B1m"; n_str = "\033`5B0m"; s_str = "\033`5B%dC"; u_str
V = "\033`5B4m";
X      b_len = strlen(b_str);
X--- 208,216 -----
X  void output(char *line, int len, char *attr, char d_char)
X  `7B
X      int
X!       i,ii,k, bold,b_len,n_len, s_len, u_len, r_len, work_len, j, mark, ok
V,
X!       quit, count, max_col, save, dollar;
X!     char ch, at, out`5B500`5D, *n_str, *b_str, *s_str, *u_str, *r_str, wor
Vk`5B20`5D;
X `20
X      b_str = "\033`5B1m";     /* 'bold'      escape sequence */
X      b_len = strlen(b_str);
X**************
X*** 173,179
X        count, max_col, save, dollar;
X      char ch, at, out`5B500`5D, *n_str, *b_str, *s_str, *u_str, work`5B20`5
VD;
X `20
X!     b_str = "\033`5B1m"; n_str = "\033`5B0m"; s_str = "\033`5B%dC"; u_str
V = "\033`5B4m";
X      b_len = strlen(b_str);
X      n_len = strlen(n_str);
X      u_len = strlen(u_str);
X--- 212,218 -----
X        quit, count, max_col, save, dollar;
X      char ch, at, out`5B500`5D, *n_str, *b_str, *s_str, *u_str, *r_str, wor
Vk`5B20`5D;
X `20
X!     b_str = "\033`5B1m";     /* 'bold'      escape sequence */
X      b_len = strlen(b_str);
X      u_str = "\033`5B4m";     /* 'underline' escape sequence */
X      u_len = strlen(u_str);
X**************
X*** 175,181
X `20
X      b_str = "\033`5B1m"; n_str = "\033`5B0m"; s_str = "\033`5B%dC"; u_str
V = "\033`5B4m";
X      b_len = strlen(b_str);
X!     n_len = strlen(n_str);
X      u_len = strlen(u_str);
X      s_len = strlen(s_str);
X      i = 0;
X--- 214,220 -----
X `20
X      b_str = "\033`5B1m";     /* 'bold'      escape sequence */
X      b_len = strlen(b_str);
X!     u_str = "\033`5B4m";     /* 'underline' escape sequence */
X      u_len = strlen(u_str);
X      r_str = "\033`5B7m";     /* 'reverse'   escape sequence */
X      r_len = strlen(r_str);
X**************
X*** 177,182
X      b_len = strlen(b_str);
X      n_len = strlen(n_str);
X      u_len = strlen(u_str);
X      s_len = strlen(s_str);
X      i = 0;
X      ii = 0;
X--- 216,226 -----
X      b_len = strlen(b_str);
X      u_str = "\033`5B4m";     /* 'underline' escape sequence */
X      u_len = strlen(u_str);
X+     r_str = "\033`5B7m";     /* 'reverse'   escape sequence */
X+     r_len = strlen(r_str);
X+     n_str = "\033`5B0m";     /* 'normal'    escape sequence */
X+     n_len = strlen(n_str);
X+     s_str = "\033`5B%dC";    /* 'd'x'space' escape sequence */
X      s_len = strlen(s_str);
X `20
X      i = 0;
X**************
X*** 178,183
X      n_len = strlen(n_str);
X      u_len = strlen(u_str);
X      s_len = strlen(s_str);
X      i = 0;
X      ii = 0;
X      bold = 0;
X--- 222,228 -----
X      n_len = strlen(n_str);
X      s_str = "\033`5B%dC";    /* 'd'x'space' escape sequence */
X      s_len = strlen(s_str);
X+`20
X      i = 0;
X      ii = 0;
X      bold = 0;
X**************
X*** 186,191
X      max_col = COLUMN + SCREEN_WIDTH - 1;
X      count = 0;
X      dollar = 0;
X      while (ch = line`5Bi`5D, (i <= len) && ch != '\0' && ch != '\n' && !qu
Vit)
X        `7B
X            count++;
X--- 231,240 -----
X      max_col = COLUMN + SCREEN_WIDTH - 1;
X      count = 0;
X      dollar = 0;
X+`20
X+     /*
X+     **  while characters in the line still need to be counted
X+     */
X      while (ch = line`5Bi`5D, (i <= len) && ch != '\0' && ch != '\n' && !qu
Vit)
X        `7B
X            /*
X**************
X*** 188,193
X      dollar = 0;
X      while (ch = line`5Bi`5D, (i <= len) && ch != '\0' && ch != '\n' && !qu
Vit)
X        `7B
X            count++;
X            if (MOST_V_OPT && ((ch < ' ') `7C`7C (ch > 126))) count++;
X           `20
X--- 237,245 -----
X      */
X      while (ch = line`5Bi`5D, (i <= len) && ch != '\0' && ch != '\n' && !qu
Vit)
X        `7B
X+           /*
X+           **  increment count
X+           */
X            count++;
X `20
X            /*
X**************
X*** 189,196
X      while (ch = line`5Bi`5D, (i <= len) && ch != '\0' && ch != '\n' && !qu
Vit)
X        `7B
X            count++;
X!           if (MOST_V_OPT && ((ch < ' ') `7C`7C (ch > 126))) count++;
X!          `20
X            if (count >= COLUMN) ok = 1;
X            if (count > max_col) break;
X           `20
X--- 241,251 -----
X            **  increment count
X            */
X            count++;
X!`20
X!           /*
X!           **  if count is in window, ok to start filling the out line
X!           **  if count exceeds window, break
X!           */
X            if (count >= COLUMN) ok = 1;
X            if (count > max_col) break;
X           `20
X**************
X*** 194,199
X            if (count >= COLUMN) ok = 1;
X            if (count > max_col) break;
X           `20
X            if (!MOST_V_OPT)
X              `7B
X                  at = attr`5Bi`5D;
X--- 249,257 -----
X            if (count >= COLUMN) ok = 1;
X            if (count > max_col) break;
X           `20
X+           /*
X+           **  if not Verbose mode act on character attributes
X+           */
X            if (!MOST_V_OPT)
X              `7B
X                  /*
X**************
X*** 196,201
X           `20
X            if (!MOST_V_OPT)
X              `7B
X                  at = attr`5Bi`5D;
X                  if ((at != ' ') && !bold)
X                    `7B
X--- 254,262 -----
X            */
X            if (!MOST_V_OPT)
X              `7B
X+                 /*
X+                 **  does bolding or underlining need to be turned on?
X+                 */
X                  at = attr`5Bi`5D;
X                  if ((at != ' ') && (!bold `7C`7C count == COLUMN))
X                    `7B
X**************
X*** 197,203
X            if (!MOST_V_OPT)
X              `7B
X                  at = attr`5Bi`5D;
X!                 if ((at != ' ') && !bold)
X                    `7B
X                        bold = 1;
X                        /* u and b have same length */
X--- 258,264 -----
X                  **  does bolding or underlining need to be turned on?
X                  */
X                  at = attr`5Bi`5D;
X!                 if ((at != ' ') && (!bold `7C`7C count == COLUMN))
X                    `7B
X                        bold = 1;
X                        /* u and b have same length */
X**************
X*** 208,213
X                          `7D
X                       `20
X                    `7D
X                  else if ((at == ' ') && bold)
X                    `7B
X                        bold = 0;
X--- 269,277 -----
X                          `7D
X                       `20
X                    `7D
X+                 /*
X+                 **  does bolding or underlining need to be turned off?
X+                 */
X                  else if ((at == ' ') && bold)
X                    `7B
X                        bold = 0;
X**************
X*** 213,219
X                        bold = 0;
X                        if (ok) for (j = 0; j < n_len; j++) out`5Bii++`5D =
V n_str`5Bj`5D;
X                    `7D
X!             `7D
X           `20
X            if (ch == ' ')
X              `7B
X--- 277,298 -----
X                        bold = 0;
X                        if (ok) for (j = 0; j < n_len; j++) out`5Bii++`5D =
V n_str`5Bj`5D;
X                    `7D
X!                 /*
X!                 **  if its bold or underlined and line is wrapped,
X!                 **  increment count by 2
X!                 */
X!                 if (at != ' ' && MOST_W_OPT)
X!                   count += 2;
X!                 /*
X!                 **  if it's an escape sequence or control character
X!                 **  and line is not wrapped, don't count it
X!                 */
X!                 if (ch < ' ' && !MOST_W_OPT)
X!                   if (ch == '\033')
X!                     count -= b_len;
X!                   else
X!                     count--;
X!             `7D /* if not Verbose mode */
X           `20
X            /*
X            **  if ch is a space or series of spaces
X**************
X*** 215,220
X                    `7D
X              `7D
X           `20
X            if (ch == ' ')
X              `7B
X                  j = 0;
X--- 294,304 -----
X                      count--;
X              `7D /* if not Verbose mode */
X           `20
X+           /*
X+           **  if ch is a space or series of spaces
X+           **  put spaces into out line if ok, and
X+           **  assess whether dollar should be set
X+           */
X            if (ch == ' ')
X              `7B
X                  j = 0;
X**************
X*** 229,235
X                  i = i - 2;
X                  save = count;
X                  count += j - 1;  /* counted one at top of while */
X!`20
X                  if (!ok)
X                    `7B
X                        if (count >= COLUMN)
X--- 313,319 -----
X                  i = i - 2;
X                  save = count;
X                  count += j - 1;  /* counted one at top of while */
X!                `20
X                  if (!ok)
X                    `7B
X                        if (count >= COLUMN)
X**************
X*** 259,267
X                    `7B
X                        dollar = mark + j;
X                    `7D
X!                `20
X!             `7D
X!           else if (ok && ((ch == '\014') `7C`7C ((ch < ' ') && MOST_V_OPT)
V))
X              `7B
X                  out`5Bii++`5D = '`5E';
X                  out`5Bii++`5D = ch + 'A' - 1;
X--- 343,358 -----
X                    `7B
X                        dollar = mark + j;
X                    `7D
X!             `7D /* if ch is a space */
X!          `20
X!           /*
X!           **  else, if ok to fill line and ch is `5EL, `5EG, or a
X!           **  Verbose control char
X! `09  **  display the control char as reverse video char
X!           */
X!           else if (ok && ((ch == '\014') `7C`7C
X!                           (ch == '\007') `7C`7C
X!                          ((ch < ' ') && MOST_V_OPT)))
X              `7B
X                  for (j=0; j < r_len; j++)
X                    out`5Bii++`5D = r_str`5Bj`5D;
X**************
X*** 263,269
X              `7D
X            else if (ok && ((ch == '\014') `7C`7C ((ch < ' ') && MOST_V_OPT)
V))
X              `7B
X!                 out`5Bii++`5D = '`5E';
X                  out`5Bii++`5D = ch + 'A' - 1;
X              `7D
X            else if (ok)`20
X--- 354,361 -----
X                            (ch == '\007') `7C`7C
X                           ((ch < ' ') && MOST_V_OPT)))
X              `7B
X!                 for (j=0; j < r_len; j++)
X!                   out`5Bii++`5D = r_str`5Bj`5D;
X                  out`5Bii++`5D = ch + 'A' - 1;
X                  for (j=0; j < n_len; j++)
X                    out`5Bii++`5D = n_str`5Bj`5D;
X**************
X*** 265,270
X              `7B
X                  out`5Bii++`5D = '`5E';
X                  out`5Bii++`5D = ch + 'A' - 1;
X              `7D
X            else if (ok)`20
X              `7B
X--- 357,364 -----
X                  for (j=0; j < r_len; j++)
X                    out`5Bii++`5D = r_str`5Bj`5D;
X                  out`5Bii++`5D = ch + 'A' - 1;
X+                 for (j=0; j < n_len; j++)
X+                   out`5Bii++`5D = n_str`5Bj`5D;
X              `7D
X           `20
X            /*
X**************
X*** 266,272
X                  out`5Bii++`5D = '`5E';
X                  out`5Bii++`5D = ch + 'A' - 1;
X              `7D
X!           else if (ok)`20
X              `7B
X                  out`5Bii++`5D = ch;
X              `7D
X--- 360,373 -----
X                  for (j=0; j < n_len; j++)
X                    out`5Bii++`5D = n_str`5Bj`5D;
X              `7D
X!          `20
X!           /*
X!           ** else if ok to fill line and`20
X!           **   ( (ch is not a space) and
X!           **     (ch is not a Verbose control char) )
X!           ** put ch into out line
X!           */
X!           else if (ok)
X              `7B
X                  out`5Bii++`5D = ch;
X              `7D
X**************
X*** 270,276
X              `7B
X                  out`5Bii++`5D = ch;
X              `7D
X!          `20
X            i++;
X        `7D
X      if (dollar) out`5Bii = dollar, ii++`5D = d_char;
X--- 371,377 -----
X              `7B
X                  out`5Bii++`5D = ch;
X              `7D
X!                      `20
X            i++;
X        `7D /* while */
X     `20
X**************
X*** 272,277
X              `7D
X           `20
X            i++;
X        `7D
X      if (dollar) out`5Bii = dollar, ii++`5D = d_char;
X      else if (ok && count > max_col) out`5Bii - 1`5D = d_char;
X--- 373,387 -----
X              `7D
X                       `20
X            i++;
X+       `7D /* while */
X+    `20
X+     if (dollar)`20
X+       `7B
X+           bold = 1;
X+           ii = dollar;
X+           for (j=0; j < r_len; j++)
X+             out`5Bii++`5D = r_str`5Bj`5D;
X+           out`5Bii++`5D = d_char;
X        `7D
X      else if (ok && ((count > max_col) `7C`7C (count == max_col && MOST_W_O
VPT)))
X        `7B
X**************
X*** 273,280
X           `20
X            i++;
X        `7D
X!     if (dollar) out`5Bii = dollar, ii++`5D = d_char;
X!     else if (ok && count > max_col) out`5Bii - 1`5D = d_char;
X      out`5Bii`5D = '\0';
X      if (ii) fputs(out,stdout);
X     `20
X--- 383,396 -----
X              out`5Bii++`5D = r_str`5Bj`5D;
X            out`5Bii++`5D = d_char;
X        `7D
X!     else if (ok && ((count > max_col) `7C`7C (count == max_col && MOST_W_O
VPT)))
X!       `7B
X!           bold = 1;
X! `09  ii--;
X!           for (j=0; j < r_len; j++)
X!             out`5Bii++`5D = r_str`5Bj`5D;
X!           out`5Bii++`5D = d_char;
X!       `7D
X      out`5Bii`5D = '\0';
X      if (ii) fputs(out,stdout);
X     `20
X**************
X*** 279,285
X      if (ii) fputs(out,stdout);
X     `20
X      if (ok && bold) fputs(n_str,stdout);
X! `7D
X `20
X `20
X  void most_display_line()
X--- 395,401 -----
X      if (ii) fputs(out,stdout);
X     `20
X      if (ok && bold) fputs(n_str,stdout);
X! `7D /* output */
X `20
X `20
X  /*
X**************
X*** 282,287
X  `7D
X `20
X `20
X  void most_display_line()
X  `7B
X      unsigned char *beg, *end;
X--- 398,407 -----
X  `7D /* output */
X `20
X `20
X+ /*
X+ **  have an ASCII or binary line prepared/analyzed
X+ **  and then call the output function
X+ */
X  void most_display_line()
X  `7B
X      unsigned char *beg, *end;
X**************
X*** 288,293
X      int i, len, v, t;
X      char buff`5B16`5D;
X      char the_line`5BMAX_LINE_LEN`5D,  *p, the_attr`5BMAX_LINE_LEN`5D, *lin
Ve,*attr, ch;
X      line = the_line;
X      attr = the_attr;
X      /* This needs fixed for files with really big lines */
X--- 408,414 -----
X      int i, len, v, t;
X      char buff`5B16`5D;
X      char the_line`5BMAX_LINE_LEN`5D,  *p, the_attr`5BMAX_LINE_LEN`5D, *lin
Ve,*attr, ch;
X+`20
X      line = the_line;
X      attr = the_attr;
X `20
X**************
X*** 290,296
X      char the_line`5BMAX_LINE_LEN`5D,  *p, the_attr`5BMAX_LINE_LEN`5D, *lin
Ve,*attr, ch;
X      line = the_line;
X      attr = the_attr;
X!     /* This needs fixed for files with really big lines */
X      if (!MOST_B_OPT)
X        `7B
X            if(extract_line(&beg, &end) && MOST_W_OPT) ch = '\\'; else ch =
V '$';
X--- 411,421 -----
X `20
X      line = the_line;
X      attr = the_attr;
X!`20
X!     /* This needs to be fixed for files with really big lines */
X!     /*
X!     **  ASCII line
X!     */
X      if (!MOST_B_OPT)
X        `7B
X            /*
X**************
X*** 293,300
X      /* This needs fixed for files with really big lines */
X      if (!MOST_B_OPT)
X        `7B
X!           if(extract_line(&beg, &end) && MOST_W_OPT) ch = '\\'; else ch =
V '$';
X!          `20
X            len = end - beg + 1;
X            if (len > MAX_LINE_LEN)
X              `7B
X--- 418,428 -----
X      */
X      if (!MOST_B_OPT)
X        `7B
X!           /*
X!           **  fetch beginning and end of line
X!           **  and set the right margin character
X!           */
X!           if(extract_line(&beg, &end) && MOST_W_OPT) ch = '\\'; else ch =
V '>';
X            len = end - beg + 1;
X            /*
X            **  if line is too long
X**************
X*** 296,301
X            if(extract_line(&beg, &end) && MOST_W_OPT) ch = '\\'; else ch =
V '$';
X           `20
X            len = end - beg + 1;
X            if (len > MAX_LINE_LEN)
X              `7B
X                  v = MOST_V_OPT;
X--- 424,433 -----
X            */
X            if(extract_line(&beg, &end) && MOST_W_OPT) ch = '\\'; else ch =
V '>';
X            len = end - beg + 1;
X+           /*
X+           **  if line is too long
X+           **  set Verbose and display of tabs
X+           */
X            if (len > MAX_LINE_LEN)
X              `7B
X                  v = MOST_V_OPT;
X**************
X*** 304,309
X                  MOST_T_OPT = 1;
X                  line = (char *) beg;
X              `7D
X            else len = analyse_line(beg, end, line, attr);
X        `7D
X      else
X--- 436,444 -----
X                  MOST_T_OPT = 1;
X                  line = (char *) beg;
X              `7D
X+           /*
X+           **  else have line analyzed for character display attributes
X+           */
X            else len = analyse_line(beg, end, line, attr);
X        `7D
X      /*
X**************
X*** 306,311
X              `7D
X            else len = analyse_line(beg, end, line, attr);
X        `7D
X      else
X        `7B
X            ch = '$';
X--- 441,449 -----
X            */
X            else len = analyse_line(beg, end, line, attr);
X        `7D
X+     /*
X+     **  binary line
X+     */
X      else
X        `7B
X            ch = '$';
X**************
X*** 319,324
X            i = 0; while(i<80) attr`5Bi++`5D = ' ';
X        `7D
X     `20
X      output(line,len,attr, ch);
X      if (len > MAX_LINE_LEN)
X        `7B
X--- 457,465 -----
X            i = 0; while(i<80) attr`5Bi++`5D = ' ';
X        `7D
X     `20
X+     /*
X+     **  call the output function
X+     */
X      output(line,len,attr, ch);
X `20
X      /*
X**************
X*** 320,325
X        `7D
X     `20
X      output(line,len,attr, ch);
X      if (len > MAX_LINE_LEN)
X        `7B
X            MOST_V_OPT = v;
X--- 461,470 -----
X      **  call the output function
X      */
X      output(line,len,attr, ch);
X+`20
X+     /*
X+     **  restore Verbose and tab display options for too-long ASCII lines
X+     */
X      if (len > MAX_LINE_LEN)
X        `7B
X            MOST_V_OPT = v;
X**************
X*** 328,335
X  `7D
X `20
X `20
X! /* given a position in a line, return apparant distance from bol
X!    expanding tabs, etc... up to pos */
X  int apparant_distance(unsigned char *pos)
X  `7B
X      int i;
X--- 473,482 -----
X  `7D
X `20
X `20
X! /*
X! **  given a position in a line, return apparant distance from bol
X! **  expanding tabs, etc... up to pos
X! */
X  int apparant_distance(unsigned char *pos)
X  `7B
X      int i;
X**************
X*** 334,339
X  `7B
X      int i;
X      unsigned char *cur_pos, *save_pos, ch;
X      cur_pos = C_POS;
X      save_pos = pos;
X      C_POS = pos;
X--- 481,487 -----
X  `7B
X      int i;
X      unsigned char *cur_pos, *save_pos, ch;
X+`20
X      cur_pos = C_POS;
X      save_pos = pos;
X      C_POS = pos;
X**************
X*** 343,348
X      i = 1;
X      while(ch = *pos, pos++ < save_pos)
X        `7B
X            if (!MOST_V_OPT && ch == '\b')
X              `7B
X                  if (i > 1) i--;
X--- 491,499 -----
X      i = 1;
X      while(ch = *pos, pos++ < save_pos)
X        `7B
X+           /*
X+           **  `5EH (underline/overstrike character)
X+           */
X            if (!MOST_V_OPT && ch == '\b')
X              `7B
X                  if (i > 1) i--;
X**************
X*** 347,353
X              `7B
X                  if (i > 1) i--;
X              `7D
X!           else if (!MOST_V_OPT && ch == '\015') /* `5EM */
X              `7B
X                  if (i != 1) i = 1;
X              `7D
X--- 498,507 -----
X              `7B
X                  if (i > 1) i--;
X              `7D
X!           /*
X!           **  `5EM (overstrike line)
X!           */
X!           else if (!MOST_V_OPT && ch == '\015')
X              `7B
X                  if (i != 1) i = 1;
X              `7D
X**************
X*** 351,357
X              `7B
X                  if (i != 1) i = 1;
X              `7D
X!           else if (!MOST_T_OPT && ch == '\t')
X              `7B
X                  i = 8 * ((i - 1)/8 + 1) + 1;  /* 8 column tabs */
X              `7D
X--- 505,514 -----
X              `7B
X                  if (i != 1) i = 1;
X              `7D
X!           /*
X!           **  `5EI (8 column tabs)
X!           */
X!           else if (ch == '\t' && (!MOST_T_OPT `7C`7C !MOST_V_OPT))
X              `7B
X                  i = 8 * ((i - 1)/8 + 1) + 1;
X              `7D
X**************
X*** 353,359
X              `7D
X            else if (!MOST_T_OPT && ch == '\t')
X              `7B
X!                 i = 8 * ((i - 1)/8 + 1) + 1;  /* 8 column tabs */
X              `7D
X            else if (ch < ' ' `7C`7C ch > 126)
X              `7B
X--- 510,516 -----
X            */
X            else if (ch == '\t' && (!MOST_T_OPT `7C`7C !MOST_V_OPT))
X              `7B
X!                 i = 8 * ((i - 1)/8 + 1) + 1;
X              `7D
X            /*
X            **  other control chars
X**************
X*** 355,360
X              `7B
X                  i = 8 * ((i - 1)/8 + 1) + 1;  /* 8 column tabs */
X              `7D
X            else if (ch < ' ' `7C`7C ch > 126)
X              `7B
X                  if (ch == '\012' `7C`7C MOST_V_OPT)  /* `5EL */
X--- 512,520 -----
X              `7B
X                  i = 8 * ((i - 1)/8 + 1) + 1;
X              `7D
X+           /*
X+           **  other control chars
X+           */
X            else if (ch < ' ' `7C`7C ch > 126)
X              `7B
X                  /*
X**************
X*** 357,363
X              `7D
X            else if (ch < ' ' `7C`7C ch > 126)
X              `7B
X!                 if (ch == '\012' `7C`7C MOST_V_OPT)  /* `5EL */
X                    `7B
X                        i += 2;
X                    `7D             /* otherwise they have no width */
X--- 517,528 -----
X            */
X            else if (ch < ' ' `7C`7C ch > 126)
X              `7B
X!                 /*
X!                 **  `5EL (linefeed) and `5EG (bell) are always
X!                 **        displayed (as reverse video ch)
X!                 **  otherwise control chars have no width
X!                 */
X!                 if (ch == '\014' `7C`7C ch == '\007' `7C`7C MOST_V_OPT)
X                    `7B
X                        i++;
X                    `7D
X**************
X*** 359,366
X              `7B
X                  if (ch == '\012' `7C`7C MOST_V_OPT)  /* `5EL */
X                    `7B
X!                       i += 2;
X!                   `7D             /* otherwise they have no width */
X              `7D
X            else i++;
X        `7D
X--- 524,531 -----
X                  */
X                  if (ch == '\014' `7C`7C ch == '\007' `7C`7C MOST_V_OPT)
X                    `7B
X!                       i++;
X!                   `7D
X              `7D
X            /*
X            **  text character
X**************
X*** 362,367
X                        i += 2;
X                    `7D             /* otherwise they have no width */
X              `7D
X            else i++;
X        `7D
X      return (i);
X--- 527,535 -----
X                        i++;
X                    `7D
X              `7D
X+           /*
X+           **  text character
X+           */
X            else i++;
X        `7D
X      return (i);
X**************
X*** 366,371
X        `7D
X      return (i);
X  `7D
X-`20
X `20
X `20
X--- 534,538 -----
X        `7D
X      return (i);
X  `7D
X `20
X `20
$ CALL UNPACK LINE_C.PAT;363 1947226983
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dlink_v5.com;1
X--- disk$disk1:`5Bflowers.swing.src`5Dlink_v5.com;4
X**************
X*** 9,14
X  `09OBJ:swing.olb/lib/inc=swing,SRC:options_file/opt
X  $ purge EXE:cswing.exe/keep=1/nolog
X  $ purge OBJ:*.obj/keep=1/nolog
X  $ delete OBJ:swing.olb.*/nolog
X  $!
X  $ dir/siz/date EXE:Cswing.exe
X--- 9,18 -----
X  `09OBJ:swing.olb/lib/inc=swing,SRC:options_file/opt
X  $ purge EXE:cswing.exe/keep=1/nolog
X  $ purge OBJ:*.obj/keep=1/nolog
X+ $ cc/opt/nodebug/nolist/object=`5B.obj`5D  main
X+ $ link/nouserlib/nodebug/traceback/nomap/exe=EXE:most.exe -
X+         OBJ:main,OBJ:swing.olb/lib,SRC:most_options/opt
X+ $ delete/nolog OBJ:main.obj;
X  $ delete OBJ:swing.olb.*/nolog
X  $!
X  $ dir/siz/date EXE:Cswing.exe,Most.exe
X**************
X*** 11,15
X  $ purge OBJ:*.obj/keep=1/nolog
X  $ delete OBJ:swing.olb.*/nolog
X  $!
X! $ dir/siz/date EXE:Cswing.exe
X  $ set nover
X--- 15,19 -----
X  $ delete/nolog OBJ:main.obj;
X  $ delete OBJ:swing.olb.*/nolog
X  $!
X! $ dir/siz/date EXE:Cswing.exe,Most.exe
X  $ set nover
$ CALL UNPACK LINK_V5_COM.PAT;363 508236739
$ create 'f'
X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dmain.c;1
X--- disk$disk1:`5Bflowers.swing.src`5Dmain.c;2
X**************
X*** 1,5
X! #define __MOST_VERSION__ "3.02"
X! #define __MOST_USAGE__ "most `5B-bstvw`5D `5B+line`5D `5B+/string`5D `5B+`
V5BC`5D`5BD`5D`5D filename"
X  /*
X  ** == Changes from original 3.01 to my 3.02 by Harry Flowers 08 Apr 1992 =
V=
X  **
X--- 1,5 -----
X! #define __MOST_VERSION__ "3.02FM"
X! #define __MOST_USAGE__ "most `5B-bcklstvw`5D `5B+line`5D `5B+/string`5D `5
VB+d`5D filename `5Bfilename ...`5D"
X  /*
X  ** == Changes from original 3.01 to my 3.02 by Harry Flowers 08 Apr 1992 =
V=
X  **
X**************
X*** 11,16
X  **      the search in reverse direction (makes sense since the forwardslas
Vh
X  **      "/" does a search in the forward direction).
X  **
X  **      `5BThis is the prominent modification notice required; see below.`
V5D
X  */
X  /*
X--- 11,63 -----
X  **      the search in reverse direction (makes sense since the forwardslas
Vh
X  **      "/" does a search in the forward direction).
X  **
X+ ** == Changes from Harry's 3.02 to 3.02FM by Foteos Macrides 10-Oct-1992 =
V=
X+ **
X+ **  Created standalone and "for CSWING" compatible code.  For the standalo
Vne,
X+ **      compile main.c without VMS_V5 defined, then link/exec=most.exe tha
Vt
X+ **      object with those in the CSWING library which did have VMS_V5 defi
Vned.
X+ **      All quit/exit handling after a widow has been displayed is now don
Ve in
X+ **      exit_cmd().  For the standalone, on exit the system prompt appears
V in
X+ **      the most_message space, i.e., there is no scrolling due to a carri
Vage
X+ **      return and everything which was displayed before the exit can stil
Vl be
X+ **      seen.
X+ **  Implemented reading of MOST_SWITCHES and MOST_EDITOR logicals, if defi
Vned,
X+ **      in the "for CSWING" code.
X+ **  Changed command keys to be the same or homologous to those of CSWING a
Vnd
X+ **      documented all commands in the quick help screen.
X+ **  Also modified SWING_8.C and SWING_38.C so that you can call MOST with
V a
X+ **      set of "selected" files and use all its windowing features.
X+ **  Added lots of informative most_messages.
X+ **  Implemented spawning if not captive, with an appropriate message other
Vwise.
X+ **      Spawned editors are now available as in CSWING.  If MOST_EDITOR is
V not
X+ **      defined, the editor defined in CSWING will be used, and if that's
V not
X+ **      defined either, an "editor not defined" most_message will be issue
Vd.
X+ **      EDT is still the default editor for the standalone.
X+ **  Renamed some switches and toggles so that switches are all MOST_ch_OPT
X+ **      and toggles have informative names.  Made case-sensitivity of sear
Vches
X+ **      a regular (-c) rather than extended (+c) switch.  Eliminated any c
Vase-
X+ **      sensitivity for switch, toggle, or command letter throughout the
X+ **      program.
X+ **  If a new file is fetched from within MOST (`5EKG), it is now added to
V the
X+ **      ring buffer, along with those from the command line or CSWING call
V.
X+ **  Replaced the $ with reversed video > as the indicator of "more to the
X+ **      right" and modified to maintain a full screen width to the > even
V if
X+ **      non-printing control characters or escape sequences are present.
X+ **      Replaced `5Ech with reversed-ch as the indicator of control charac
Vters
X+ **      in Verbose ASCII mode (`5Ech is still used in binary mode).  Cntrl
V-L
X+ **      (linefeed) and cntrl-G (bell) are always displayed rather than act
Ved
X+ **      on in ASCII mode.
X+ **  Replaced the \ with reversed video \ as the indicator of position 80 o
Vr
X+ **      132 in Wrap mode.  If non-printing control characters or escape
X+ **      sequences are present, the reversed-\ still stays on the 80th or 1
V32nd
X+ **      character, rather than filling the line to the 80th or 132nd scree
Vn
X+ **      column (i.e., such lines are short).  You can then toggle to Verbo
Vse
X+ **      mode (:O v) to see what the non-printing characters are, without a
X+ **      change in the wrapping positions (still screws up badly in Wrap mo
Vde
X+ **      if bolding of line was intended via `5EM; improved but did not per
Vfect
X+ **      handling of bolded or underlined characters via `5EH in Wrap mode)
V.
X+ **  Provided a MOST.DOC_FM with the switch/command changes documented.
X+ **
X  **      `5BThis is the prominent modification notice required; see below.`
V5D
X  */
X  /*
X**************
X*** 118,126
X  #include "sysdep.h"
X  #include "most.h"
X `20
X! int MOST_K_OPT = 0;    /* Display 8 bit unformatted (Kanji) */
X! int  CASE_SENSITIVE, STARTING_LINE;
X! char SEARCH_STR`5B80`5D;
X `20
X `20
X  #ifdef VMS
X--- 165,185 -----
X  #include "sysdep.h"
X  #include "most.h"
X `20
X! int MOST_A_OPT      = 0;     /* automatically choose -b if necessary
V         */
X! int MOST_B_OPT      = 0;     /* display binary File
V                          */
X! int MOST_C_OPT      = 0;     /* case-sensitive searches
V                      */
X! int MOST_D_OPT      = 0;     /* delete file mode  (see ':D')
V                 */
X! int MOST_K_OPT      = 0;     /* display 8 bit unformatted (Kanji)
V            */
X! int MOST_L_OPT      = 0;     /* use `5EL (formfeed) to clear screen
V            */
X! int MOST_S_OPT      = 0;     /* squeeze multiple blank lines to one
V          */
X! int MOST_T_OPT      = 0;     /* display tab as `5EI-- valid only with V op
Vtion */
X! int MOST_V_OPT      = 0;     /* display control chars
V                        */
X! int MOST_W_OPT      = 0;     /* wrap lines
V                                   */
X! int STARTING_LINE   = 1;     /* starting line for initial display
V            */
X! int SEARCH_DIR      = 1;     /* for toggling direction of string searches
V    */
X! char SEARCH_STR`5B80`5D = '\0';  /* for setting starting line based on a s
Vtring  */
X! int SELECTIVE_I_DISPLAY = 0; /* selective indentation display
V                */
X! int NEXT_RING_FILE  = 1;     /* for cycling through file ring
V                */
X `20
X  #ifdef VMS
X  #ifndef isalpha
X**************
X*** 122,128
X  int  CASE_SENSITIVE, STARTING_LINE;
X  char SEARCH_STR`5B80`5D;
X `20
X-`20
X  #ifdef VMS
X  #ifndef isalpha
X  #define isalpha(x) \
X--- 181,186 -----
X  int SELECTIVE_I_DISPLAY = 0; /* selective indentation display
V                */
X  int NEXT_RING_FILE  = 1;     /* for cycling through file ring
V                */
X `20
X  #ifdef VMS
X  #ifndef isalpha
X  #define isalpha(x) \
X**************
X*** 155,163
X        `7B
X            while (isalpha(ch))
X              `7B
X!                 if ((ch == 'C') `7C`7C (ch == 'c'))
X!                   CASE_SENSITIVE = 1;
X!                 else if ((ch == 'D') `7C`7C (ch == 'd'))
X                    MOST_D_OPT = 1;   /* delete file mode */
X                  ch = *(++str);
X              `7D
X--- 213,219 -----
X        `7B
X            while (isalpha(ch))
X              `7B
X!                 if ((ch == 'D') `7C`7C (ch == 'd'))
X                    MOST_D_OPT = 1;   /* delete file mode */
X                  ch = *(++str);
X              `7D
X**************
X*** 182,190
X                case 'a':
X                case 'A':
X                  MOST_A_OPT = 1; break;  /* check to see if file is binary
V */
X!               case 's':
X!               case 'S':
X!                 SQUEEZE_LINES = 1; break;
X                case 'c':
X                case 'C':
X                  MOST_C_OPT = 1; break;
X--- 238,246 -----
X                case 'a':
X                case 'A':
X                  MOST_A_OPT = 1; break;  /* check to see if file is binary
V */
X!               case 'b':
X!               case 'B':
X!                 MOST_B_OPT = 1; break;  /* binary display 8 bit */
X                case 'c':
X                case 'C':
X                  MOST_C_OPT = 1; break;  /* case-sensitive searches */
X**************
X*** 187,199
X                  SQUEEZE_LINES = 1; break;
X                case 'c':
X                case 'C':
X!                 MOST_C_OPT = 1; break;
X!               case 'V':
X!               case 'v':
X!                 MOST_V_OPT = 1;  /* verbose-- convert control chars to '`5
VE' 'ch' */
X!                 break;
X!               case 'W':
X!               case 'w':  MOST_W_OPT = 1; break;
X                case 'K':
X                case 'k':  MOST_K_OPT = 1; break;
X                case 'B':
X--- 243,250 -----
X                  MOST_B_OPT = 1; break;  /* binary display 8 bit */
X                case 'c':
X                case 'C':
X!                 MOST_C_OPT = 1; break;  /* case-sensitive searches */
X!               case 'k':
X                case 'K':
X  `09        MOST_K_OPT = 1; break;  /* display 8 bit unformatted (Kanji) */
X                case 'l':
X**************
X*** 195,210
X                case 'W':
X                case 'w':  MOST_W_OPT = 1; break;
X                case 'K':
X!               case 'k':  MOST_K_OPT = 1; break;
X!               case 'B':
X!               case 'b':
X!                 MOST_B_OPT = 1;  /* Binary display 8 bit */
X!                 break;
X!               case 't':
X!               case 'T': /* expand tabs to '`5EI'; meaningful only with 'v'
V */
X!                 MOST_T_OPT = 1;
X!                 break;
X!               case 'L':
X                case 'l':
X                  MOST_L_OPT = 1;  /* use `5EL to clear screen */
X                  break;
X--- 246,252 -----
X                  MOST_C_OPT = 1; break;  /* case-sensitive searches */
X                case 'k':
X                case 'K':
X! `09        MOST_K_OPT = 1; break;  /* display 8 bit unformatted (Kanji) */
X                case 'l':
X                case 'L':
X                  MOST_L_OPT = 1; break;  /* use `5EL to clear screen */
X**************
X*** 206,213
X                  break;
X                case 'L':
X                case 'l':
X!                 MOST_L_OPT = 1;  /* use `5EL to clear screen */
X!                 break;
X              `7D
X        `7D
X  `7D
X--- 248,270 -----
X                case 'K':
X  `09        MOST_K_OPT = 1; break;  /* display 8 bit unformatted (Kanji) */
X                case 'l':
X!               case 'L':
X!                 MOST_L_OPT = 1; break;  /* use `5EL to clear screen */
X!               case 's':
X!               case 'S':
X!                 MOST_S_OPT = 1; break;  /* replace multiple blank lines
X!                                            with one blank line */
X!               case 't':
X!               case 'T':
X!                 MOST_T_OPT = 1; break;  /* display tabs as `5EI--
X! `09`09                           meaningful only with 'v' */
X!               case 'v':
X!               case 'V':
X!                 MOST_V_OPT = 1; break;  /* verbose--
X!                                            display control chars as `5Ech
V */
X!               case 'w':
X!               case 'W':
X! `09        MOST_W_OPT = 1; break;  /* wrap long lines in display */
X              `7D
X        `7D
X  `7D
X**************
X*** 212,218
X        `7D
X  `7D
X    `20
X! int most_main(int argc, char *argv`5B`5D)
X  `7B
X      int fp;
X      char file`5B80`5D,ch, *switches,outstr`5B180`5D, *curr_file,filename`5
VB80`5D;
X--- 269,289 -----
X        `7D
X  `7D
X    `20
X!`20
X! #ifndef VMS_V5  /*** Code for standalone version ***/
X! /*
X! **  Definition of editor used if MOST_EDITOR not defined
X! **  (presently VMS-specific, defaults to EDT)
X! */
X! globaldef char editor_defn`5B41`5D = "EDT";
X!`20
X! /*
X! **  Definition for captive accounts
X! **  make it = 1 to prohibit spawns
X! */
X! globaldef int captive = 0;
X!`20
X! int main(int argc, char *argv`5B`5D)
X  `7B
X      char file`5B80`5D, *switches, filename`5B80`5D;
X      int quit,i,piped,a_opt, j;
X**************
X*** 214,221
X    `20
X  int most_main(int argc, char *argv`5B`5D)
X  `7B
X!     int fp;
X!     char file`5B80`5D,ch, *switches,outstr`5B180`5D, *curr_file,filename`5
VB80`5D;
X      int quit,i,piped,a_opt, j;
X      unsigned long context;
X      extern char *getenv(char *);
X--- 285,291 -----
X `20
X  int main(int argc, char *argv`5B`5D)
X  `7B
X!     char file`5B80`5D, *switches, filename`5B80`5D;
X      int quit,i,piped,a_opt, j;
X      unsigned long context;
X      extern char *getenv(char *);
X**************
X*** 220,226
X      unsigned long context;
X      extern char *getenv(char *);
X      extern int isatty(int);
X-     extern void sysinit(void);
X `20
X      piped = 0;
X      switches = getenv("MOST_SWITCHES");
X--- 290,295 -----
X      unsigned long context;
X      extern char *getenv(char *);
X      extern int isatty(int);
X `20
X      piped = 0;
X      switches = getenv("MOST_SWITCHES");
X**************
X*** 239,245
X                  else quit = 1;
X              `7D
X        `7D
X-`20
X     `20
X      if (i == argc)
X        `7B
X--- 308,313 -----
X                  else quit = 1;
X              `7D
X        `7D
X     `20
X      if (i == argc)
X        `7B
X**************
X*** 245,252
X        `7B
X            if (isatty(0))   /* 1 if stdin is a terminal, 0 otherwise */
X              `7B
X!                 fprintf(stderr,"MOST(%s) Usage: %s\n",MOST_VERSION,__MOST_
VUSAGE__);
X!                         /* exit(0); */ return(0);
X              `7D
X            /* assume input is from stdin */
X            file`5B0`5D = '\0';  /* tells most this is stdin */
X--- 313,323 -----
X        `7B
X            if (isatty(0))   /* 1 if stdin is a terminal, 0 otherwise */
X              `7B
X!                 fprintf(stderr,
X!                         "MOST(%s)\n  Usage: %s\n",
X!                         MOST_VERSION,
X!                         __MOST_USAGE__);
X!                         exit(0);
X              `7D
X            /* assume input is from stdin */
X            file`5B0`5D = '\0';  /* tells most this is stdin */
X**************
X*** 272,278
X              `7B
X                  if (argv`5Bi`5D`5B0`5D == '.') strcpy(file,"*"); else *fil
Ve = 0;
X                  strcat(file,unix2vms(argv`5Bi++`5D));
X!                 while (expand_file_name("SYS$DISK:`5B`5D*.*",file,filename
V,&context))
X                    `7B
X                        FILE_RING`5BNUM_FILES`5D = (char*) malloc(strlen(fil
Vename) + 1);
+-+-+-+-+-+-+-+-  END  OF PART 4 +-+-+-+-+-+-+-+-
Technical Details
Message-ID: <8880499@MVB.SAIC.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!mrccrc!doc.ic.ac.uk!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!arizona.edu!mvb.saic.com!vmsnet-sources

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!mrccrc!doc.ic.ac.uk!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!arizona.edu!mvb.saic.com!vmsnet-sources
Newsgroups: vmsnet.sources
Subject: C Swing v3.6.3 patches, part 04/07
Message-ID: <8880499@MVB.SAIC.COM>
From: flowers@memstvx1.memst.edu
Date: Thu, 29 Oct 1992 17:42:02 GMT
Organization: Memphis State University
Approved: Mark.Berryman@Mvb.Saic.Com
Lines: 1627