search for: cmdpos

Displaying 3 results from an estimated 3 matches for "cmdpos".

2009 Feb 15
2
COM32 module: Read-Only shell
...wdstr); +} /* rosh_1 */ + +/* Concatenate multiple files to stdout + * cmdstr command string to process + * pwdstr Present Working Directory string + */ +void rosh_cat(const char *cmdstr, const char *pwdstr) +{ + FILE *f; + char filestr[ROSH_PATH_SZ + 1]; + char buf[ROSH_BUF_SZ]; + int numrd; + int cmdpos; + + ROSH_DEBUG("CMD: '%s'\npwd: '%s'\n", cmdstr, pwdstr); + /* Initialization */ + filestr[0] = 0; + cmdpos = 0; + /* skip the first word */ + cmdpos = rosh_parse_sp_1(filestr, cmdstr, cmdpos); + cmdpos = rosh_parse_sp_1(filestr, cmdstr, cmdpos); + while (strlen(filestr)...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...nd string to process - * pwdstr Present Working Directory string */ -void rosh_cat(const char *cmdstr, const char *pwdstr) +void rosh_cat(const char *cmdstr) { FILE *f; - char filestr[ROSH_PATH_SZ + 1]; + char filestr[ROSH_PATH_SZ]; char buf[ROSH_BUF_SZ]; int numrd; int cmdpos; - ROSH_DEBUG("CMD: '%s'\npwd: '%s'\n", cmdstr, pwdstr); + ROSH_DEBUG("CMD: '%s'\n", cmdstr); /* Initialization */ filestr[0] = 0; cmdpos = 0; @@ -306,6 +307,7 @@ void rosh_cat(const char *cmdstr, const char *pwdstr) fclose(f);...
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...NE){ + while (inc == KEY_NONE) inc = get_key(stdin, 6000); - } -// rosh_console_std(); return inc; } /* rosh_getkey */ @@ -297,6 +311,7 @@ void rosh_cat(const char *cmdstr, const char *pwdstr) fclose(f); } else { rosh_error(errno, "cat", filestr); + errno = 0; } cmdpos = rosh_parse_sp_1(filestr, cmdstr, cmdpos); } @@ -320,13 +335,14 @@ void rosh_cd(const char *cmdstr, char *pwdstr, const char *ipwdstr) /* skip the first word */ cmdpos = rosh_parse_sp_1(filestr, cmdstr, cmdpos); cmdpos = rosh_parse_sp_1(filestr, cmdstr, cmdpos); - ROSH_COM32(" -- cd (...