Displaying 6 results from an estimated 6 matches for "numrd".
Did you mean:
numad
2010 Mar 20
1
[MODULE] COM32 module to time null-dumping a file, v1.1
..., clock_t bc, clock_t
ec, int bufsz)
+{
+ printf(" %dB %dt %dx '%s'\n", bcnt, (int)(ec - bc), bufsz, fn);
+} /* void print_cp_result_simple(char *fn, int bcnt, clock_t bc, clock_t ec) */
+
+int time_copy(char *fn, char do_simple, int bufsz)
+{
+ int fd, rv = 0;
+ int bcnt;
+ int numrd;
+ struct tms tm;
+ clock_t bc, ec;
+ char buf[bufsz + 1];
+
+ buf[0] = 0;
+ fd = open(fn, O_RDONLY);
+ // | O_DIRECT leads to alignment issues that aren't easy to resolve
+ if (fd == -1) {
+ switch (errno){
+ case ENOENT :
+ printf("File '%s' does not exist\n", fn);
+...
2010 Mar 18
0
[MODULE] COM32 module to time null-dumping a file
...e(char *fn, int bcnt, clock_t bc, clock_t ec)
+{
+ printf(" %dB %dt %dx '%s'\n", bcnt, (int)(ec - bc), (BUFSZ), fn);
+} /* void print_cp_result_simple(char *fn, int bcnt, clock_t bc, clock_t ec) */
+
+int time_copy(char *fn, char do_simple)
+{
+ int fd, rv = 0;
+ int bcnt;
+ int numrd;
+ struct tms tm;
+ clock_t bc, ec;
+ char buf[BUFSZ + 1];
+ buf[0] = 0;
+ fd = open(fn, O_RDONLY);
+ if (fd == -1) {
+ switch (errno){
+ case ENOENT :
+ printf("File '%s' does not exist\n", fn);
+ break;
+ default :
+ printf("Error '%d' opening file ...
2014 Nov 22
3
Use z size specifier for printf-ing size_t variable
....c
index 0f5ffe6..315b9f9 100644
--- a/com32/modules/cptime.c
+++ b/com32/modules/cptime.c
@@ -216,7 +216,7 @@ int time_copy(char *fn, char do_simple, char do_verbose, size_t ibufsz, off_t ma
print_cp_result_long(fn, bcnt, bc, ec, ibufsz, do_verbose);
}
if (do_verbose)
- printf(" numrd %d bcnt %d bufsz %d i %d\n", numrd, bcnt, bufsz, i);
+ printf(" numrd %d bcnt %zd bufsz %zd i %d\n", numrd, bcnt, bufsz, i);
}
return rv;
} /* int time_copy(char *fn, char do_simple, int bufsz, off_t maxlen) */
diff --git a/com32/modules/pmload.c b/com32/modules/pmload.c
inde...
2015 Jan 25
0
Use z size specifier for printf-ing size_t variable
...-216,7 +216,7 @@ int time_copy(char *fn, char do_simple, char do_verbose, size_t ibufsz, off_t ma
> print_cp_result_long(fn, bcnt, bc, ec, ibufsz, do_verbose);
> }
> if (do_verbose)
> - printf(" numrd %d bcnt %d bufsz %d i %d\n", numrd, bcnt, bufsz, i);
> + printf(" numrd %d bcnt %zd bufsz %zd i %d\n", numrd, bcnt, bufsz, i);
> }
> return rv;
> } /* int time_copy(char *fn, char do_simple, int bufsz, off_t maxlen) */
> dif...
2009 Feb 15
2
COM32 module: Read-Only shell
...dstr, \
+ ipwdstr);
+} /* 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 (st...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...* cmdstr command 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)...