Chameleon

Chameleon Commit Details

Date:2011-06-17 21:00:40 (12 years 10 months ago)
Author:Azimutz
Commit:1021
Parents: 1020
Message:Revert changes made on r926, r926 & r940. Fixes "issue" #83. Hide a comment from build log on i386 folder makefile, i left unhidden.
Changes:
M/trunk/i386/libsaio/console.c
M/trunk/i386/boot2/resume.c
M/trunk/i386/boot2/boot.c
M/trunk/i386/libsa/libsa.h
M/trunk/i386/boot2/modules.c
M/trunk/i386/boot2/boot.h
M/trunk/i386/modules/HelloWorld/HelloWorld.cpp
M/trunk/i386/libsa/string.c
M/trunk/i386/libsaio/load.c
M/trunk/i386/libsaio/biosfn.c
M/trunk/i386/libsaio/acpi_patcher.c
M/trunk/i386/util/fdisk/misc.c
M/trunk/i386/boot2/gui.c
M/trunk/i386/libsaio/disk.c
M/trunk/i386/libsaio/saio_internal.h
M/trunk/i386/boot2/gui.h
M/trunk/i386/boot2/ramdisk.c
M/trunk/i386/boot2/options.c
M/trunk/i386/boot2/Makefile
M/trunk/i386/libsaio/xml.c
M/trunk/i386/libsaio/hpet.c

File differences

