@@ -222,7 +222,7 @@ int Format_Floppy_Cylinder(int cylinder,int head)
222222 if (debug_prog == TRUE) printf ("[DEBUG] New disk found...\n" );
223223 goto track0again ;
224224 }
225- printf ("Format_Floppy_Cylinder( head=%d cylinder=%d ) sectors=%d [int 13.5]\n" ,
225+ printf (catgets ( catalog , 22 , 0 , "Format_Floppy_Cylinder( head=%d cylinder=%d ) sectors=%d [int 13.5]\n" ) ,
226226 head , cylinder , secPerTrack );
227227 Critical_Error_Handler (BIOS , result ); /* this would abort, no? */
228228 }
@@ -243,7 +243,7 @@ int Format_Floppy_Cylinder(int cylinder,int head)
243243 if ( regs .h .al > (sizeof (huge_sector_buffer_0 )>>9 ) )
244244 {
245245 regs .h .al = sizeof (huge_sector_buffer_0 ) >> 9 ;
246- printf ("Only checking first %d sectors per track\n" , regs .h .al );
246+ printf (catgets ( catalog , 22 , 1 , "Only checking first %d sectors per track\n" ) , regs .h .al );
247247 /* could read 2 half-tracks or use pinpointing below here */
248248 /* instead... however, only 2.88MB disks have > 18 sect/track */
249249 }
@@ -322,7 +322,7 @@ if (cylinder==2 && head==1) {sector_index = 6; goto fakebad; }
322322 if ((cylinder == 0 ) && (head == 0 ) && (sector_index <= 7 ))
323323 {
324324 /* 7: boot sect + 2 fat sect + 4 root dir sect on 160k disk */
325- printf ("\nFormat failed, error in first 7 sectors!\n" );
325+ printf (catgets ( catalog , 22 , 2 , "\nFormat failed, error in first 7 sectors!\n" ) );
326326 return secPerTrack ; /* pretend whole track bad - 0.91n */
327327 }
328328
@@ -334,7 +334,7 @@ if (cylinder==2 && head==1) {sector_index = 6; goto fakebad; }
334334 }
335335 else
336336 {
337- printf ("Sector %4ld CHS=[%2d:%d:%2d] bad\n" ,
337+ printf (catgets ( catalog , 22 , 3 , "Sector %4ld CHS=[%2d:%d:%2d] bad\n" ) ,
338338 bad_sector_map [(bad_sector_map_pointer - 1 )],
339339 cylinder , head , sector_index );
340340 }
@@ -429,7 +429,7 @@ void Set_Floppy_Media_Type()
429429
430430 if ((drive_number & 0x80 ) != 0 )
431431 {
432- printf ("Harddisk drive number! Aborting.\n" );
432+ printf (catgets ( catalog , 22 , 4 , "Harddisk drive number! Aborting.\n" ) );
433433 Exit (4 ,40 );
434434 }
435435
@@ -513,7 +513,7 @@ void Set_Floppy_Media_Type()
513513 param .sides = drive_specs [index ].number_of_heads ;
514514 }
515515
516- printf ("Formatting to %ldk (Cyl=%ld Head=%ld Sec=%2ld)\n" ,
516+ printf (catgets ( catalog , 22 , 5 , "Formatting to %ldk (Cyl=%ld Head=%ld Sec=%2ld)\n" ) ,
517517 param .size , param .cylinders , param .sides , param .sectors );
518518 index = -10 ; /* break out of the loop */
519519 } /* end "if match" */
@@ -530,12 +530,12 @@ void Set_Floppy_Media_Type()
530530 {
531531 if (param .f == TRUE) /* only size given */
532532 {
533- printf ("No media type known for %ldk format\n" , param .size );
533+ printf (catgets ( catalog , 22 , 6 , "No media type known for %ldk format\n" ) , param .size );
534534 }
535535 else /* geometry given */
536536 {
537537 param .size = (param .cylinders * param .sides * param .sectors ) >> 1 ;
538- printf ("No media type known for %ldk format (Cyl=%ld Head=%ld Sec=%2ld)\n" ,
538+ printf (catgets ( catalog , 22 , 7 , "No media type known for %ldk format (Cyl=%ld Head=%ld Sec=%2ld)\n" ) ,
539539 param .size , param .cylinders , param .sides , param .sectors );
540540 }
541541 Exit (4 ,41 ); /* cannot continue anyway, media type needed later! */
@@ -581,7 +581,7 @@ void Set_Floppy_Media_Type()
581581 case 6 : preferredsize = 2880 ;
582582 break ;
583583 default : preferredsize = 1440 ; /* USB floppy is type 0x10, atapi!? */
584- printf ("Treating int 13.8 drive type 0x%x as 1440k.\n" , /* 0.91t */
584+ printf (catgets ( catalog , 22 , 8 , "Treating int 13.8 drive type 0x%x as 1440k.\n" ) , /* 0.91t */
585585 drive_type );
586586 /* Type 5 is originally for floppy tape drives */
587587 /* int 21.440d.860 would use: 0 360k, 1 1200k, 2 720k, 7 1440k, 5 harddisk */
@@ -604,7 +604,7 @@ void Set_Floppy_Media_Type()
604604 param .sectors = drive_specs [index ].sectors_per_cylinder ;
605605 param .sides = drive_specs [index ].number_of_heads ;
606606
607- printf ("Using drive default: %ldk (Cyl=%ld Head=%ld Sec=%2ld)\n" ,
607+ printf (catgets ( catalog , 22 , 9 , "Using drive default: %ldk (Cyl=%ld Head=%ld Sec=%2ld)\n" ) ,
608608 param .size , param .cylinders , param .sides , param .sectors );
609609 index = -10 ;
610610 }
@@ -619,7 +619,7 @@ void Set_Floppy_Media_Type()
619619
620620 if (index >= 0 )
621621 {
622- printf ("Size %ldk undefined!??\n" , param .size );
622+ printf (catgets ( catalog , 22 , 10 , "Size %ldk undefined!??\n" ) , param .size );
623623 Exit (4 ,42 ); /* should not happen: no default geometry known */
624624 }
625625 }
@@ -629,11 +629,11 @@ void Set_Floppy_Media_Type()
629629 {
630630 if (param .size > (preferredsize + (preferredsize >> 2 )))
631631 {
632- printf ("Want %ldk in %dk drive? Too much. Aborting.\n" ,
632+ printf (catgets ( catalog , 22 , 11 , "Want %ldk in %dk drive? Too much. Aborting.\n" ) ,
633633 param .size , preferredsize );
634634 Exit (4 ,43 );
635635 }
636- printf ("OVERFORMAT: %ldk in %dk drive. Good luck!\n" ,
636+ printf (catgets ( catalog , 22 , 12 , "OVERFORMAT: %ldk in %dk drive. Good luck!\n" ) ,
637637 param .size , preferredsize );
638638 }
639639 }
@@ -674,12 +674,12 @@ void Set_Floppy_Media_Type()
674674 /* (bonus: mode 2 should allow 360k format in 720k drive) */
675675 if (param .four || param .one || param .eight )
676676 {
677- printf ("This is a 720k drive: No /1, /4 or /8 possible.\n" );
677+ printf (catgets ( catalog , 22 , 13 , "This is a 720k drive: No /1, /4 or /8 possible.\n" ) );
678678 Exit (4 ,44 );
679679 }
680680 if (param .size < 720 )
681681 {
682- printf ("Minimum size for this drive type is 720k\n" );
682+ printf (catgets ( catalog , 22 , 14 , "Minimum size for this drive type is 720k\n" ) );
683683 Exit (4 ,45 );
684684 }
685685 break ;
@@ -700,17 +700,17 @@ void Set_Floppy_Media_Type()
700700 sizecheck_3inch :
701701 if (param .four || param .one || param .eight )
702702 {
703- printf ("This is a 3.25 inch drive: No /1, /4 or /8 possible.\n" );
703+ printf (catgets ( catalog , 22 , 15 , "This is a 3.25 inch drive: No /1, /4 or /8 possible.\n" ) );
704704 Exit (4 ,46 );
705705 }
706706 if (param .size < 720 )
707707 {
708- printf ("Minimum size for this drive type is 720k.\n" );
708+ printf (catgets ( catalog , 22 , 16 , "Minimum size for this drive type is 720k.\n" ) );
709709 Exit (4 ,47 );
710710 }
711711 if (param .size == 1200 )
712712 {
713- printf ("This is a 3.25 inch drive: No 1200k format.\n" );
713+ printf (catgets ( catalog , 22 , 17 , "This is a 3.25 inch drive: No 1200k format.\n" ) );
714714 Exit (4 ,47 );
715715 }
716716 break ;
@@ -742,15 +742,15 @@ void Set_Floppy_Media_Type()
742742
743743 if (regs .x .cflag != 0 )
744744 {
745- printf ("Drive mode (size class %d) setting failed, error %02x hex\n" ,
745+ printf (catgets ( catalog , 22 , 18 , "Drive mode (size class %d) setting failed, error %02x hex\n" ) ,
746746 sizeclass , regs .h .ah );
747747 if (regs .h .ah == 0x80 )
748748 {
749- printf ("No disk in drive!\n" );
749+ printf (catgets ( catalog , 22 , 19 , "No disk in drive!\n" ) );
750750 Exit (4 ,48 );
751751 }
752752 else
753- printf ("Continuing anyway.\n" );
753+ printf (catgets ( catalog , 22 , 20 , "Continuing anyway.\n" ) );
754754 }
755755 }
756756
@@ -837,7 +837,7 @@ void Set_Floppy_Media_Type()
837837
838838 if (regs .h .ah == 0x80 )
839839 {
840- printf ("No disk in drive (timeout)!\n" );
840+ printf (catgets ( catalog , 22 , 21 , "No disk in drive (timeout)!\n" ) );
841841 Exit (4 ,49 );
842842 }
843843
@@ -850,18 +850,18 @@ void Set_Floppy_Media_Type()
850850 }
851851 else /* ... if AH is 0x0ch, that is */
852852 {
853- printf ("Media type %ldk (%d x %ld x %2d) not supported by this drive!?\n" ,
853+ printf (catgets ( catalog , 22 , 22 , "Media type %ldk (%d x %ld x %2d) not supported by this drive!?\n" ) ,
854854 param .size , number_of_cylinders , param .sides , sectors_per_cylinder );
855- printf ("Geometry set (int 13.18) error (%02x). " , regs .h .ah );
855+ printf (catgets ( catalog , 22 , 23 , "Geometry set (int 13.18) error (%02x). " ) , regs .h .ah );
856856 if ( (_osmajor < 7 ) ||
857857 (sectors_per_cylinder > ddpt -> sectors_per_cylinder ) )
858858 { /* 0.91q: Win9x DOS box uses *63 geometry all the time */
859- printf ("Giving up.\n" ); /* old DOS - or ddpt geo too small */
859+ printf (catgets ( catalog , 22 , 24 , "Giving up.\n" ) ); /* old DOS - or ddpt geo too small */
860860 Exit (4 ,50 );
861861 }
862862 else /* ability to ignore added 0.91q */
863863 {
864- printf ("Ignored.\n" );
864+ printf (catgets ( catalog , 22 , 25 , "Ignored.\n" ) );
865865 regs .x .di = 0xffff ; /* "NO NEW DDPT DATA" */
866866 }
867867 }
@@ -909,7 +909,7 @@ void Set_Floppy_Media_Type()
909909 sregs .ds = FP_SEG (ddpt ); /* segment DS */
910910 intdosx (& regs ,& regs ,& sregs );
911911
912- printf ("DDPT is in ROM - only standard sizes possible.\n" );
912+ printf (catgets ( catalog , 22 , 26 , "DDPT is in ROM - only standard sizes possible.\n" ) );
913913
914914 if (debug_prog == TRUE)
915915 printf ("[DEBUG] New INT 1E (DDPT) vector: %04x:%04x.\n" ,
@@ -928,7 +928,7 @@ void Set_Floppy_Media_Type()
928928 /* update geometry even if the ddpt pointer or contents did not change. */
929929
930930 if (ddpt -> sectors_per_cylinder != sectors_per_cylinder ) /* DDPT is in ROM */
931- printf ("SECTORS PER TRACK stuck to %d, wanted %d. Continuing anyway.\n" ,
931+ printf (catgets ( catalog , 22 , 27 , "SECTORS PER TRACK stuck to %d, wanted %d. Continuing anyway.\n" ) ,
932932 ddpt -> sectors_per_cylinder , sectors_per_cylinder );
933933
934934
@@ -945,7 +945,7 @@ void Set_Floppy_Media_Type()
945945
946946 if ( (FP_SEG (ddpt ) > 0xa000 ) && ((FP_SEG (ddpt ) & 0x3ff ) == 0 ) )
947947 {
948- printf ("DDPT tweaking impossible: DDPT in ROM\n" );
948+ printf (catgets ( catalog , 22 , 28 , "DDPT tweaking impossible: DDPT in ROM\n" ) );
949949 Exit (4 ,51 );
950950 }
951951
@@ -972,14 +972,14 @@ void Set_Floppy_Media_Type()
972972
973973 if (gap_len == 0 )
974974 {
975- printf ("No gap length known for %d sec/cyl. Good luck with BIOS value!\n" ,
975+ printf (catgets ( catalog , 22 , 29 , "No gap length known for %d sec/cyl. Good luck with BIOS value!\n" ) ,
976976 sectors_per_cylinder ); /* (we will display BIOS value in DEBUG mode) */
977- printf ("TWEAK: Sectors per cylinder in DDPT set to %d\n" ,
977+ printf (catgets ( catalog , 22 , 30 , "TWEAK: Sectors per cylinder in DDPT set to %d\n" ) ,
978978 sectors_per_cylinder );
979979 }
980980 else
981981 {
982- printf ("TWEAK: %d Sectors per cylinder, Format gap length %d!\n" ,
982+ printf (catgets ( catalog , 22 , 31 , "TWEAK: %d Sectors per cylinder, Format gap length %d!\n" ) ,
983983 sectors_per_cylinder , gap_len );
984984 RestoreDDPT ();
985985 ddpt -> gap3_length_xmat = gap_len ; /* (gap3_length_rw needs no change) */
@@ -1025,7 +1025,7 @@ void Set_Floppy_Media_Type()
10251025 int86 (0x13 ,& regs ,& regs ); /* reset floppy controller */
10261026 if (regs .x .cflag && (regs .h .ah != 0 )) {
10271027 regs .x .ax = regs .h .ah ;
1028- printf ("Floppy controller reset failed (code %x) - DDPT rejected?\n" ,
1028+ printf (catgets ( catalog , 22 , 32 , "Floppy controller reset failed (code %x) - DDPT rejected?\n" ) ,
10291029 regs .x .ax );
10301030 }
10311031
@@ -1055,24 +1055,25 @@ void Set_Floppy_Media_Type()
10551055#endif
10561056
10571057 printf ("[DEBUG] Controller setup %2hx: " , control ); /* %hx: short hex */
1058- if (control & 0x20 ) printf ("[doublestepping] " );
1059- if (control & 0x10 ) printf ("[configured type %hu] " , (control & 0x0f ));
1058+ if (control & 0x20 ) printf (catgets ( catalog , 22 , 34 , "[doublestepping] " ) );
1059+ if (control & 0x10 ) printf (catgets ( catalog , 22 , 35 , "[configured type %hu] " ) , (control & 0x0f ));
10601060 /* only if configured is true int 13.5 will work!? */
10611061 control >>= 6 ; /* keep only baud rate bits */
10621062 switch (control )
10631063 {
1064- case 0 : printf (" 500 kbps (HD 1xx0k)\n" ); break ;
1065- case 1 : printf (" 300 kbps (DD 360k)\n" ); break ;
1066- case 2 : printf (" 250 kbps (DD 720k)\n" ); break ;
1067- default : printf ("1000 kbps (ED 2880k)\n" ); break ;
1064+ case 0 : printf (catgets ( catalog , 22 , 36 , " 500 kbps (HD 1xx0k)\n" ) ); break ;
1065+ case 1 : printf (catgets ( catalog , 22 , 37 , " 300 kbps (DD 360k)\n" ); break ;
1066+ case 2 : printf (catgets ( catalog , 22 , 38 , " 250 kbps (DD 720k)\n" ) ); break ;
1067+ default : printf (catgets ( catalog , 22 , 39 , "1000 kbps (ED 2880k)\n" ) ); break ;
10681068 }
10691069 } /* controller settings display */
10701070
10711071 if ( (debug_prog == TRUE) && (!param .force_yes ) ) /* added /Y check 0.91o */
10721072 {
10731073 char ch ;
10741074 write (isatty (1 ) ? 1 : 2 ,
1075- "-- press ENTER to format disk (ESCAPE to abort) --\n" , 51 );
1075+ catgets (catalog , 22 , 33 , "-- press ENTER to format disk (ESCAPE to abort) --\n" ),
1076+ strlen (catgets (catalog , 22 , 33 , "-- press ENTER to format disk (ESCAPE to abort) --\n" )));
10761077 /* writes to stderr to stay visible if redirecting */
10771078
10781079 do
0 commit comments