|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T m
Length: 1214 (0x4be)
Types: TextFile
Names: »main.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Empire.V/V1.1/EMPFIX/main.c«
#define D_NATSTR
#define D_FILES
#include "empdef.h"
#include <stdio.h>
int xflg, wflg, mflg;
main()
{
register char *cp;
long now;
char *getstri();
if( privuid == myruid() ) goto X56;
printf("%d != %d\n", myruid(), privuid);
exit(1);
X56:
natf = open(natfil, O_RDWR);
X100:
time(&now);
lseek(natf, 0L, 0);
if( read(natf, &nat, sizeof(nat)) >= sizeof(nat) ) goto X174;
printf("Too few bytes in nation #0...\n");
X174:
up_offset = nat.nat_up_off;
printf("Curup is %.0f\n", now / 1800. - up_offset);
cp = getstri("1:nation 2:sector 3:ship 4:treaty 5:loan : ");
switch( *cp ) {
case '\0':
execl("/bin/date", "", 0);
case '1':
nations();
break;
case '2':
sectors();
break;
case '3':
ships();
break;
case '4':
treats();
break;
case '5':
loans();
break;
default:
printf("Huh?\n");
}
goto X100;
}