Subversion Repositories SvarDOS

Rev

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

Rev 410 Rev 415
Line 340... Line 340...
340
    mov bx, [r]
340
    mov bx, [r]
341
    mov [bx], cx
341
    mov [bx], cx
342
  }
342
  }
343
  return(err);
343
  return(err);
344
}
344
}
-
 
345
 
-
 
346
 
-
 
347
/* appends a backslash if path is a directory
-
 
348
 * returns the (possibly updated) length of path */
-
 
349
unsigned short path_appendbkslash_if_dir(char *path) {
-
 
350
  unsigned short len;
-
 
351
  int attr;
-
 
352
  for (len = 0; path[len] != 0; len++);
-
 
353
  if (len == 0) return(0);
-
 
354
  if (path[len - 1] == '\\') return(len);
-
 
355
  /* */
-
 
356
  attr = file_getattr(path);
-
 
357
  if ((attr > 0) && (attr & DOS_ATTR_DIR)) {
-
 
358
    path[len++] = '\\';
-
 
359
    path[len] = 0;
-
 
360
  }
-
 
361
  return(len);
-
 
362
}