mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-21 23:29:30 +00:00
dos33: clear up some whitespace
This commit is contained in:
parent
2ebf3d489b
commit
6264373203
|
@ -991,11 +991,10 @@ static int dump_sector(void) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static int dos33_dump(int fd) {
|
||||
|
||||
int num_tracks,catalog_t,catalog_s,file,ts_t,ts_s,ts_total,track,sector;
|
||||
int num_tracks,catalog_t,catalog_s,file,ts_t,ts_s,ts_total;
|
||||
int track,sector;
|
||||
int i,j;
|
||||
int deleted=0;
|
||||
char temp_string[BUFSIZ];
|
||||
|
@ -1008,8 +1007,11 @@ static int dos33_dump(int fd) {
|
|||
|
||||
printf("Finding name of startup file, Track 1 Sector 9 offset $75\n");
|
||||
dump_sector();
|
||||
|
||||
printf("Startup Filename: ");
|
||||
for(i=0;i<30;i++) printf("%c",sector_buffer[0x75+i]&0x7f);
|
||||
for(i=0;i<30;i++) {
|
||||
printf("%c",sector_buffer[0x75+i]&0x7f);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
dos33_read_vtoc(fd);
|
||||
|
@ -1037,22 +1039,30 @@ static int dos33_dump(int fd) {
|
|||
printf("\tNumber of sectors per track = %i\n",
|
||||
sector_buffer[VTOC_S_PER_TRACK]);
|
||||
printf("\tNumber of bytes per sector = %i\n",
|
||||
(sector_buffer[VTOC_BYTES_PER_SH]<<8)+sector_buffer[VTOC_BYTES_PER_SL]);
|
||||
(sector_buffer[VTOC_BYTES_PER_SH]<<8)+
|
||||
sector_buffer[VTOC_BYTES_PER_SL]);
|
||||
|
||||
printf("\nFree sector bitmap:\n");
|
||||
printf("\tTrack FEDCBA98 76543210\n");
|
||||
for(i=0;i<num_tracks;i++) {
|
||||
printf("\t $%02X: ",i);
|
||||
for(j=0;j<8;j++) {
|
||||
if ((sector_buffer[VTOC_FREE_BITMAPS+(i*4)]<<j)&0x80) printf(".");
|
||||
else printf("U");
|
||||
if ((sector_buffer[VTOC_FREE_BITMAPS+(i*4)]<<j)&0x80) {
|
||||
printf(".");
|
||||
}
|
||||
else {
|
||||
printf("U");
|
||||
}
|
||||
}
|
||||
printf(" ");
|
||||
for(j=0;j<8;j++) {
|
||||
if ((sector_buffer[VTOC_FREE_BITMAPS+(i*4)+1]<<j)&0x80) printf(".");
|
||||
else printf("U");
|
||||
if ((sector_buffer[VTOC_FREE_BITMAPS+(i*4)+1]<<j)&0x80) {
|
||||
printf(".");
|
||||
}
|
||||
else {
|
||||
printf("U");
|
||||
}
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
@ -1135,7 +1145,9 @@ continue_dump:;
|
|||
return 0;
|
||||
}
|
||||
|
||||
int dos33_rename_hello(int fd, char *new_name) {
|
||||
/* ??? */
|
||||
static int dos33_rename_hello(int fd, char *new_name) {
|
||||
|
||||
char buffer[BYTES_PER_SECTOR];
|
||||
int i;
|
||||
|
||||
|
@ -1170,6 +1182,7 @@ static int display_help(char *name) {
|
|||
printf("\tCATALOG\n");
|
||||
printf("\tLOAD apple_file <local_file>\n");
|
||||
printf("\tSAVE type local_file <apple_file>\n");
|
||||
printf("\tBSAVE type local_file <apple_file>\n");
|
||||
printf("\tDELETE apple_file\n");
|
||||
printf("\tLOCK apple_file\n");
|
||||
printf("\tUNLOCK apple_file\n");
|
||||
|
@ -1198,7 +1211,8 @@ static int display_help(char *name) {
|
|||
#define COMMAND_COPY 10
|
||||
#define COMMAND_DUMP 11
|
||||
#define COMMAND_HELLO 12
|
||||
#define MAX_COMMAND 13
|
||||
#define COMMAND_BSAVE 13
|
||||
#define MAX_COMMAND 14
|
||||
|
||||
static struct command_type {
|
||||
int type;
|
||||
|
@ -1216,6 +1230,7 @@ static struct command_type {
|
|||
{COMMAND_COPY,"COPY"},
|
||||
{COMMAND_DUMP,"DUMP"},
|
||||
{COMMAND_HELLO,"HELLO"},
|
||||
{COMMAND_BSAVE,"BSAVE"},
|
||||
};
|
||||
|
||||
static int lookup_command(char *name) {
|
||||
|
@ -1300,7 +1315,8 @@ int main(int argc, char **argv) {
|
|||
/* check and make sure we have apple_filename */
|
||||
if (argc<4+extra_ops) {
|
||||
fprintf(stderr,"Error! Need apple file_name\n");
|
||||
fprintf(stderr,"%s %s LOAD apple_filename\n",argv[0],image);
|
||||
fprintf(stderr,"%s %s LOAD apple_filename\n",
|
||||
argv[0],image);
|
||||
goto exit_and_close;
|
||||
}
|
||||
/* Truncate filename if too long */
|
||||
|
@ -1324,7 +1340,8 @@ int main(int argc, char **argv) {
|
|||
apple_filename,
|
||||
FILE_NORMAL);
|
||||
if (catalog_entry<0) {
|
||||
fprintf(stderr,"Error! %s not found!\n",apple_filename);
|
||||
fprintf(stderr,"Error! %s not found!\n",
|
||||
apple_filename);
|
||||
goto exit_and_close;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user