4 |
|
* |
5 |
|
* $Id$ |
6 |
|
* |
7 |
< |
* Basilisk II (C) 1997-2001 Christian Bauer |
7 |
> |
* Basilisk II (C) 1997-2003 Christian Bauer |
8 |
|
* |
9 |
|
* This program is free software; you can redistribute it and/or modify |
10 |
|
* it under the terms of the GNU General Public License as published by |
30 |
|
self = [super init]; |
31 |
|
|
32 |
|
numItems = 0; |
33 |
< |
col1 = [[NSMutableArray alloc] init]; |
34 |
< |
col2 = [[NSMutableArray alloc] init]; |
33 |
> |
col1 = [NSMutableArray new]; |
34 |
> |
col2 = [NSMutableArray new]; |
35 |
|
|
36 |
|
return self; |
37 |
|
} |
109 |
|
|
110 |
|
#import <AppKit/NSImage.h> // For [NSBundle pathForImageResource:] proto |
111 |
|
|
112 |
+ |
#include <string> |
113 |
+ |
using std::string; |
114 |
+ |
extern string UserPrefsPath; // from prefs_unix.cpp |
115 |
+ |
|
116 |
|
#import "sysdeps.h" // Types used in Basilisk C++ code |
117 |
|
#import "video_macosx.h" // some items that we edit here |
118 |
|
#import "misc_macosx.h" // WarningSheet() prototype |
130 |
|
|
131 |
|
devs = @"/dev"; |
132 |
|
home = NSHomeDirectory(); |
133 |
< |
volsDS = [[TableDS alloc] init]; |
134 |
< |
SCSIds = [[TableDS alloc] init]; |
133 |
> |
volsDS = [TableDS new]; |
134 |
> |
SCSIds = [TableDS new]; |
135 |
|
|
136 |
< |
lockCell = [[NSImageCell alloc] init]; |
136 |
> |
lockCell = [NSImageCell new]; |
137 |
|
if ( lockCell == nil ) |
138 |
|
NSLog (@"%s - Can't create NSImageCell?", __PRETTY_FUNCTION__); |
139 |
|
|
140 |
< |
blank = [[NSImage alloc] init]; |
140 |
> |
blank = [NSImage new]; |
141 |
|
locked = [NSImage alloc]; |
142 |
|
if ( [locked initWithContentsOfFile: |
143 |
|
[[NSBundle mainBundle] |
222 |
|
} |
223 |
|
} |
224 |
|
|
225 |
+ |
- (IBAction) BrowsePrefs: (id)sender |
226 |
+ |
{ |
227 |
+ |
NSOpenPanel *oP = [NSOpenPanel openPanel]; |
228 |
+ |
|
229 |
+ |
[oP setCanChooseFiles: YES]; |
230 |
+ |
[oP setTitle: @"Select a Preferences file"]; |
231 |
+ |
D(NSLog(@"%s - home = %@", __PRETTY_FUNCTION__, home)); |
232 |
+ |
if ( [oP runModalForDirectory: ([prefsFile stringValue] ? [prefsFile stringValue] : home) |
233 |
+ |
file:nil |
234 |
+ |
types:nil] == NSOKButton ) |
235 |
+ |
{ |
236 |
+ |
[prefsFile setStringValue: [oP filename] ]; |
237 |
+ |
UserPrefsPath = [[oP filename] cString]; |
238 |
+ |
} |
239 |
+ |
} |
240 |
+ |
|
241 |
|
- (IBAction) BrowseROM: (id)sender |
242 |
|
{ |
243 |
|
NSOpenPanel *oP = [NSOpenPanel openPanel]; |
280 |
|
|
281 |
|
- (IBAction) ChangeDisableSound: (NSButton *)sender |
282 |
|
{ |
283 |
< |
PrefsReplaceBool("nosound", [disableSound state]); |
283 |
> |
BOOL noSound = [disableSound state]; |
284 |
> |
|
285 |
> |
if ( ! noSound ) |
286 |
> |
WarningSheet(@"Sound is currently unimplemented", panel); |
287 |
> |
|
288 |
> |
PrefsReplaceBool("nosound", noSound); |
289 |
|
edited = YES; |
290 |
|
} |
291 |
|
|
295 |
|
edited = YES; |
296 |
|
} |
297 |
|
|
298 |
+ |
- (IBAction) ChangeKeyboard: (NSPopUpButton *)sender |
299 |
+ |
{ |
300 |
+ |
// Deselest current item |
301 |
+ |
int val = PrefsFindInt32("keyboardtype"); |
302 |
+ |
int current = [keyboard indexOfItemWithTag: val]; |
303 |
+ |
|
304 |
+ |
if ( current ) |
305 |
+ |
[[keyboard itemAtIndex: current] setState: FALSE]; |
306 |
+ |
|
307 |
+ |
PrefsReplaceInt32("keyboardtype", [[sender selectedItem] tag]); |
308 |
+ |
edited = YES; |
309 |
+ |
} |
310 |
+ |
|
311 |
|
- (IBAction) ChangeModel: (NSMatrix *)sender |
312 |
|
{ |
313 |
|
PrefsReplaceInt32("modelid", [[sender selectedCell] tag]); |
314 |
|
edited = YES; |
315 |
|
} |
316 |
|
|
279 |
– |
// Screen/window changing stuff |
317 |
|
|
318 |
< |
// This is called when any of the screen/window, width, height or depth is changed |
318 |
> |
// If we are not using the CGIMAGEREF drawing strategy, |
319 |
> |
// then source bitmaps must be 32bits deep. |
320 |
> |
|
321 |
> |
- (short) testWinDepth: (int) newbpp |
322 |
> |
{ |
323 |
> |
#ifdef CGIMAGEREF |
324 |
> |
return newbpp; |
325 |
> |
#else |
326 |
> |
if ( newbpp != 32 ) |
327 |
> |
WarningSheet(@"Sorry - In windowed mode, depth must be 32", panel); |
328 |
> |
return 32 |
329 |
> |
#endif |
330 |
> |
} |
331 |
> |
|
332 |
> |
// This is called when the screen/window, |
333 |
> |
// width, height or depth is clicked. |
334 |
> |
// |
335 |
> |
// Note that sender may not actually be an NSMatrix. |
336 |
|
|
337 |
|
- (IBAction) ChangeScreen: (NSMatrix *)sender |
338 |
|
{ |
339 |
+ |
NSButton *cell = [sender selectedCell]; |
340 |
+ |
|
341 |
|
short newx = [width intValue]; |
342 |
|
short newy = [height intValue]; |
343 |
|
short newbpp = [depth intValue]; |
344 |
< |
short newtype = DISPLAY_WINDOW; |
344 |
> |
short newtype; |
345 |
|
char str[20]; |
346 |
|
|
347 |
< |
if ( [sender selectedCell] == openGL ) |
292 |
< |
newtype = DISPLAY_OPENGL; |
293 |
< |
if ( [sender selectedCell] == screen ) |
347 |
> |
if ( cell == screen ) |
348 |
|
newtype = DISPLAY_SCREEN; |
349 |
+ |
else if ( cell == window ) |
350 |
+ |
newtype = DISPLAY_WINDOW; |
351 |
+ |
else |
352 |
+ |
newtype = display_type; |
353 |
|
|
354 |
|
// Check that a field actually changed |
355 |
|
if ( newbpp == init_depth && newx == init_width && |
356 |
|
newy == init_height && newtype == display_type ) |
357 |
+ |
{ |
358 |
+ |
D(NSLog(@"No changed GUI items in ChangeScreen")); |
359 |
|
return; |
360 |
< |
|
360 |
> |
} |
361 |
|
|
362 |
|
// If we are changing type, supply some sensible defaults |
363 |
+ |
|
364 |
+ |
short screenx = CGDisplayPixelsWide(kCGDirectMainDisplay), |
365 |
+ |
screeny = CGDisplayPixelsHigh(kCGDirectMainDisplay), |
366 |
+ |
screenb = CGDisplayBitsPerPixel(kCGDirectMainDisplay); |
367 |
+ |
|
368 |
|
if ( newtype != display_type ) |
369 |
|
{ |
370 |
< |
if ( newtype == DISPLAY_SCREEN ) // If changing to full screen |
306 |
< |
{ |
307 |
< |
// supply main screen dimensions as a default |
308 |
< |
NSScreen *s = [NSScreen mainScreen]; |
309 |
< |
NSRect sr = [s frame]; |
310 |
< |
|
311 |
< |
newx = (short) sr.size.width; |
312 |
< |
newy = (short) sr.size.height; |
313 |
< |
// This always returns 24, despite the mode |
314 |
< |
//newbpp = NSBitsPerPixelFromDepth([s depth]); |
315 |
< |
newbpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay); |
316 |
< |
} |
370 |
> |
D(NSLog(@"Changing display type in ChangeScreen")); |
371 |
|
|
372 |
< |
if ( display_type == DISPLAY_SCREEN ) // If changing from full screen |
372 |
> |
// If changing to full screen, supply main screen dimensions as a default |
373 |
> |
if ( newtype == DISPLAY_SCREEN ) |
374 |
> |
newx = screenx, newy = screeny, newbpp = screenb; |
375 |
> |
|
376 |
> |
// If changing from full screen, use minimum screen resolutions |
377 |
> |
if ( display_type == DISPLAY_SCREEN ) |
378 |
> |
{ |
379 |
|
newx = MIN_WIDTH, newy = MIN_HEIGHT; |
380 |
< |
|
381 |
< |
[width setIntValue: newx]; |
322 |
< |
[height setIntValue: newy]; |
323 |
< |
[depth setIntValue: newbpp]; |
380 |
> |
newbpp = [self testWinDepth: newbpp]; |
381 |
> |
} |
382 |
|
} |
383 |
|
else |
384 |
|
{ |
385 |
+ |
newbpp = [self testWinDepth: newbpp]; |
386 |
+ |
|
387 |
|
// Check size is within ranges of MIN_WIDTH ... MAX_WIDTH |
388 |
|
// and MIN_HEIGHT ... MAX_HEIGHT |
389 |
|
// ??? |
390 |
|
} |
391 |
|
|
392 |
+ |
[width setIntValue: newx]; |
393 |
+ |
[height setIntValue: newy]; |
394 |
+ |
[depth setIntValue: newbpp]; |
395 |
+ |
|
396 |
|
|
397 |
|
// Store new prefs |
398 |
|
*str = '\0'; |
404 |
|
else |
405 |
|
sprintf(str, "win/%hd/%hd", newx, newy); |
406 |
|
break; |
343 |
– |
case DISPLAY_OPENGL: |
344 |
– |
if ( newbpp ) |
345 |
– |
sprintf(str, "opengl/%hd/%hd/%hd", newx, newy, newbpp); |
346 |
– |
else |
347 |
– |
sprintf(str, "opengl/%hd/%hd", newx, newy); |
348 |
– |
break; |
407 |
|
case DISPLAY_SCREEN: |
408 |
|
if ( newbpp ) |
409 |
|
sprintf(str, "full/%hd/%hd/%hd", newx, newy, newbpp); |
418 |
|
edited = YES; |
419 |
|
|
420 |
|
if ( display_type != DISPLAY_SCREEN ) |
421 |
+ |
{ |
422 |
+ |
D(NSLog(@"Display type is not SCREEN (%d), resizing window", |
423 |
+ |
display_type)); |
424 |
|
resizeWinTo(newx, newy); |
425 |
+ |
} |
426 |
|
} |
427 |
|
|
428 |
|
- (IBAction) CreateVolume: (id)sender |
447 |
|
NSString *details = [NSString stringWithFormat: |
448 |
|
@"The dd command failed.\nReturn status %d (%s)", |
449 |
|
retVal, strerror(errno)]; |
450 |
< |
WarningSheet(@"Unable to create volume", details, @"OK", panel); |
450 |
> |
WarningSheet(@"Unable to create volume", details, nil, panel); |
451 |
|
} |
452 |
|
else |
453 |
|
{ |
459 |
|
} |
460 |
|
} |
461 |
|
|
462 |
+ |
- (BOOL) fileManager: (NSFileManager *) manager |
463 |
+ |
shouldProceedAfterError: (NSDictionary *) errorDict |
464 |
+ |
{ |
465 |
+ |
NSRunAlertPanel(@"File operation error", |
466 |
+ |
@"%@ %@, toPath %@", |
467 |
+ |
@"Bugger!", nil, nil, |
468 |
+ |
[errorDict objectForKey:@"Error"], |
469 |
+ |
[errorDict objectForKey:@"Path"], |
470 |
+ |
[errorDict objectForKey:@"ToPath"]); |
471 |
+ |
return NO; |
472 |
+ |
} |
473 |
+ |
|
474 |
|
- (IBAction) DeleteVolume: (id)sender |
475 |
|
{ |
476 |
< |
const char *path = [self RemoveVolumeEntry]; |
477 |
< |
if ( unlink(path) == -1 ) |
476 |
> |
// const char *path = [self RemoveVolumeEntry]; |
477 |
> |
// if ( unlink(path) == -1 ) |
478 |
> |
NSString *Path = [self RemoveVolumeEntry]; |
479 |
> |
|
480 |
> |
if ( ! [[NSFileManager defaultManager] removeFileAtPath: Path |
481 |
> |
handler: self] ) |
482 |
|
{ |
483 |
< |
NSLog(@"%s unlink(%s) failed", __PRETTY_FUNCTION__, path, strerror(errno)); |
483 |
> |
WarningSheet(@"Unable to delete volume", panel); |
484 |
> |
// NSLog(@"%s unlink(%s) failed - %s", __PRETTY_FUNCTION__, path, strerror(errno)); |
485 |
|
} |
486 |
|
} |
487 |
|
|
506 |
|
int B = (int) [bytes floatValue]; |
507 |
|
float M = B / 1024 / 1024; |
508 |
|
|
509 |
< |
NSLog(@"%s = %f %d", __PRETTY_FUNCTION__, M, B); |
509 |
> |
D(NSLog(@"%s = %f %d", __PRETTY_FUNCTION__, M, B)); |
510 |
|
PrefsReplaceInt32("ramsize", B); |
511 |
|
[MB setFloatValue: M]; |
512 |
|
edited = YES; |
550 |
|
float M = [MB floatValue]; |
551 |
|
int B = (int) (M * 1024 * 1024); |
552 |
|
|
553 |
< |
NSLog(@"%s = %f %d", __PRETTY_FUNCTION__, M, B); |
553 |
> |
D(NSLog(@"%s = %f %d", __PRETTY_FUNCTION__, M, B)); |
554 |
|
PrefsReplaceInt32("ramsize", B); |
555 |
|
[bytes setIntValue: B]; |
556 |
|
edited = YES; |
564 |
|
edited = YES; |
565 |
|
} |
566 |
|
|
488 |
– |
- (IBAction) EditRAMsize: (NSTextField *)sender |
489 |
– |
{ |
490 |
– |
int B = [bytes intValue]; |
491 |
– |
float M = B / (1024.0 * 1024.0); |
492 |
– |
|
493 |
– |
NSLog(@"%s = %d %f", __PRETTY_FUNCTION__, B, M); |
494 |
– |
PrefsReplaceInt32("ramsize", B); |
495 |
– |
[MB setFloatValue: M]; |
496 |
– |
edited = YES; |
497 |
– |
} |
498 |
– |
|
567 |
|
- (IBAction) EditROMpath: (NSTextField *)sender |
568 |
|
{ |
569 |
|
NSString *path = [ROMfile stringValue]; |
584 |
|
PrefsRemoveItem(pref,0); |
585 |
|
} |
586 |
|
|
587 |
< |
- (const char *) RemoveVolumeEntry |
587 |
> |
//- (const char *) RemoveVolumeEntry |
588 |
> |
- (NSString *) RemoveVolumeEntry |
589 |
|
{ |
590 |
|
int row = [diskImages selectedRow]; |
591 |
|
|
592 |
|
if ( row != -1 ) |
593 |
|
{ |
594 |
< |
const char *path = [[volsDS pathAtRow: row] cString], |
594 |
> |
NSString *Path = [volsDS pathAtRow: row]; |
595 |
> |
const char *path = [Path cString], |
596 |
|
*str; |
597 |
|
int tmp = 0; |
598 |
|
|
601 |
|
if ( strcmp(str, path) == 0 ) |
602 |
|
{ |
603 |
|
PrefsRemoveItem("disk", tmp); |
604 |
< |
D(NSLog(@"%s - Deleted prefs entry \"disk\", %d", __PRETTY_FUNCTION__, tmp)); |
604 |
> |
D(NSLog(@"%s - Deleted prefs entry \"disk\", %d", |
605 |
> |
__PRETTY_FUNCTION__, tmp)); |
606 |
|
edited = YES; |
607 |
|
break; |
608 |
|
} |
611 |
|
|
612 |
|
if ( str == NULL ) |
613 |
|
{ |
614 |
< |
NSLog(@"%s - Couldn't find any disk preference to match %s", __PRETTY_FUNCTION__, path); |
614 |
> |
NSLog(@"%s - Couldn't find any disk preference to match %s", |
615 |
> |
__PRETTY_FUNCTION__, path); |
616 |
|
return NULL; |
617 |
|
} |
618 |
|
|
619 |
|
if ( ! [volsDS deleteRow: row] ) |
620 |
|
NSLog (@"%s - RemoveVolume %d failed", __PRETTY_FUNCTION__, tmp); |
621 |
|
[diskImages reloadData]; |
622 |
< |
return path; |
622 |
> |
// return path; |
623 |
> |
return Path; |
624 |
|
} |
625 |
|
else |
626 |
|
{ |
627 |
< |
WarningSheet(@"Please select a volume first", @"", @"OK", panel); |
627 |
> |
WarningSheet(@"Please select a volume first", panel); |
628 |
|
return NULL; |
629 |
|
} |
630 |
|
} |
634 |
|
[self RemoveVolumeEntry]; |
635 |
|
} |
636 |
|
|
637 |
< |
- (IBAction) ResetPrefs: (id)sender |
637 |
> |
- (void) loadPrefs: (int) argc |
638 |
> |
args: (char **) argv |
639 |
|
{ |
566 |
– |
int argc = 0; |
567 |
– |
char **argv = NULL; |
568 |
– |
|
640 |
|
[panel close]; // Temporarily hide preferences panel |
641 |
|
|
642 |
|
PrefsExit(); // Purge all the old pref values |
652 |
|
edited = NO; |
653 |
|
} |
654 |
|
|
655 |
+ |
- (IBAction) LoadPrefs: (id)sender |
656 |
+ |
{ |
657 |
+ |
int argc = 2; |
658 |
+ |
char *argv[2]; |
659 |
+ |
|
660 |
+ |
argv[0] = "--prefs", |
661 |
+ |
argv[1] = (char *) [[prefsFile stringValue] cString]; |
662 |
+ |
|
663 |
+ |
[self loadPrefs: argc |
664 |
+ |
args: argv]; |
665 |
+ |
} |
666 |
+ |
|
667 |
+ |
- (IBAction) ResetPrefs: (id)sender |
668 |
+ |
{ |
669 |
+ |
[self loadPrefs: 0 |
670 |
+ |
args: NULL]; |
671 |
+ |
} |
672 |
+ |
|
673 |
|
- (void) setStringOf: (NSTextField *) field |
674 |
|
fromPref: (const char *) prefName |
675 |
|
{ |
689 |
|
{ |
690 |
|
NSTableColumn *locks; |
691 |
|
const char *str; |
692 |
< |
int cpu, tmp; |
692 |
> |
int cpu, tmp, val; |
693 |
|
|
694 |
|
|
695 |
|
// Set simple single field items |
696 |
|
|
697 |
< |
tmp = PrefsFindInt32("frameskip"); |
698 |
< |
[delay setIntValue: tmp]; |
699 |
< |
if ( tmp ) |
700 |
< |
[frequency setFloatValue: 60.0 / tmp]; |
697 |
> |
val = PrefsFindInt32("frameskip"); |
698 |
> |
[delay setIntValue: val]; |
699 |
> |
if ( val ) |
700 |
> |
[frequency setFloatValue: 60.0 / val]; |
701 |
|
else |
702 |
|
[frequency setFloatValue: 60.0]; |
703 |
|
|
704 |
< |
tmp = PrefsFindInt32("ramsize"); |
705 |
< |
[bytes setIntValue: tmp]; |
706 |
< |
[MB setFloatValue: tmp / (1024.0 * 1024.0)]; |
704 |
> |
val = PrefsFindInt32("ramsize"); |
705 |
> |
[bytes setIntValue: val]; |
706 |
> |
[MB setFloatValue: val / (1024.0 * 1024.0)]; |
707 |
|
|
708 |
|
[disableCD setState: PrefsFindBool("nocdrom")]; |
709 |
|
[disableSound setState: PrefsFindBool("nosound")]; |
715 |
|
[self setStringOf: printer fromPref: "serialb"]; |
716 |
|
[self setStringOf: ROMfile fromPref: "rom" ]; |
717 |
|
|
718 |
+ |
[prefsFile setStringValue: [NSString stringWithCString: UserPrefsPath.c_str()] ]; |
719 |
+ |
|
720 |
|
|
721 |
|
parse_screen_prefs(PrefsFindString("screen")); |
722 |
|
|
724 |
|
[height setIntValue: init_height]; |
725 |
|
[depth setIntValue: init_depth]; |
726 |
|
|
727 |
< |
[window setState: NO]; |
727 |
> |
[screen setState: NO]; |
728 |
|
switch ( display_type ) |
729 |
|
{ |
730 |
|
case DISPLAY_WINDOW: [window setState: YES]; break; |
640 |
– |
case DISPLAY_OPENGL: [openGL setState: YES]; break; |
731 |
|
case DISPLAY_SCREEN: [screen setState: YES]; break; |
732 |
|
} |
733 |
|
|
735 |
|
|
736 |
|
// Radio button groups: |
737 |
|
|
738 |
< |
tmp = PrefsFindInt32("bootdriver"); |
739 |
< |
[bootFromAny setState: tmp != CDROMRefNum]; |
740 |
< |
[bootFromCD setState: tmp == CDROMRefNum]; |
738 |
> |
val = PrefsFindInt32("bootdriver"); |
739 |
> |
[bootFromAny setState: val != CDROMRefNum]; |
740 |
> |
[bootFromCD setState: val == CDROMRefNum]; |
741 |
|
|
742 |
|
cpu = PrefsFindInt32("cpu"); |
743 |
< |
tmp = PrefsFindInt32("modelid"); |
743 |
> |
val = PrefsFindInt32("modelid"); |
744 |
|
|
745 |
|
#if REAL_ADDRESSING || DIRECT_ADDRESSING |
746 |
|
puts("Current memory model does not support 24bit addressing"); |
747 |
< |
if ( tmp == [classic tag] ) |
747 |
> |
if ( val == [classic tag] ) |
748 |
|
{ |
749 |
|
// Window already created by NIB file, just display |
750 |
|
[panel makeKeyAndOrderFront:self]; |
751 |
|
WarningSheet(@"Compiled-in memory model does not support 24bit", |
752 |
< |
@"Disabling Mac Classic emulation", @"OK", panel); |
752 |
> |
@"Disabling Mac Classic emulation", nil, panel); |
753 |
|
cpu = [CPU68030 tag]; |
754 |
|
PrefsReplaceInt32("cpu", cpu); |
755 |
< |
tmp = [IIci tag]; |
756 |
< |
PrefsReplaceInt32("modelid", tmp); |
755 |
> |
val = [IIci tag]; |
756 |
> |
PrefsReplaceInt32("modelid", val); |
757 |
|
} |
758 |
|
|
759 |
|
puts("Disabling 68000 & Mac Classic buttons"); |
766 |
|
[CPU68030 setState: [CPU68030 tag] == cpu]; |
767 |
|
[CPU68040 setState: [CPU68040 tag] == cpu]; |
768 |
|
|
769 |
< |
[classic setState: [classic tag] == tmp]; |
770 |
< |
[IIci setState: [IIci tag] == tmp]; |
771 |
< |
[quadra900 setState: [quadra900 tag] == tmp]; |
769 |
> |
[classic setState: [classic tag] == val]; |
770 |
> |
[IIci setState: [IIci tag] == val]; |
771 |
> |
[quadra900 setState: [quadra900 tag] == val]; |
772 |
|
|
773 |
|
|
774 |
|
// Lists of thingies: |
775 |
|
|
776 |
+ |
val = PrefsFindInt32("keyboardtype"); |
777 |
+ |
[keyboard selectItemAtIndex: [keyboard indexOfItemWithTag: val]]; |
778 |
+ |
for ( tmp = 0; tmp < [keyboard numberOfItems]; ++tmp ) |
779 |
+ |
{ |
780 |
+ |
NSMenuItem *type = [keyboard itemAtIndex: tmp]; |
781 |
+ |
[type setState: [type tag] == val]; |
782 |
+ |
} |
783 |
+ |
|
784 |
+ |
|
785 |
|
for ( tmp = 0; tmp < 7; ++tmp) |
786 |
|
{ |
787 |
|
char pref[6]; |