}
}end
+more void_int note{ voidptr is larger than int }end execute{
+ main() {
+ return sizeof(char*) > sizeof(int) ? 0 : 1;
+ }
+}end
+
+more long_int note{ long is larger than int }end execute{
+ main() {
+ return sizeof(long) > sizeof(int) ? 0 : 1;
+ }
+}end
+
################################################################
# See if there is a preferred block size for a file system
################################################################
flags =
(flags & ~(SFFMT_SIGN | SFFMT_BLANK | SFFMT_ZERO)) |
SFFMT_ALTER;
- if (sizeof(char*) > sizeof(int)) {
- lv = (Sflong_t) ((Sfulong_t) argv.vp);
- goto long_cvt;
- } else {
- v = (int) ((uint) argv.vp);
- goto int_cvt;
- }
-
+#if _more_void_int
+ lv = (Sflong_t) ((Sfulong_t) argv.vp);
+ goto long_cvt;
+#else
+ v = (int) ((uint) argv.vp);
+ goto int_cvt;
+#endif
case 'o':
base = 8;
n_s = 7;
n_s = base == 10 ? -1 : 0;
int_arg:
- if ((sizeof(long) > sizeof(int)) || (sizeof(char*) > sizeof(int))) {
+#if _more_long_int || _more_void_int
if (FMTCMP(size, Sflong_t, Sflong_t)) {
lv = argv.ll;
goto long_cvt;
*--sp = ssp[((Sfulong_t) lv) % base];
} while ((lv = ((Sfulong_t) lv) / base));
}
- }
- } else if (sizeof(short) < sizeof(int)
+ } else
+#endif
+ if (sizeof(short) < sizeof(int)
&& FMTCMP(size, short, Sflong_t)) {
if (ft && ft->extf && (ft->flags & SFFMT_VALUE)) {
if (fmt == 'd')
if (value) {
n_assign += 1;
- if (fmt == 'p') {
- if (sizeof(char*) > sizeof(int)){
- *((void **) value) = (void *) ((ulong) argv.lu);
- }
- else {
- *((void **) value) = (void *) ((uint) argv.lu);
- }
- }
+ if (fmt == 'p')
+#if _more_void_int
+ *((void **) value) = (void *) ((ulong) argv.lu);
+#else
+ *((void **) value) = (void *) ((uint) argv.lu);
+#endif
else if (sizeof(long) > sizeof(int) &&
FMTCMP(size, long, Sflong_t)) {
if (fmt == 'd' || fmt == 'i')