Subversion Repositories SvarDOS

Rev

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

Rev 469 Rev 470
Line 521... Line 521...
521
 
521
 
522
/* fetches a line from batch file and write it to buff, increments
522
/* fetches a line from batch file and write it to buff, increments
523
 * rmod counter on success. returns NULL on failure.
523
 * rmod counter on success. returns NULL on failure.
524
 * buff must start with a length byte but the returned pointer must
524
 * buff must start with a length byte but the returned pointer must
525
 * skip it. */
525
 * skip it. */
526
char far *getbatcmd(char far *buff, struct rmod_props far *rmod) {
526
static char far *getbatcmd(char *buff, struct rmod_props far *rmod) {
527
  unsigned short i;
527
  unsigned short i;
528
  buff++; /* make room for the len byte */
528
  buff++; /* make room for the len byte */
529
  /* TODO temporary hack to display a dummy message */
529
  /* TODO temporary hack to display a dummy message */
530
  if (rmod->batnextline == 0) {
530
  if (rmod->batnextline == 0) {
531
    char *msg = "ECHO batch files not supported yet";
531
    char *msg = "ECHO batch files not supported yet";
Line 541... Line 541...
541
  /* copy line to buff */
541
  /* copy line to buff */
542
  /* close file */
542
  /* close file */
543
  /* */
543
  /* */
544
  rmod->batnextline++;
544
  rmod->batnextline++;
545
  if (rmod->batnextline == 0) rmod->batfile[0] = 0; /* max line count reached */
545
  if (rmod->batnextline == 0) rmod->batfile[0] = 0; /* max line count reached */
-
 
546
 
-
 
547
  /* output command on screen if echo on */
-
 
548
  if (rmod->echoflag != 0) outputnl(buff);
-
 
549
 
546
  return(buff);
550
  return(buff);
547
}
551
}
548
 
552
 
549
 
553
 
550
int main(void) {
554
int main(void) {