fputc(s[i], file);
else {
if (max - i > 3) {
- fprintf(file, "\\%03o", s[i]);
+ fprintf(file, "\\%03o", (unsigned char)s[i]);
i += 3; /* 4 printed, but i counts one */
} else
return max - i;
fputc(strs[0][i], file);
else {
if (max-(n+i) > 3) {
- fprintf(file, "\\%03o", strs[0][i]);
+ fprintf(file, "\\%03o", (unsigned char)strs[0][i]);
n += 3; /* 4 printed, but i counts one */
} else
return max - n;
#include <time.h>
#include <unistd.h>
#include <utmp.h>
-/* #include <sys/param.h>*/ /* for HZ */
+#include <locale.h>
static int ignoreuser = 0; /* for '-u' */
static proc_t **procs; /* our snapshot of the process table */
from = 0;
#endif
+ setlocale(LC_ALL, "");
for (args=0; (ch = getopt(argc, argv, "hlusfV")) != EOF; args++)
switch (ch) {
case 'h': header = 0; break;