Subversion Repositories SvarDOS

Rev

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

Rev 389 Rev 390
Line 23... Line 23...
23
 
23
 
24
static int cmd_dir(struct cmd_funcparam *p) {
24
static int cmd_dir(struct cmd_funcparam *p) {
25
  const char *filespecptr = "*.*";
25
  const char *filespecptr = "*.*";
26
  struct DTA *dta = (void *)0x80; /* set DTA to its default location at 80h in PSP */
26
  struct DTA *dta = (void *)0x80; /* set DTA to its default location at 80h in PSP */
27
 
27
 
-
 
28
  if (cmd_ishlp(p)) {
-
 
29
    outputnl("Displays a list of files and subdirectories in a directory.");
-
 
30
    outputnl("\r\nTHIS COMMAND IS NOT FULLY IMPLEMENTED YET");
-
 
31
    return(-1);
-
 
32
  }
-
 
33
 
28
  if (findfirst(dta, filespecptr, DOS_ATTR_RO | DOS_ATTR_HID | DOS_ATTR_SYS | DOS_ATTR_DIR | DOS_ATTR_ARC) != 0) return(-1);
34
  if (findfirst(dta, filespecptr, DOS_ATTR_RO | DOS_ATTR_HID | DOS_ATTR_SYS | DOS_ATTR_DIR | DOS_ATTR_ARC) != 0) return(-1);
29
 
35
 
30
  outputnl(dta->fname);
36
  outputnl(dta->fname);
31
 
37
 
32
  while (findnext(dta) == 0) outputnl(dta->fname);
38
  while (findnext(dta) == 0) outputnl(dta->fname);