Changeset 1394
- Timestamp:
- 11/05/11 04:52:08 (20 months ago)
- Location:
- trunk/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/console.c
r1003 r1394 147 147 void console_add_line(const char *str) 148 148 { 149 // Set console_autoredraw to -1 to stop script print statements from being displayed on screen 150 // Can be used to send script output to a file (using print_screen function); but not have it displayed 151 // on the LCD. 152 if (console_autoredraw == -1) 153 return; 154 149 155 console_ensure_inited(); 150 156 -
trunk/core/script.c
r1359 r1394 422 422 void script_print_screen_statement(int val) 423 423 { 424 // Negative values for 'val' parameter will append to log file, 425 // positive values will truncate the log file 426 int flag_trunc = O_TRUNC; 427 424 428 print_screen_p = val; 425 429 if (val) { 426 430 if (print_screen_d>=0) close(print_screen_d); 427 if (val<0) val = -val; 431 if (val<0) { 432 flag_trunc = 0; 433 val = -val; 434 } 428 435 while (val > 9999) val -= 10000; 429 436 sprintf(print_screen_file, "A/CHDK/LOGS/LOG_%04d.TXT", val); 430 print_screen_d = open(print_screen_file, O_WRONLY|O_CREAT| O_TRUNC, 0777);437 print_screen_d = open(print_screen_file, O_WRONLY|O_CREAT|flag_trunc, 0777); 431 438 } 432 439 }
Note: See TracChangeset
for help on using the changeset viewer.