Line 715... |
Line 715... |
715 |
memmove(buf->buff64 + 9, buf->buff64 + 8, 4);
|
715 |
memmove(buf->buff64 + 9, buf->buff64 + 8, 4);
|
716 |
buf->buff64[8] = ' ';
|
716 |
buf->buff64[8] = ' ';
|
717 |
output(buf->buff64);
|
717 |
output(buf->buff64);
|
718 |
}
|
718 |
}
|
719 |
output(" ");
|
719 |
output(" ");
|
720 |
/* either <DIR> or right aligned 10-chars byte size */
|
720 |
/* either <DIR> or right aligned 13 or 10 chars byte size, depending
|
- |
|
721 |
* on the presence of a thousands delimiter (max 2'000'000'000) */
|
- |
|
722 |
{
|
- |
|
723 |
unsigned short szlen = 10 + (strlen(buf->nls.thousep) * 3);
|
721 |
memset(buf->buff64, ' ', 10);
|
724 |
memset(buf->buff64, ' ', 16);
|
722 |
if (dta->attr & DOS_ATTR_DIR) {
|
725 |
if (dta->attr & DOS_ATTR_DIR) {
|
723 |
strcpy(buf->buff64 + 10, svarlang_str(37,21));
|
726 |
strcpy(buf->buff64 + szlen, svarlang_str(37,21));
|
724 |
} else {
|
727 |
} else {
|
725 |
nls_format_number(buf->buff64 + 10, dta->size, &(buf->nls));
|
728 |
nls_format_number(buf->buff64 + 12, dta->size, &(buf->nls));
|
- |
|
729 |
}
|
- |
|
730 |
output(buf->buff64 + strlen(buf->buff64) - szlen);
|
726 |
}
|
731 |
}
|
727 |
output(buf->buff64 + strlen(buf->buff64) - 10);
|
- |
|
728 |
/* two spaces and NLS DATE */
|
732 |
/* one spaces and NLS DATE */
|
729 |
buf->buff64[0] = ' ';
|
733 |
buf->buff64[0] = ' ';
|
730 |
buf->buff64[1] = ' ';
|
- |
|
731 |
if (screenw >= 80) {
|
734 |
if (screenw >= 80) {
|
732 |
nls_format_date(buf->buff64 + 2, dta->date_yr + 1980, dta->date_mo, dta->date_dy, &(buf->nls));
|
735 |
nls_format_date(buf->buff64 + 1, dta->date_yr + 1980, dta->date_mo, dta->date_dy, &(buf->nls));
|
733 |
} else {
|
736 |
} else {
|
734 |
nls_format_date(buf->buff64 + 2, (dta->date_yr + 80) % 100, dta->date_mo, dta->date_dy, &(buf->nls));
|
737 |
nls_format_date(buf->buff64 + 1, (dta->date_yr + 80) % 100, dta->date_mo, dta->date_dy, &(buf->nls));
|
735 |
}
|
738 |
}
|
736 |
output(buf->buff64);
|
739 |
output(buf->buff64);
|
737 |
|
740 |
|
738 |
/* one space and NLS TIME */
|
741 |
/* one space and NLS TIME */
|
739 |
nls_format_time(buf->buff64 + 1, dta->time_hour, dta->time_min, 0xff, &(buf->nls));
|
742 |
nls_format_time(buf->buff64 + 1, dta->time_hour, dta->time_min, 0xff, &(buf->nls));
|
Line 784... |
Line 787... |
784 |
}
|
787 |
}
|
785 |
|
788 |
|
786 |
/* print out summary (unless bare output mode) */
|
789 |
/* print out summary (unless bare output mode) */
|
787 |
if (req.format != DIR_OUTPUT_BARE) {
|
790 |
if (req.format != DIR_OUTPUT_BARE) {
|
788 |
unsigned short alignpos;
|
791 |
unsigned short alignpos;
|
789 |
unsigned char uint32maxlen = 13; /* 13 is the max len of a 32 bit number with thousand separators (4'000'000'000) */
|
792 |
unsigned short uint32maxlen = 14; /* 13 is the max len of a 32 bit number with thousand separators (4'000'000'000) */
|
790 |
if (screenw < 80) uint32maxlen = 10;
|
793 |
if (screenw < 80) uint32maxlen = 10;
|
- |
|
794 |
|
791 |
/* x file(s) */
|
795 |
/* x file(s) (maximum of files in a FAT-32 directory is 65'535) */
|
792 |
memset(buf->buff64, ' ', uint32maxlen);
|
796 |
memset(buf->buff64, ' ', 8);
|
793 |
i = nls_format_number(buf->buff64 + uint32maxlen, summary_fcount, &(buf->nls));
|
797 |
i = nls_format_number(buf->buff64 + 8, summary_fcount, &(buf->nls));
|
794 |
alignpos = sprintf(buf->buff64 + uint32maxlen + i, " %s ", svarlang_str(37,22)/*"file(s)"*/);
|
798 |
alignpos = sprintf(buf->buff64 + 8 + i, " %s ", svarlang_str(37,22)/*"file(s)"*/);
|
795 |
output(buf->buff64 + i);
|
799 |
output(buf->buff64 + i);
|
796 |
/* xxxx bytes */
|
800 |
/* xxxx bytes */
|
- |
|
801 |
memset(buf->buff64, ' ', 14);
|
797 |
i = nls_format_number(buf->buff64 + uint32maxlen, summary_totsz, &(buf->nls));
|
802 |
i = nls_format_number(buf->buff64 + uint32maxlen, summary_totsz, &(buf->nls));
|
798 |
output(buf->buff64 + i + 1);
|
803 |
output(buf->buff64 + i + 1);
|
799 |
output(" ");
|
804 |
output(" ");
|
800 |
nls_outputnl(37,23); /* "bytes" */
|
805 |
nls_outputnl(37,23); /* "bytes" */
|
801 |
if (req.flags & DIR_FLAG_PAUSE) dir_pagination(&availrows);
|
806 |
if (req.flags & DIR_FLAG_PAUSE) dir_pagination(&availrows);
|
- |
|
807 |
|
802 |
/* xxxx bytes free */
|
808 |
/* xxxx bytes free */
|
803 |
i = cmd_dir_df(&summary_totsz, drv);
|
809 |
i = cmd_dir_df(&summary_totsz, drv);
|
804 |
if (i != 0) nls_outputnl_doserr(i);
|
810 |
if (i != 0) nls_outputnl_doserr(i);
|
805 |
alignpos += uint32maxlen * 2;
|
811 |
alignpos += 8 + uint32maxlen;
|
806 |
memset(buf->buff64, ' ', alignpos); /* align the freebytes value to same column as totbytes */
|
812 |
memset(buf->buff64, ' ', alignpos); /* align the freebytes value to same column as totbytes */
|
807 |
i = nls_format_number(buf->buff64 + alignpos, summary_totsz, &(buf->nls));
|
813 |
i = nls_format_number(buf->buff64 + alignpos, summary_totsz, &(buf->nls));
|
808 |
output(buf->buff64 + i + 1);
|
814 |
output(buf->buff64 + i + 1);
|
809 |
output(" ");
|
815 |
output(" ");
|
810 |
nls_outputnl(37,24); /* "bytes free" */
|
816 |
nls_outputnl(37,24); /* "bytes free" */
|