/svarcom/trunk/cmd/copy.c |
---|
55,7 → 55,8 |
char last_asciimode; /* /A or /B impacts the file preceding it and becomes the new default for all files that follow */ |
char verifyflag; |
char lastitemwasplus; |
char databuf[BUFFER_SIZE - 1024]; |
unsigned short databufsz; |
char databuf[1]; |
}; |
185,6 → 186,7 |
/* parse cmdline and fill the setup struct accordingly */ |
memset(setup, 0, sizeof(*setup)); |
setup->databufsz = p->BUFFERSZ - sizeof(*setup); |
for (i = 0; i < p->argc; i++) { |
341,7 → 343,8 |
} |
outputnl(setup->dst); |
t = cmd_copy_internal(setup->dst, 0, setup->databuf, 0, appendflag, setup->databuf, sizeof(setup->databuf)); |
// TODO: reusing setup->databuf not good idea: when 2+ files are being copied, the content of the first one overwrites the pathname of the second one! |
t = cmd_copy_internal(setup->dst, 0, setup->databuf, 0, appendflag, setup->databuf, setup->databufsz); |
if (t != 0) { |
outputnl(doserr(t)); |
return(-1); |
/svarcom/trunk/cmd/date.c |
---|
132,7 → 132,7 |
static int cmd_date(struct cmd_funcparam *p) { |
struct nls_patterns *nls = (void *)(p->BUFFER); |
char *buff = p->BUFFER + (BUFFER_SIZE / 2); |
char *buff = p->BUFFER + sizeof(*nls); |
unsigned short i; |
unsigned short year = 0; |
unsigned char mo, dy; |
/svarcom/trunk/cmd/dir.c |
---|
106,8 → 106,8 |
unsigned short availrows; /* counter of available rows on display (used for /P) */ |
unsigned short wcols = screen_getwidth() / WCOLWIDTH; /* number of columns in wide mode */ |
unsigned char wcolcount; |
struct nls_patterns *nls = (void *)(p->BUFFER + (BUFFER_SIZE / 3)); |
char *buff2 = p->BUFFER + (BUFFER_SIZE / 3 * 2); |
struct nls_patterns *nls = (void *)(p->BUFFER + (p->BUFFERSZ / 2)); |
char *buff2 = p->BUFFER + (p->BUFFERSZ / 2) + sizeof(*nls); |
unsigned long summary_fcount = 0; |
unsigned long summary_totsz = 0; |
unsigned char drv = 0; |
/svarcom/trunk/cmd/rename.c |
---|
28,9 → 28,9 |
static int cmd_rename(struct cmd_funcparam *p) { |
char *src = p->BUFFER; |
char *dst = p->BUFFER + (BUFFER_SIZE / 4); |
char *buff1 = p->BUFFER + (BUFFER_SIZE / 4 * 2); |
char *buff2 = p->BUFFER + (BUFFER_SIZE / 4 * 3); |
char *dst = p->BUFFER + 256; |
char *buff1 = p->BUFFER + 512; |
char *buff2 = p->BUFFER + 1024; |
unsigned short i, fnameoffset; |
struct DTA *dta = (void *)0x80; /* use default DTA in PSP */ |
/svarcom/trunk/cmd/time.c |
---|
136,7 → 136,7 |
static int cmd_time(struct cmd_funcparam *p) { |
struct nls_patterns *nls = (void *)(p->BUFFER); |
char *buff = p->BUFFER + (BUFFER_SIZE / 2); |
char *buff = p->BUFFER + sizeof(*nls); |
unsigned short i; |
signed char ho = -1, mi = -1, se = -1; |