trunk/i386/libsaio/xml.c
355355
356356
357357
358
358
359359
360360
361361
......
380380
381381
382382
383
383
384384
385385
386386
......
423423
424424
425425
426
426
427427
428428
429429
......
448448
449449
450450
451
451
452452
453453
454454
......
669669
670670
671671
672
672
673673
674674
675675
......
710710
711711
712712
713
713
714714
715715
716716
......
731731
732732
733733
734
734
735735
736736
737737
......
771771
772772
773773
774
774
775775
776776
777777
......
803803
804804
805805
806
806
807807
808808
809809
else
{
printf("ParseStringID error (0x%x)\n", *val);
getchar();
getc(); //Azi: getchar();
return -1;
}
}
else
{
printf("ParseStringIDREF error (0x%x)\n", *val);
getchar();
getc(); //Azi: getchar();
return -1;
}
}
else
{
printf("ParseIntegerID error (0x%x)\n", *val);
getchar();
getc(); //Azi: getchar();
return -1;
}
}
else
{
printf("ParseStringIDREF error (0x%x)\n", *val);
getchar();
getc(); //Azi: getchar();
return -1;
}
}
if(buffer[0] == '<')
{
printf("Warning integer is non existant\n");
getchar();
getc(); //Azi: getchar();
tmpTag = NewTag();
tmpTag->type = kTagTypeInteger;
tmpTag->string = 0;
else
{
printf("ParseTagInteger hex error (0x%x) in buffer %s\n", *val, buffer);
getchar();
getc(); //Azi: getchar();
return -1;
}
}
if (*val < '0' || *val > '9')
{
printf("ParseTagInteger decimal error (0x%x) in buffer %s\n", *val, buffer);
getchar();
getc(); //Azi: getchar();
return -1;
}
//printf("ParseTagData unimplimented\n");
//printf("Data: %s\n", buffer);
//getchar();
//getc(); //Azi: getchar();
// TODO: base64 decode
if (tmpTag == 0) return -1;
printf("ParseTagDate unimplimented\n");
getchar();
getc(); //Azi: getchar();
tmpTag->type = kTagTypeDate;
tmpTag->string = 0;
trunk/i386/libsaio/console.c
158158
159159
160160
161
161
162162
163163
164164
165
165
166166
167
167
168168
169169
170170
......
263263
264264
265265
266
267
266
267
268268
// Read and echo a character from console. This doesn't echo backspace
// since that screws up higher level handling
int getchar()
int getchar() //Azi: study!!!
{
register int c = getc();
if ( c == '\r' ) c = '\n';
if ( c == '\r' ) c = '\n'; //Azi: CR/LF ??
if ( c >= ' ' && c < 0x7f) putchar(c);
if ( c >= ' ' && c < 0x7f) putchar(c); //Azi: check gui.h - kReturnKey, etc...
return (c);
}
void pause()
{
printf("Press a key to continue...\n");
getchar(); //getc(); //Azi: getc works here because the function is up above; changed for now.
// replace getchar() by pause() ??
getc(); //getchar(); //Azi: getc works here because the function is up above.
// replace get/getchar by pause() ??
}
trunk/i386/libsaio/acpi_patcher.c
10581058
10591059
10601060
1061
1061
10621062
10631063
10641064
}
#if DEBUG_ACPI
printf("Press a key to continue... (DEBUG_ACPI)\n");
getchar();
getc(); //Azi: getchar();
#endif
return 1;
}
trunk/i386/libsaio/load.c
135135
136136
137137
138
138
139139
140140
141141
......
219219
220220
221221
222
222
223223
224224
225225
......
239239
240240
241241
242
242
243243
244244
245245
......
317317
318318
319319
320
320
321321
322322
323323
printf("ncmds: %x\n", (unsigned)mH->ncmds);
printf("sizeofcmds: %x\n", (unsigned)mH->sizeofcmds);
printf("flags: %x\n", (unsigned)mH->flags);
getchar();
getc(); //Azi: getchar();;
#endif
ncmds = mH->ncmds;
printf("segname: %s, vmaddr: %x, vmsize: %x, fileoff: %x, filesize: %x, nsects: %d, flags: %x.\n",
segCmd->segname, (unsigned)vmaddr, (unsigned)vmsize, (unsigned)fileaddr, (unsigned)filesize,
(unsigned) segCmd->nsects, (unsigned)segCmd->flags);
getchar();
getc(); //Azi: getchar();
#endif
}
else
printf("segname: %s, vmaddr: %x, vmsize: %x, fileoff: %x, filesize: %x, nsects: %d, flags: %x.\n",
segCmd->segname, (unsigned)vmaddr, (unsigned)vmsize, (unsigned)fileaddr, (unsigned)filesize,
(unsigned) segCmd->nsects, (unsigned)segCmd->flags);
getchar();
getc(); //Azi: getchar();
#endif
}
#if DEBUG
printf("symoff: %x, nsyms: %x, stroff: %x, strsize: %x\n",
symTab->symoff, symTab->nsyms, symTab->stroff, symTab->strsize);
getchar();
getc(); //Azi: getchar();
#endif
symsSize = symTab->stroff - symTab->symoff;
trunk/i386/libsaio/disk.c
16361636
16371637
16381638
1639
1639
16401640
16411641
16421642
printf(" bvr: %d, dev: %d, part: %d, flags: %d, vis: %d\n", bvr, bvr->biosdev, bvr->part_no, bvr->flags, bvr->visible);
}
printf("count: %d\n", bvCount);
getchar();
getc(); //Azi: getchar();
#endif
*count = bvCount;
trunk/i386/libsaio/hpet.c
9898
9999
100100
101
101
102102
103103
#if DEBUG_HPET
printf("Press [Enter] to continue...\n");
getchar();
getc(); //Azi: getchar();
#endif
}
trunk/i386/libsaio/biosfn.c
185185
186186
187187
188
188
189189
190190
191191
......
252252
253253
254254
255
255
256256
257257
258
258
259259
260260
261261
......
509509
510510
511511
512
512
513
513514
514515
515516
......
675676
676677
677678
678
679
680
679681
680682
681683
// Some BIOSes will simply ignore the value of ECX on entry.
// Probably best to keep its value at 20 to avoid surprises.
//printf("Get memory map 0x%x, %d\n", rangeArray); getchar();
//printf("Get memory map 0x%x, %d\n", rangeArray); getc(); //Azi: getchar();
if (maxRangeCount > (BIOS_LEN / sizeof(MemoryRange))) {
maxRangeCount = (BIOS_LEN / sizeof(MemoryRange));
}
#if DEBUG
{
int i;
printf("%d total ranges\n", count); getchar();
printf("%d total ranges\n", count); getc(); //Azi: getchar();
for (i=0, range = rangeArray; i<count; i++, range++) {
printf("range: type %d, base 0x%x, length 0x%x\n",
range->type, (unsigned int)range->base, (unsigned int)range->length); getchar();
range->type, (unsigned int)range->base, (unsigned int)range->length); getc(); //Azi: getchar();
}
}
#endif
printf("media_type: %x\n", pkt.media_type);
printf("drive_num: %x\n", pkt.drive_num);
printf("device_spec: %x\n", pkt.device_spec);
printf("press a key->\n"); getchar();
//printf("press a key->\n"); getc(); //Azi: getchar();
pause();
#endif
/* Some BIOSes erroneously return cf = 1 */
print_drive_info(di);
printf("uses_ebios = 0x%x\n", dp->uses_ebios);
printf("result %d\n", ret);
printf("press a key->\n"); getchar();
//printf("press a key->\n"); getc(); //Azi: getchar();
pause();
#endif
if (ret == 0) {
trunk/i386/libsaio/saio_internal.h
4949
5050
5151
52
52
53
5354
5455
5556
extern int ebiosEjectMedia(int biosdev);
extern void bios_putchar(int ch);
extern void putca(int ch, int attr, int repeat);
extern void pause();
extern int getc(void); //Azi: getchar();
extern void pause(); //Azi: replace getc/getchar with ? console.c - btw, what is it doing here ?? there's a console.c section below...
extern int readKeyboardStatus(void);
extern int readKeyboardShiftFlags(void);
extern unsigned int time18(void);
trunk/i386/boot2/Makefile
125125
126126
127127
128
128
129129
130130
131131
endif
# this is done in a sub process after boot.sys exists so the strings are populated correctly
@# this is done in a sub process after boot.sys exists so the strings are populated correctly
@make embed_symbols
@${RM} $(SYMROOT)/boot2.sys
trunk/i386/boot2/resume.c
119119
120120
121121
122
122
123123
124124
125125
......
143143
144144
145145
146
146
147147
148148
149149
printf ("Resuming from Encrypted image is unsupported.\n"
"Uncheck \"Use secure virtual memory\" in \"Security\" pane on system preferences.\n"
"Press any key to proceed with normal boot.\n");
getchar ();
getc(); //Azi: getchar();
return;
}
// depends on NVRAM
if (!((long long)mem_base+allocSize<1024*bootInfo->extmem+0x100000))
{
printf ("Not enough space to restore image. Press any key to proceed with normal boot.\n");
getchar ();
getc(); //Azi: getchar();
return;
}
trunk/i386/boot2/boot.c
185185
186186
187187
188
188
189189
190190
191191
......
350350
351351
352352
353
353
354354
355355
356356
bool dummyVal;
if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal) {
printf("Press any key to continue...");
getchar();
getc(); //Azi: getchar();
}
usb_loop();
#if DEBUG
printf(" Default: %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBootVolume, gBootVolume->biosdev, gBootVolume->part_no, gBootVolume->flags);
printf(" bt(0,0): %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBIOSBootVolume, gBIOSBootVolume->biosdev, gBIOSBootVolume->part_no, gBIOSBootVolume->flags);
getchar();
getc(); //Azi: getchar();
#endif
useGUI = true;
trunk/i386/boot2/boot.h
9898
9999
100100
101
102
101
102
103103
104104
105105
#define kUseNvidiaROM"UseNvidiaROM"/* nvidia.c */
#define kVBIOS"VBIOS"/* nvidia.c */
#define kdcfg0 "display_0"/* nvidia.c */
#define kdcfg1 "display_1"/* nvidia.c */
#define kdcfg0"display_0"/* nvidia.c */
#define kdcfg1"display_1"/* nvidia.c */
#define kEthernetBuiltIn"EthernetBuiltIn"/* pci_setup.c */
#define kGraphicsEnabler"GraphicsEnabler"/* pci_setup.c */
trunk/i386/boot2/modules.c
1616
1717
1818
19
19
2020
2121
2222
......
8686
8787
8888
89
89
9090
9191
9292
......
185185
186186
187187
188
188
189189
190190
191191
......
304304
305305
306306
307
307
308308
309309
310310
......
370370
371371
372372
373
373
374374
375375
376376
......
379379
380380
381381
382
382
383383
384384
385385
......
891891
892892
893893
894
894
895895
896896
897897
......
910910
911911
912912
913
913
914914
915915
916916
......
928928
929929
930930
931
931
932932
933933
934934
......
953953
954954
955955
956
956
957957
958958
959959
......
10851085
10861086
10871087
1088
1088
10891089
10901090
10911091
......
11331133
11341134
11351135
1136
1136
11371137
11381138
11391139
#if CONFIG_MODULE_DEBUG
#define DBG(x...)printf(x);
#define DBGPAUSE()getchar()
#define DBGPAUSE()getc() // getchar();
#else
#define DBG(x...)
#define DBGPAUSE()
else
{
// The module does not have a valid start function
printf("Unable to start %s\n", SYMBOLS_MODULE); getchar();
printf("Unable to start %s\n", SYMBOLS_MODULE); getc(); //Azi: getchar();
}
}
}
else // The module does not have a valid start function. This may be a library.
{
printf("WARNING: Unable to start %s\n", module);
getchar();
getc(); //Azi: getchar();
}
#else
else msglog("WARNING: Unable to start %s\n", module);
#if CONFIG_MODULE_DEBUG
printf("Unable to locate symbol %s\n", name);
getchar();
getc(); //Azi: getchar();
#endif
if(strcmp(name, VOID_SYMBOL) == 0) return 0xFFFFFFFF;
else
{
verbose("Invalid mach magic 0x%X\n", ((struct mach_header*)binary)->magic);
//getchar();
//getc(); //Azi: getchar();
return NULL;
}
/*if(((struct mach_header*)binary)->filetype != MH_DYLIB)
{
printf("Module is not a dylib. Unable to load.\n");
getchar();
getc(); //Azi: getchar();
return NULL; // Module is in the incorrect format
}*/
else
{
printf("Unable to bind symbol %s\n", symbolName);
getchar();
getc(); //Azi: getchar();
}
segmentAddress += sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getchar();
getc(); //Azi: getchar();
}
segmentAddress += tmp + sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getchar();
getc(); //Azi: getchar();
}
segmentAddress += (immediate * sizeof(void*)) + sizeof(void*);
else
{
printf("Unable to bind symbol %s\n", symbolName);
getchar();
getc(); //Azi: getchar();
}
break;
}
#if CONFIG_MODULE_DEBUG
//print_hook_list();
//getchar();
//getc(); //Azi: getchar();
#endif
}
void dyld_stub_binder()
{
printf("ERROR: dyld_stub_binder was called, should have been take care of by the linker.\n");
getchar();
getc(); //Azi: getchar();
}
#else /* CONFIG_MODULES */
trunk/i386/boot2/gui.c
142142
143143
144144
145
146
145
146
147147
148
149
148150
149151
150152
......
910912
911913
912914
913
914
915
916
915917
916918
917919
......
927929
928930
929931
932
933
934
935
936
937
938
939
940
930941
931942
932943
......
938949
939950
940951
941
952
942953
943
944
954
955
945956
946957
947958
948
959
960
961
949962
950963
951964
......
15691582
15701583
15711584
1572
1585
15731586
15741587
15751588
extern MenuItem *menuItems;
//char prompt[BOOT_STRING_LEN];
extern char gBootArgs[BOOT_STRING_LEN];
char prompt[BOOT_STRING_LEN];
//extern char gBootArgs[BOOT_STRING_LEN]; //Azi: getchar/prompt stuff
int prompt_pos = 0;
char prompt_text[] = "boot: ";
menuitem_t infoMenuItems[] =
void clearGraphicBootPrompt()
{
// clear text buffer
//prompt[0] = '\0';
//prompt_pos=0;
prompt[0] = '\0'; //Azi: getchar/prompt stuff
prompt_pos=0;
if(gui.bootprompt.draw == true )
void updateGraphicBootPrompt(int key)
{
if ( key == kBackspaceKey ) //Azi: getchar/prompt stuff
prompt[--prompt_pos] = '\0';
else
{
prompt[prompt_pos] = key;
prompt_pos++;
prompt[prompt_pos] = '\0';
}
fillPixmapWithColor( gui.bootprompt.pixmap, gui.bootprompt.bgcolor);
makeRoundedCorners( gui.bootprompt.pixmap);
// get the position of the end of the boot prompt text to display user input
position_t p_prompt = pos( p_text.x + ( ( strlen(prompt_text) ) * font_console.chars[0]->width ), p_text.y );
//Azi: getchar/prompt stuff
// calculate the position of the cursor
intoffset = ( strlen(gBootArgs) - ( ( gui.bootprompt.width / font_console.chars[0]->width ) - strlen(prompt_text) - 2 ) );
intoffset = ( prompt_pos - ( ( gui.bootprompt.width / font_console.chars[0]->width ) - strlen(prompt_text) - 2 ) );
if ( offset < 0)
offset = 0;
drawStr( gBootArgs, &font_console, gui.bootprompt.pixmap, p_prompt);
drawStr( prompt+offset, &font_console, gui.bootprompt.pixmap, p_prompt);
// end
drawStr( prompt + offset, &font_console, gui.bootprompt.pixmap, p_prompt);
gui.menu.draw = false;
gui.bootprompt.draw = true;
updateVRAM();
key = getchar();
key = getc(); //Azi: getchar();
if( key == kUpArrowkey )
if( currentline > 0 )
trunk/i386/boot2/gui.h
11
2
3
2
3
44
5
6
7
5
6
7
88
99
1010
......
1919
2020
2121
22
22
2323
2424
2525
26
26
2727
2828
29
30
29
30
3131
32
33
34
32
33
34
3535
3636
3737
38
38
3939
4040
4141
4242
43
44
45
46
43
44
45
46
4747
48
49
50
48
49
50
5151
5252
5353
/*
* gui.h
*
*gui.h
*
*
* Created by Jasmin Fazlic on 18.12.08.
* Copyright 2008/09 Jasmin Fazlic All rights reserved.
* Copyright 2008/09 iNDi All rights reserved.
*Created by Jasmin Fazlic on 18.12.08.
*Copyright 2008/09 Jasmin Fazlic All rights reserved.
*Copyright 2008/09 iNDi All rights reserved.
*
*/
#define CHARACTERS_COUNT223
#define BOOT_NORMAL0
#define BOOT_NORMAL0
#define BOOT_VERBOSE1
#define BOOT_IGNORECACHE2
#define BOOT_SINGLEUSER3
#define DO_NOT_BOOT4
#define DO_NOT_BOOT4
#define CLOSE_INFO_MENU5
#define INFOMENU_NATIVEBOOT_START 1
#define INFOMENU_NATIVEBOOT_END3
#define INFOMENU_NATIVEBOOT_START1
#define INFOMENU_NATIVEBOOT_END3
#define MENU_SHOW_MEMORY_INFO4
#define MENU_SHOW_VIDEO_INFO5
#define MENU_SHOW_HELP6
#define MENU_SHOW_MEMORY_INFO4
#define MENU_SHOW_VIDEO_INFO5
#define MENU_SHOW_HELP6
enum {
HorizontalLayout= 0,
VerticalLayout= 1,
VerticalLayout= 1
};
enum {
kBackspaceKey= 0x08,
kTabKey= 0x09,
kReturnKey= '\n',
kEscapeKey= 0x1b,
kUpArrowkey= 0x4800,
kTabKey= 0x09,
kReturnKey= 0x0d, // '\n', //Azi: r926
kEscapeKey= 0x1b,
kUpArrowkey= 0x4800,
kDownArrowkey= 0x5000,
kASCIIKeyMask= 0x7f,
kF5Key= 0x3f00,
kF10Key= 0x4400
kASCIIKeyMask= 0x7f, //Azi: getchar()***
kF5Key= 0x3f00,
kF10Key= 0x4400
};
/*
trunk/i386/boot2/ramdisk.c
290290
291291
292292
293
293
294294
295295
296296
......
303303
304304
305305
306
306
307307
308308
309309
setCursorPosition(0, 0, 1);
showInfoRAMDisk();
printf("\n\nPress any key to continue.\n");
getchar();
getc(); //Azi: getchar();
setActiveDisplayPage(0);
}
else
printf("\n?rd m <filename> - mount ramdisk image\n?rd u - unmount ramdisk image");
printf("\n?rd e - enable bt(0,0) alias\n?rd d - disable bt(0,0) alias");
printf("\n\nPress any key to continue.\n");
getchar();
getc(); //Azi: getchar();
setActiveDisplayPage(0);
}
}
trunk/i386/boot2/options.c
172172
173173
174174
175
175
176
176177
177178
178179
......
205206
206207
207208
208
209
210
209
210
211
212
211213
212214
213
215
214216
215217
216218
......
218220
219221
220222
221
223
222224
223225
224226
225227
226
228
229
227230
228231
229232
......
237240
238241
239242
240
243
241244
242245
243246
......
253256
254257
255258
256
257
258
259
260
261
262
263
264
265
266
267
259
260
261
262
263
264
265
268266
269267
270268
271269
272270
273
274
271
272
273
274
275
276
275277
276
278
277279
278280
279281
......
915917
916918
917919
918
920
919921
920922
921923
......
13871389
13881390
13891391
1390
1392
13911393
13921394
13931395
......
14541456
14551457
14561458
1457
1459
14581460
14591461
14601462
......
15051507
15061508
15071509
1508
1510
15091511
15101512
15111513
//==========================================================================
char gBootArgs[BOOT_STRING_LEN];
//char gBootArgs[BOOT_STRING_LEN];
static char gBootArgs[BOOT_STRING_LEN];
static char * gBootArgsPtr = gBootArgs;
static char * gBootArgsEnd = gBootArgs + BOOT_STRING_LEN - 1;
static char booterCommand[BOOT_STRING_LEN];
extern char bootPrompt[];
extern char bootRescanPrompt[];
if( bootArgs->Video.v_display == VGA_TEXT_MODE ) {
changeCursor( strlen(gBootArgs), row, kCursorTypeUnderline, 0 );
//clearScreenRows( row, kScreenLastRow );
if ( bootArgs->Video.v_display == VGA_TEXT_MODE ) {
//Azi: getchar/prompt stuff
changeCursor( 0, row, kCursorTypeUnderline, 0 );
clearScreenRows( row, kScreenLastRow );
}
//clearBootArgs();
clearBootArgs();
if (visible) {
if (bootArgs->Video.v_display == VGA_TEXT_MODE) {
printf( bootRescanPrompt );
} else {
printf( bootPrompt );
printf( gBootArgs );
// printf( gBootArgs );
}
}
} else {
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
//clearGraphicBootPrompt();
clearGraphicBootPrompt();
// End
} else {
printf("Press Enter to start up the foreign OS. ");
}
key &= kASCIIKeyMask;
switch ( key )
{
{
case kBackspaceKey:
if ( gBootArgsPtr > gBootArgs )
{
{
setCursorPosition( x, y, 0 );
putca(' ', 0x07, 1);
}
*gBootArgsPtr-- = '\0';
updateGraphicBootPrompt(kBackspaceKey);
}
else
{
*gBootArgsPtr = '\0';
if( bootArgs->Video.v_display == VGA_TEXT_MODE ) putca(' ', 0x07, 1);
updateGraphicBootPrompt(kBackspaceKey);
}
//Azi: getchar/prompt stuff
} else
updateGraphicBootPrompt(kBackspaceKey);
*gBootArgsPtr-- = '\0';
}
break;
default:
if ( key >= ' ' && gBootArgsPtr < gBootArgsEnd)
{
*gBootArgsPtr++ = key;
updateGraphicBootPrompt(key);
if( bootArgs->Video.v_display == VGA_TEXT_MODE )
putchar(key); // echo to screen
else
updateGraphicBootPrompt(key);
*gBootArgsPtr++ = key;
// end
}
break;
}
}
// reset cursor co-ords
gui.debug.cursor = pos( gui.screen.width - 160 , 10 );
}
key = getchar();
key = getc(); //Azi: getchar();
updateMenu( key, (void **) &menuBVR );
newShowPrompt = (gDeviceCount == 0) || (menuBVR->flags & kBVFlagNativeBoot);
printf("[Type %s%sq to quit viewer]", (line_offset > 0) ? "p for previous page, " : "", (*bp != '\1') ? "space for next page, " : "");
}
c = getchar();
c = getc(); //Azi: getchar();
if (c == 'q' || c == 'Q') {
break;
}
printf("Typical boot devices are 80 (First HD), 81 (Second HD)\n");
printf("Enter two-digit hexadecimal boot device [%02x]: ", bootdevice);
do {
key = getchar();
key = getc(); //Azi: getchar();
switch (key & kASCIIKeyMask) {
case kBackspaceKey:
if (digitsI > 0) {
bool promptForRescanOption(void)
{
printf("\nWould you like to enable media rescan option?\nPress ENTER to enable or any key to skip.\n");
if (getchar() == kReturnKey) {
if (getc() == kReturnKey) { //Azi: getchar();
return true;
} else {
return false;
trunk/i386/modules/HelloWorld/HelloWorld.cpp
3535
3636
3737
38
39
40
41
38
4239
4340
4441
......
4643
4744
4845
49
5046
5147
5248
delete obj2;
printf("Hello world from ExecKernel hook. Binary located at 0x%X\n", binary);
getchar();
//
getc(); //Azi: getchar(); ??
}
void HelloWorld_start()
//printf("Hooking 'ExecKernel'\n");
register_hook_callback("ExecKernel", &helloWorld);
register_hook_callback("Kernel Start", &helloWorld);
}
void HW::printHello()
trunk/i386/libsa/libsa.h
9393
9494
9595
96
96
9797
9898
9999
extern int strncmp(const char * s1, const char * s2, size_t n);
extern char * strcpy(char * s1, const char * s2);
extern char * strncpy(char * s1, const char * s2, size_t n);
extern size_t strlcpy(char * s1, const char * s2, size_t n);
extern size_t strlcpy(char * s1, const char * s2, size_t n); //Azi: ?? check!
extern char * strstr(const char *in, const char *str);
extern int atoi(const char * str);
extern int ptol(const char * str);
trunk/i386/libsa/string.c
166166
167167
168168
169
169
170170
171171
172172
}
size_t
strlcpy(char * s1, const char * s2, size_t n)
strlcpy(char * s1, const char * s2, size_t n) //Azi: libsa.h
{
while (n && (*s1++ = *s2++))
n--;
trunk/i386/util/fdisk/misc.c
142142
143143
144144
145
145
146146
147
147
148148
149149
150150
printf("%s [%c] ", str, default_answer ? 'y' : 'n');
fflush(stdout);
first = ch = getchar();
first = ch = getchar(); //Azi: what about these ?
while (ch != '\n' && ch != EOF)
ch = getchar();
ch = getchar(); //Azi: not messing them :P
if (ch == EOF || first == EOF)
errx(1, "eof");

Archive Download the corresponding diff file

Revision: 1021