Subversion Repositories SvarDOS

Rev

Rev 2048 | Rev 2050 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2048 Rev 2049
Line 48... Line 48...
48
#include "stack.h"
48
#include "stack.h"
49
 
49
 
50
/* DOS disk accesses */
50
/* DOS disk accesses */
51
#include "dosdisk.h"
51
#include "dosdisk.h"
52
 
52
 
53
#include <conio.h>  /* for getch()   */
-
 
54
 
-
 
55
 
53
 
56
/* The default extended forms of the lines used. */
54
/* The default extended forms of the lines used. */
57
#define VERTBAR_STR  "\xB3   "                 /* |    */
55
#define VERTBAR_STR  "\xB3   "                 /* |    */
58
#define TBAR_HORZBAR_STR "\xC3\xC4\xC4\xC4"    /* +--- */
56
#define TBAR_HORZBAR_STR "\xC3\xC4\xC4\xC4"    /* +--- */
59
#define CBAR_HORZBAR_STR "\xC0\xC4\xC4\xC4"    /* \--- */
57
#define CBAR_HORZBAR_STR "\xC0\xC4\xC4\xC4"    /* \--- */
Line 172... Line 170...
172
"int 0x21" \
170
"int 0x21" \
173
modify [ah] \
171
modify [ah] \
174
value [al]
172
value [al]
175
 
173
 
176
 
174
 
-
 
175
/* waits for a keypress, flushes keyb buffer, returns nothing */
-
 
176
static void waitkey(void);
-
 
177
#pragma aux waitkey = \
-
 
178
"mov ah, 0x08" \
-
 
179
"int 0x21" \
-
 
180
/* flush keyb buffer in case it was an extended key */ \
-
 
181
"mov ax, 0x0C0B" \
-
 
182
"int 0x21" \
-
 
183
modify [ax]
-
 
184
 
-
 
185
 
177
#define FILE_TYPE_UNKNOWN 0x00
186
#define FILE_TYPE_UNKNOWN 0x00
178
#define FILE_TYPE_DISK    0x01
187
#define FILE_TYPE_DISK    0x01
179
#define FILE_TYPE_CHAR    0x02
188
#define FILE_TYPE_CHAR    0x02
180
#define FILE_TYPE_PIPE    0x03
189
#define FILE_TYPE_PIPE    0x03
181
#define FILE_TYPE_REMOTE  0x80
190
#define FILE_TYPE_REMOTE  0x80
Line 285... Line 294...
285
        printf("%s", l);
294
        printf("%s", l);
286
        l[cols-lineCol] = c;
295
        l[cols-lineCol] = c;
287
        l += cols-lineCol;
296
        l += cols-lineCol;
288
 
297
 
289
        lineCnt--;  lineCol = 0;
298
        lineCnt--;  lineCol = 0;
290
        if (!lineCnt) { lineCnt= rows;  fflush(NULL);  fprintf(stderr, "%s", pauseMsg);  getch(); }
299
        if (!lineCnt) { lineCnt= rows;  fflush(NULL);  fprintf(stderr, "%s", pauseMsg);  waitkey(); }
291
      }
300
      }
292
 
301
 
293
      printf("%s", l); /* print out this line */
302
      printf("%s", l); /* print out this line */
294
      *t = c;          /* restore value */
303
      *t = c;          /* restore value */
295
      l = t;           /* mark beginning of next line */
304
      l = t;           /* mark beginning of next line */
296
 
305
 
297
      lineCnt--;  lineCol = 0;
306
      lineCnt--;  lineCol = 0;
298
      if (!lineCnt) { lineCnt= rows;  fflush(NULL);  fprintf(stderr, "%s", pauseMsg);  getch(); }
307
      if (!lineCnt) { lineCnt= rows;  fflush(NULL);  fprintf(stderr, "%s", pauseMsg);  waitkey(); }
299
    }
308
    }
300
    printf("%s", l);   /* print rest of string that lacks newline */
309
    printf("%s", l);   /* print rest of string that lacks newline */
301
    lineCol = strlen(l);
310
    lineCol = strlen(l);
302
  }
311
  }
303
  else  /* NOPAUSE */
312
  else  /* NOPAUSE */