search for: file2po

Displaying 5 results from an estimated 5 matches for "file2po".

Did you mean: file2pos
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...ve the size of a file argument + * filestr directory name of directory entry + * de directory entry + */ +int rosh_ls_de_size(const char *filestr, struct dirent *de) +{ + int de_size; + +#ifdef __COM32__ + de_size = de->d_size; +#else /* __COM32__ */ + char filestr2[ROSH_PATH_SZ + 1]; + int fd2, file2pos; + struct stat fdstat; + int status; + + filestr2[0] = 0; + file2pos = -1; + if (filestr) { + file2pos = strlen(filestr); + memcpy(filestr2, filestr, file2pos); + filestr2[file2pos] = '/'; + } + strcpy(filestr2+file2pos+1, de->d_name); + fd2 = open(filestr2, O_RDONLY); + status = fst...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...+ optarr[2] = -1; + } +} /* rosh_ls_arg_opt */ + +/* Retrieve the size of a file argument + * filestr directory name of directory entry + * de directory entry + */ +int rosh_ls_de_size(const char *filestr, struct dirent *de) +{ + int de_size; + char filestr2[ROSH_PATH_SZ]; + int fd2, file2pos; + struct stat fdstat; + int status; + + filestr2[0] = 0; + file2pos = -1; + if (filestr) { + file2pos = strlen(filestr); + memcpy(filestr2, filestr, file2pos); + filestr2[file2pos] = '/'; + } + strcpy(filestr2 + file2pos + 1, de->d_name); + fd2 = open(filestr2,...
2009 Mar 06
4
rosh patch
...y\n", ifilstr); d = fdopendir(fd); - de = readdir(d); - while (de != NULL) { + while ( de = readdir(d) ) { #ifdef DO_DEBUG filestr2[0] = 0; file2pos = strlen(filestr); @@ -401,7 +400,6 @@ #ifdef DO_DEBUG // inchar = fgetc(stdin); #endif /* DO_DEBUG */ - de = readdir(d); } closedir(d); } else if (S_ISREG(fdstat.st_mode)) { @@ -419,8 +417,7 @@...
2009 Feb 15
2
COM32 module: Read-Only shell
...* pwdstr Present Working Directory string + */ +void rosh_dir_arg(const char *ifilstr, const char *pwdstr) +{ + struct stat fdstat; + int status; + int fd; + char filestr[ROSH_PATH_SZ + 1]; + int filepos; + DIR *d; + struct dirent *de; +#ifdef DO_DEBUG + char filestr2[ROSH_PATH_SZ + 1]; + int fd2, file2pos; +#ifdef __COM32__ +// int inchar; + char ty; +#endif /* __COM32__ */ +#endif /* DO_DEBUG */ + + /* Initialization; make filestr based on leading character of ifilstr + and pwdstr */ + if (ifilstr[0] == SEP) { + strcpy(filestr, ifilstr); + } else { + strcpy(filestr, pwdstr); + filepos = strle...
2009 Mar 07
3
rosh patch V2
Here is a second version of my patch from last night. It uses the provided ctype function isspace and does the same readdir(). I remove the rosh_issp() function. I admit to being a bit liberal with my use of braces and spaces. We all of the habit of knowing we can invent a more perfect wheel. Let me know if you have any questions. Keith -------------- next part -------------- A non-text