/* #includes */ /*{{{C}}}*//*{{{*/
+#include "config.h"
+
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "config.h"
+
#include "getopt.h"
#include "cpmfs.h"
+
+#ifdef USE_DMALLOC
+#include <dmalloc.h>
+#endif
/*}}}*/
/* variables */ /*{{{*/
{
for (i=l=0; i<entries; ++i)
{
- if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%33)
+ if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%10)
{
if (announce==1)
{
for (; k<3; ++k) putchar(' ');
++l;
}
- if (l && (l%4)==0) putchar('\n');
+ if (l && (l%4)==0) {
+ l = 0;
+ putchar('\n');
+ }
+ }
+ if (l%4) {
+ putchar('\n');
}
- if (l%4) putchar('\n');
+
if (announce==2) announce=1;
}
if (entries==0) printf("No files\n");
{
struct tm *tmp;
- if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%33)
+ if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%10)
{
if (announce==1)
{
cpmNamei(ino,dirent[i],&file);
cpmStat(&file,&statbuf);
- printf(" %5.1ldK",(statbuf.size+buf.f_bsize-1)/buf.f_bsize*(buf.f_bsize/1024));
+ printf(" %5.1ldK",(long) (statbuf.size+buf.f_bsize-1) /
+ buf.f_bsize*(buf.f_bsize/1024));
+
printf(" %6.1ld ",(long)(statbuf.size/128));
putchar(statbuf.mode&0200 ? ' ' : 'R');
putchar(statbuf.mode&01000 ? 'S' : ' ');
{
struct tm *tmp;
- if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%33)
+ if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%10)
{
cpmNamei(ino,dirent[i],&file);
cpmStat(&file,&statbuf);
totalBytes+=statbuf.size;
totalRecs+=(statbuf.size+127)/128;
- printf(" %5.1ldk",(statbuf.size+buf.f_bsize-1)/buf.f_bsize*(buf.f_bsize/1024));
+ printf(" %5.1ldk",(long) (statbuf.size+buf.f_bsize-1) /
+ buf.f_bsize*(buf.f_bsize/1024));
printf(" %6.1ld ",(long)(statbuf.size/128));
putchar((attrib & CPM_ATTR_F1) ? '1' : ' ');
putchar((attrib & CPM_ATTR_F2) ? '2' : ' ');
announce=0;
for (i=0; i<entries; ++i) if (dirent[i][0]!='.')
{
- if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%33)
+ if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%10)
{
if (announce==0)
{
cpmNamei(ino,dirent[i],&file);
cpmStat(&file,&statbuf);
}
- if (iflag) printf("%4ld ",statbuf.ino);
+ if (iflag) printf("%4ld ",(long) statbuf.ino);
if (l)
{
struct tm *tmp;
announce=0;
for (i=0; i<entries; ++i) if (dirent[i][0]!='.')
{
- if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%33)
+ if (dirent[i][0]=='0'+user/10 && dirent[i][1]=='0'+user%10)
{
if (announce==0)
{