projects
/
physik
/
morpheus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8d3f810
)
added no_wait for interaction check
author
hackbard
<hackbard>
Wed, 23 Apr 2003 14:30:10 +0000
(14:30 +0000)
committer
hackbard
<hackbard>
Wed, 23 Apr 2003 14:30:10 +0000
(14:30 +0000)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
08c6a6c
..
b2ca816
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-55,6
+55,7
@@
int usage()
puts("-R <file> \t read random data from file (default not used)");
puts("-D <file> \t dump cell info into <file> (default not used)");
puts("-L <file> \t load cell info and display it (default no)");
puts("-R <file> \t read random data from file (default not used)");
puts("-D <file> \t dump cell info into <file> (default not used)");
puts("-L <file> \t load cell info and display it (default no)");
+ puts("-n \t do not wait for user interaction (default no)");
return -23;
}
return -23;
}
@@
-255,6
+256,7
@@
int main(int argc,char **argv)
int quit=0; /* continue/quit status */
char save_file[MAX_CHARS_SAVE_FILE];
char load_file[MAX_CHARS_LOAD_FILE];
int quit=0; /* continue/quit status */
char save_file[MAX_CHARS_SAVE_FILE];
char load_file[MAX_CHARS_LOAD_FILE];
+ unsigned char no_wait;
printfd("debug: sizeof my u32 variable: %d\n",sizeof(u32));
printfd("debug: sizeof my cell struct: %d\n",sizeof(cell));
printfd("debug: sizeof my u32 variable: %d\n",sizeof(u32));
printfd("debug: sizeof my cell struct: %d\n",sizeof(cell));
@@
-279,6
+281,7
@@
int main(int argc,char **argv)
strcpy(random_file,"");
strcpy(save_file,"");
strcpy(load_file,"");
strcpy(random_file,"");
strcpy(save_file,"");
strcpy(load_file,"");
+ no_wait=0;
/* parse command args */
for(i=1;i<argc;i++)
/* parse command args */
for(i=1;i<argc;i++)
@@
-348,6
+351,9
@@
int main(int argc,char **argv)
case 'L':
strcpy(load_file,argv[++i]);
break;
case 'L':
strcpy(load_file,argv[++i]);
break;
+ case 'n':
+ no_wait=1;
+ break;
default:
usage();
return -23;
default:
usage();
return -23;
@@
-439,12
+445,16
@@
int main(int argc,char **argv)
/* display again and listen for events */
display_draw(&display,display_x,display_y,display_z);
/* display again and listen for events */
display_draw(&display,display_x,display_y,display_z);
- display_event_init(&display);
-
while(!qu
it)
+
if(!no_wa
it)
{
{
- display_scan_event(&display,&display_x,&display_y,&display_z,&quit);
- display_draw(&display,display_x,display_y,display_z);
+ display_event_init(&display);
+
+ while(!quit)
+ {
+ display_scan_event(&display,&display_x,&display_y,&display_z,&quit);
+ display_draw(&display,display_x,display_y,display_z);
+ }
}
display_release(&display);
}
display_release(&display);