Changeset 1542
- Timestamp:
- 01/11/12 12:58:46 (17 months ago)
- Location:
- branches/reyalp-flt
- Files:
-
- 23 edited
-
core/Makefile (modified) (1 diff)
-
core/conf.c (modified) (18 diffs)
-
core/curves.c (modified) (1 diff)
-
core/edgeoverlay.c (modified) (17 diffs)
-
core/gui.c (modified) (2 diffs)
-
core/gui_debug.c (modified) (1 diff)
-
core/gui_fselect.c (modified) (1 diff)
-
core/gui_games.c (modified) (1 diff)
-
core/gui_grid.c (modified) (7 diffs)
-
core/gui_read.c (modified) (21 diffs)
-
core/gui_sokoban.c (modified) (9 diffs)
-
core/main.c (modified) (3 diffs)
-
core/module_exportlist.c (modified) (3 diffs)
-
core/module_load.c (modified) (2 diffs)
-
core/modules.c (modified) (1 diff)
-
core/modules/Makefile (modified) (3 diffs)
-
core/modules/module_inspector.c (modified) (3 diffs)
-
core/zebra.c (modified) (21 diffs)
-
include/conf.h (modified) (6 diffs)
-
include/platform.h (modified) (1 diff)
-
platform/generic/wrappers.c (modified) (5 diffs)
-
tools/elf2flt/myio.c (modified) (6 diffs)
-
tools/makeexport.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/reyalp-flt/core/Makefile
r1534 r1542 106 106 module_exportlist.h: $(topdir)tools/makeexport$(EXE) module_exportlist.c 107 107 @echo $< \-\> $@ 108 $(topdir)tools/makeexport$(EXE) module_exportlist.c module_exportlist.h modules/exportlist.txt 108 $(topdir)tools/makeexport$(EXE) module_exportlist.c module_exportlist.h modules/exportlist.txt module_hashlist.h 109 109 110 110 flt.h: $(topdir)tools/elf2flt/flt.h -
branches/reyalp-flt/core/conf.c
r1539 r1542 17 17 //------------------------------------------------------------------- 18 18 #define CONF_FILE "A/CHDK/CCHDK.CFG" 19 #define CONF_MAGICK_VALUE (0x33204741) 20 21 #define CONF_INFO(id, param, type, def, func) { id, sizeof( param ), type, ¶m, {def}/*, func*/ } 22 23 24 //------------------------------------------------------------------- 25 typedef struct { 26 unsigned short id; 27 unsigned char size; 28 char type; 29 void *var; 30 union { 31 void *ptr; 32 int i; 33 color cl; 34 }; 35 // Since only a few of the ConfInfo entries have a 'func' it saves space to not store the function addresses in the ConfInfo struct 36 // handled in conf_info_func code 37 //void (*func)(); 38 } ConfInfo; 39 40 //------------------------------------------------------------------- 41 Conf conf = { MAKE_API_VERSION(1,1) }; 19 #define CONF_MAGICK_VALUE (0x33204741) 20 21 //------------------------------------------------------------------- 22 Conf conf = { MAKE_API_VERSION(2,0) }; 42 23 43 24 int state_shooting_progress = SHOOTING_PROGRESS_NONE; … … 142 123 shooting_video_bitrate_change(conf.video_bitrate); 143 124 } 144 conf.edge_overlay_pano = 0; // reset it because otherwise this feature cant be used at startup (when buffer is empty) - needs workaround other than this!125 //conf.edge_overlay_pano = 0; // reset it because otherwise this feature cant be used at startup (when buffer is empty) - needs workaround other than this! 145 126 } 146 127 … … 177 158 CONF_INFO( 29, conf.batt_icon_color, CONF_DEF_VALUE, cl:COLOR_WHITE, NULL), 178 159 CONF_INFO( 30, conf.menu_color, CONF_DEF_VALUE, cl:MAKE_COLOR(COLOR_BG, COLOR_FG), NULL), 179 CONF_INFO( 31, conf.reader_color, CONF_DEF_VALUE, cl:MAKE_COLOR(COLOR_GREY, COLOR_WHITE), NULL),160 //CONF_INFO( 31, conf.reader_color, CONF_DEF_VALUE, cl:MAKE_COLOR(COLOR_GREY, COLOR_WHITE), NULL), 180 161 CONF_INFO( 32, conf.ricoh_ca1_mode, CONF_DEF_VALUE, i:0, NULL), 181 162 CONF_INFO( 33, conf.flashlight, CONF_DEF_VALUE, i:0, NULL), … … 185 166 CONF_INFO( 36, conf.raw_prefix, CONF_DEF_VALUE, i:RAW_PREFIX_CRW, NULL), 186 167 CONF_INFO( 37, conf.raw_ext, CONF_DEF_VALUE, i:DEFAULT_RAW_EXT, NULL), 187 CONF_INFO( 38, conf.reader_file, CONF_CHAR_PTR, ptr:"A/CHDK/BOOKS/README.TXT", NULL),188 CONF_INFO( 39, conf.reader_pos, CONF_DEF_VALUE, i:0, NULL),189 CONF_INFO( 40, conf.sokoban_level, CONF_DEF_VALUE, i:0, NULL),168 //CONF_INFO( 38, conf.reader_file, CONF_CHAR_PTR, ptr:"A/CHDK/BOOKS/README.TXT", NULL), 169 //CONF_INFO( 39, conf.reader_pos, CONF_DEF_VALUE, i:0, NULL), 170 //CONF_INFO( 40, conf.sokoban_level, CONF_DEF_VALUE, i:0, NULL), 190 171 CONF_INFO( 41, conf.show_clock, CONF_DEF_VALUE, i:2, NULL), 191 172 CONF_INFO( 42, conf.clock_pos, CONF_OSD_POS_PTR, ptr:&def_clock_pos , NULL), 192 CONF_INFO( 43, conf.reader_autoscroll, CONF_DEF_VALUE, i:0, NULL),193 CONF_INFO( 44, conf.reader_autoscroll_delay,CONF_DEF_VALUE, i:5, NULL),194 CONF_INFO( 45, conf.reader_rbf_file, CONF_CHAR_PTR, ptr:"", NULL),195 CONF_INFO( 46, conf.reader_codepage, CONF_DEF_VALUE, i:FONT_CP_WIN, NULL),173 //CONF_INFO( 43, conf.reader_autoscroll, CONF_DEF_VALUE, i:0, NULL), 174 //CONF_INFO( 44, conf.reader_autoscroll_delay,CONF_DEF_VALUE, i:5, NULL), 175 //CONF_INFO( 45, conf.reader_rbf_file, CONF_CHAR_PTR, ptr:"", NULL), 176 //CONF_INFO( 46, conf.reader_codepage, CONF_DEF_VALUE, i:FONT_CP_WIN, NULL), 196 177 CONF_INFO( 47, conf.splash_show, CONF_DEF_VALUE, i:1, NULL), 197 178 CONF_INFO( 48, conf.histo_color2, CONF_DEF_VALUE, cl:MAKE_COLOR(COLOR_RED, COLOR_WHITE), NULL), 198 179 CONF_INFO( 49, conf.zebra_draw, CONF_DEF_VALUE, i:0, NULL), 199 CONF_INFO( 50, conf.zebra_mode, CONF_DEF_VALUE, i:ZEBRA_MODE_BLINKED_2, NULL),200 CONF_INFO( 51, conf.zebra_restore_screen, CONF_DEF_VALUE, i:1, NULL),201 CONF_INFO( 52, conf.zebra_restore_osd, CONF_DEF_VALUE, i:1, NULL),202 CONF_INFO( 53, conf.zebra_over, CONF_DEF_VALUE, i:1, NULL),203 CONF_INFO( 54, conf.zebra_under, CONF_DEF_VALUE, i:0, NULL),204 CONF_INFO( 55, conf.zebra_color, CONF_DEF_VALUE, cl:MAKE_COLOR(COLOR_RED, COLOR_RED), NULL),205 CONF_INFO( 56, conf.zebra_draw_osd, CONF_DEF_VALUE, i:ZEBRA_DRAW_HISTO, NULL),180 //CONF_INFO( 50, conf.zebra_mode, CONF_DEF_VALUE, i:ZEBRA_MODE_BLINKED_2, NULL), 181 //CONF_INFO( 51, conf.zebra_restore_screen, CONF_DEF_VALUE, i:1, NULL), 182 //CONF_INFO( 52, conf.zebra_restore_osd, CONF_DEF_VALUE, i:1, NULL), 183 //CONF_INFO( 53, conf.zebra_over, CONF_DEF_VALUE, i:1, NULL), 184 //CONF_INFO( 54, conf.zebra_under, CONF_DEF_VALUE, i:0, NULL), 185 //CONF_INFO( 55, conf.zebra_color, CONF_DEF_VALUE, cl:MAKE_COLOR(COLOR_RED, COLOR_RED), NULL), 186 //CONF_INFO( 56, conf.zebra_draw_osd, CONF_DEF_VALUE, i:ZEBRA_DRAW_HISTO, NULL), 206 187 CONF_INFO( 57, conf.user_menu_as_root, CONF_DEF_VALUE, i:0, NULL), 207 188 CONF_INFO( 58, conf.zoom_value, CONF_DEF_VALUE, i:ZOOM_SHOW_X, NULL), 208 189 CONF_INFO( 59, conf.use_zoom_mf, CONF_DEF_VALUE, i:0, NULL), 209 190 CONF_INFO( 60, conf.raw_save_first_only, CONF_DEF_VALUE, i:0, NULL), 210 CONF_INFO( 61, conf.reader_wrap_by_words, CONF_DEF_VALUE, i:1, NULL),191 //CONF_INFO( 61, conf.reader_wrap_by_words, CONF_DEF_VALUE, i:1, NULL), 211 192 CONF_INFO( 62, conf.menu_symbol_enable, CONF_DEF_VALUE, i:1, NULL), 212 193 CONF_INFO( 63, conf.alt_mode_button, CONF_DEF_VALUE, i:KEY_PRINT, conf_change_alt_mode_button), … … 216 197 CONF_INFO( 67, conf.alt_prevent_shutdown, CONF_DEF_VALUE, i:ALT_PREVENT_SHUTDOWN_ALT, conf_update_prevent_shutdown), 217 198 CONF_INFO( 68, conf.show_grid_lines, CONF_DEF_VALUE, i:0, NULL), 218 CONF_INFO( 69, conf.grid_lines_file, CONF_CHAR_PTR, ptr:"", NULL),199 //CONF_INFO( 69, conf.grid_lines_file, CONF_CHAR_PTR, ptr:"", NULL), 219 200 CONF_INFO( 70, conf.raw_nr, CONF_DEF_VALUE, i:NOISE_REDUCTION_AUTO_CANON, NULL), 220 CONF_INFO( 71, conf.grid_force_color, CONF_DEF_VALUE, i:0, NULL),221 CONF_INFO( 72, conf.grid_color, CONF_DEF_VALUE, cl:MAKE_COLOR(COLOR_BG, COLOR_FG), NULL),201 //CONF_INFO( 71, conf.grid_force_color, CONF_DEF_VALUE, i:0, NULL), 202 //CONF_INFO( 72, conf.grid_color, CONF_DEF_VALUE, cl:MAKE_COLOR(COLOR_BG, COLOR_FG), NULL), 222 203 223 204 CONF_INFO( 80, conf.dof_subj_dist_as_near_limit,CONF_DEF_VALUE, i:0, NULL), … … 280 261 281 262 CONF_INFO(126, conf.clear_bracket, CONF_DEF_VALUE, i:1, NULL), 282 CONF_INFO(127, conf.zebra_multichannel, CONF_DEF_VALUE, i:0, NULL),263 //CONF_INFO(127, conf.zebra_multichannel, CONF_DEF_VALUE, i:0, NULL), 283 264 284 265 CONF_INFO(128, conf.nd_filter_state, CONF_DEF_VALUE, i:0, NULL), … … 348 329 CONF_INFO(187, conf.edge_overlay_enable, CONF_DEF_VALUE, i:0, NULL), 349 330 CONF_INFO(188, conf.edge_overlay_thresh, CONF_DEF_VALUE, i:60, NULL), 350 CONF_INFO(189, conf.edge_overlay_color, CONF_DEF_VALUE, cl:0x66, NULL),331 //CONF_INFO(189, conf.edge_overlay_color, CONF_DEF_VALUE, cl:0x66, NULL), 351 332 CONF_INFO(190, conf.synch_enable, CONF_DEF_VALUE, i:0, NULL), 352 333 CONF_INFO(191, conf.synch_delay_enable, CONF_DEF_VALUE, i:0, NULL), … … 381 362 CONF_INFO(220, conf.temperature_unit, CONF_DEF_VALUE, i:0, NULL), 382 363 CONF_INFO(221, conf.clear_zoom_override, CONF_DEF_VALUE, i:1, NULL), 383 CONF_INFO(222, conf.edge_overlay_play, CONF_DEF_VALUE, i:0, NULL),384 CONF_INFO(223, conf.edge_overlay_pano, CONF_DEF_VALUE, i:0, NULL),385 CONF_INFO(224, conf.edge_overlay_zoom, CONF_DEF_VALUE, i:1, NULL),364 //CONF_INFO(222, conf.edge_overlay_play, CONF_DEF_VALUE, i:0, NULL), 365 //CONF_INFO(223, conf.edge_overlay_pano, CONF_DEF_VALUE, i:0, NULL), 366 //CONF_INFO(224, conf.edge_overlay_zoom, CONF_DEF_VALUE, i:1, NULL), 386 367 CONF_INFO(225, conf.raw_cache, CONF_DEF_VALUE, i:0, NULL), 387 368 CONF_INFO(226, conf.dng_raw, CONF_DEF_VALUE, i:0, conf_change_dng), … … 400 381 CONF_INFO(239, conf.debug_propcase_page, CONF_DEF_VALUE, i:0, NULL), 401 382 CONF_INFO(240, conf.debug_misc_vals_show, CONF_DEF_VALUE, i:0, NULL), 402 CONF_INFO(241, conf.edge_overlay_filter, CONF_DEF_VALUE, i:0, NULL),403 CONF_INFO(242, conf.edge_overlay_show, CONF_DEF_VALUE, i:0, NULL),404 CONF_INFO(243, conf.edge_overlay_pano_overlap, CONF_DEF_VALUE, i:30, NULL),383 //CONF_INFO(241, conf.edge_overlay_filter, CONF_DEF_VALUE, i:0, NULL), 384 //CONF_INFO(242, conf.edge_overlay_show, CONF_DEF_VALUE, i:0, NULL), 385 //CONF_INFO(243, conf.edge_overlay_pano_overlap, CONF_DEF_VALUE, i:30, NULL), 405 386 406 387 // Touch screen U/I overrides … … 561 542 562 543 //------------------------------------------------------------------- 563 void conf_load_defaults() { 544 void config_load_defaults(const ConfInfo *confinfo, int conf_num, void (*info_func)(unsigned short id)) 545 { 564 546 register int i; 565 547 566 for (i=0; i< CONF_NUM; ++i) {567 switch (conf _info[i].type) {548 for (i=0; i<conf_num; ++i) { 549 switch (confinfo[i].type) { 568 550 case CONF_DEF_VALUE: 569 memcpy(conf _info[i].var, &(conf_info[i].i), conf_info[i].size);551 memcpy(confinfo[i].var, &(confinfo[i].i), confinfo[i].size); 570 552 break; 571 553 case CONF_INT_PTR: … … 573 555 case CONF_OSD_POS_PTR: 574 556 case CONF_CHAR_PTR: 575 memcpy(conf _info[i].var, conf_info[i].ptr, conf_info[i].size);557 memcpy(confinfo[i].var, confinfo[i].ptr, confinfo[i].size); 576 558 break; 577 559 } 578 conf_info_func(conf_info[i].id); 579 //if (conf_info[i].func) { 580 // conf_info[i].func(); 581 //} 582 } 560 if (info_func) info_func(confinfo[i].id); 561 } 562 } 563 564 void conf_load_defaults() 565 { 566 config_load_defaults(&conf_info[0], CONF_NUM, conf_info_func); 583 567 } 584 568 … … 592 576 } ConfInfoSave; 593 577 594 void conf_save() { 578 void config_save(const ConfInfo *conf_info, char *filename, int conf_num) 579 { 595 580 static const long t=CONF_MAGICK_VALUE; 596 581 register int i; 597 int fd; 598 char *buf = umalloc(sizeof(t) + CONF_NUM*sizeof(ConfInfoSave) + sizeof(conf)); 599 char *p=buf; 600 601 fd = open(CONF_FILE, O_WRONLY|O_CREAT|O_TRUNC, 0777); 602 if (fd>=0){ 582 583 int size = sizeof(t) + conf_num * sizeof(ConfInfoSave); 584 for (i=0; i<conf_num; i++) size += conf_info[i].size; 585 586 char *buf = umalloc(size); 587 char *p = buf; 588 589 int fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0777); 590 if (fd >= 0) 591 { 603 592 memcpy(p, &t, sizeof(t)); 604 p+=sizeof(t); 605 for (i=0; i<CONF_NUM; ++i) { 593 p += sizeof(t); 594 for (i=0; i<conf_num; ++i) 595 { 606 596 ((ConfInfoSave*)p)->id = conf_info[i].id; 607 597 ((ConfInfoSave*)p)->size = conf_info[i].size; … … 617 607 } 618 608 619 //------------------------------------------------------------------- 620 void conf_restore() { 609 void conf_save() 610 { 611 config_save(&conf_info[0], CONF_FILE, CONF_NUM); 612 } 613 614 //------------------------------------------------------------------- 615 void config_restore(const ConfInfo *confinfo, char *filename, int conf_num, void (*init_defaults)(), void (*info_func)(unsigned short id)) 616 { 621 617 int fd, rcnt, i; 622 618 unsigned short id, size; 623 619 char *buf; 624 int offs ;620 int offs, old_ver; 625 621 struct stat st; 626 622 627 conf_init_defaults(); 628 629 conf_load_defaults(); 630 631 if( stat(CONF_FILE,&st) != 0 || st.st_size < sizeof(int)) 623 if (init_defaults) init_defaults(); 624 config_load_defaults(confinfo, conf_num, info_func); 625 626 if( stat(filename,&st) != 0 || st.st_size < sizeof(int)) 632 627 return; 633 628 … … 635 630 return; 636 631 637 fd = open( CONF_FILE, O_RDONLY, 0777);632 fd = open(filename, O_RDONLY, 0777); 638 633 if( fd < 0 ) { 639 634 ufree(buf); … … 648 643 return; 649 644 } 645 650 646 offs=sizeof(int); 651 647 while (1) { … … 660 656 offs += sizeof(short); 661 657 662 for (i=0; i< CONF_NUM; ++i) {663 if (conf _info[i].id==id && conf_info[i].size==size) {658 for (i=0; i<conf_num; ++i) { 659 if (confinfo[i].id==id && ((confinfo[i].size==size) || ((confinfo[i].size == 4) && (size == 2)))) { 664 660 if (offs + size <= rcnt) { 665 memcpy(conf_info[i].var, buf+offs, size); 666 conf_info_func(conf_info[i].id); 661 memcpy(confinfo[i].var, buf+offs, size); 662 if (size == 2) 663 { 664 // Fix color value 665 int *p = (int*)confinfo[i].var; 666 *p = (((*p >> 8) & 0xFF) << 16) | (*p &0xFF); 667 } 668 if (info_func) info_func(confinfo[i].id); 667 669 } 668 670 offs += size; … … 670 672 } 671 673 } 672 if (i == CONF_NUM) { // unknown id, just skip data674 if (i == conf_num) { // unknown id, just skip data 673 675 offs += size; 674 676 } … … 677 679 // clear any "clear on restart" values 678 680 clear_values(); 681 } 682 683 void conf_restore() 684 { 685 config_restore(&conf_info[0], CONF_FILE, CONF_NUM, conf_init_defaults, conf_info_func); 679 686 } 680 687 -
branches/reyalp-flt/core/curves.c
r1536 r1542 469 469 if ( !API_VERSION_MATCH_REQUIREMENT( camera_sensor.api_version, 1, 0 ) ) 470 470 return 1; 471 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 1, 0 ) )471 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 2, 0 ) ) 472 472 return 1; 473 473 -
branches/reyalp-flt/core/edgeoverlay.c
r1536 r1542 13 13 #include "module_exportlist.h" 14 14 15 //------------------------------------------------------------------- 16 17 typedef struct 18 { 19 color edge_overlay_color; 20 int edge_overlay_filter; 21 int edge_overlay_zoom; // shall zoom be set when *edg file is loaded? 22 int edge_overlay_pano; // whether a full press changes back to live mode 23 int edge_overlay_pano_overlap; // overlap in % in pano mode 24 int edge_overlay_show; // whether to show overlay even when no button is pressed 25 int edge_overlay_play; // whether edge overlay is switched on also for play mode 26 } EdgeConf; 27 28 EdgeConf econf; 29 30 static ConfInfo conf_info[] = { 31 CONF_INFO( 1, econf.edge_overlay_color, CONF_DEF_VALUE, cl:0, NULL), 32 CONF_INFO( 2, econf.edge_overlay_play, CONF_DEF_VALUE, i:0, NULL), 33 CONF_INFO( 3, econf.edge_overlay_pano, CONF_DEF_VALUE, i:0, NULL), 34 CONF_INFO( 4, econf.edge_overlay_zoom, CONF_DEF_VALUE, i:1, NULL), 35 CONF_INFO( 5, econf.edge_overlay_filter, CONF_DEF_VALUE, i:0, NULL), 36 CONF_INFO( 6, econf.edge_overlay_show, CONF_DEF_VALUE, i:0, NULL), 37 CONF_INFO( 7, econf.edge_overlay_pano_overlap, CONF_DEF_VALUE, i:30, NULL), 38 }; 39 40 //------------------------------------------------------------------- 15 41 16 42 // the way we save edge overlays on their own... … … 61 87 memset(edgebuf->ptr, 0, edgebuf->ptrLen); 62 88 } 63 if ( conf.edge_overlay_filter && (smbuf == NULL))89 if (econf.edge_overlay_filter && (smbuf == NULL)) 64 90 { 65 91 smbuf = (unsigned char*)malloc(viewport_byte_width*3); … … 69 95 { 70 96 // Disable filtering if we do not have enough memory for it 71 conf.edge_overlay_filter = 0;97 econf.edge_overlay_filter = 0; 72 98 } 73 99 } … … 197 223 { 198 224 fsm_state = EDGE_FROZEN; // switch to "edge overlay frozen"-mode 199 if ( conf.edge_overlay_zoom)225 if (econf.edge_overlay_zoom) 200 226 { 201 227 shooting_set_zoom(zoom); … … 305 331 memset(edgebuf->ptr + slice*compressed_slice, 0, compressed_slice); 306 332 307 if ( conf.edge_overlay_filter)333 if (econf.edge_overlay_filter) 308 334 { 309 335 // Prefill smbuf with three lines of avergae-filtered data. … … 327 353 shutter_fullpress |= kbd_is_key_pressed(KEY_SHOOT_FULL); 328 354 329 if ( conf.edge_overlay_filter)355 if (econf.edge_overlay_filter) 330 356 { 331 357 // We need to shift up our smbuf one line, … … 423 449 // care so much about performance, you can enable it. 424 450 // 425 // if ( conf.edge_overlay_filter)451 // if (econf.edge_overlay_filter) 426 452 // { 427 453 // // Here we do basic filtering on the detected edges. … … 458 484 // bv_get(edgebuf, (y+1)*viewport_width + (x+1)); 459 485 // 460 // if (! conf.edge_overlay_show)486 // if (!econf.edge_overlay_show) 461 487 // { 462 488 // if (sum >= 5) // if we have at least 5 neighboring edges … … 486 512 int x_off, y_off; 487 513 488 const color cl = conf.edge_overlay_color;514 const color cl = econf.edge_overlay_color; 489 515 const int y_slice_min = viewport_yoffset+camera_screen.edge_hmargin+ slice *slice_height; 490 516 const int y_slice_max = viewport_yoffset+camera_screen.edge_hmargin+(slice+1)*slice_height; … … 517 543 const int aspect_correct_x_off = x_off; 518 544 const int bEdge = bv_get(edgebuf, y_edgebuf + x); 519 const int bDraw = bEdge || (draw_get_pixel(aspect_correct_x_off, y_off) == conf.edge_overlay_color);520 const color cl = bEdge ? conf.edge_overlay_color : 0;545 const int bDraw = bEdge || (draw_get_pixel(aspect_correct_x_off, y_off) == econf.edge_overlay_color); 546 const color cl = bEdge ? econf.edge_overlay_color : 0; 521 547 if (bEdge || bDraw) 522 548 draw_pixel(aspect_correct_x_off, y_off, cl); … … 576 602 const int x_max = (viewport_width - 2); 577 603 578 switch( conf.edge_overlay_pano)604 switch(econf.edge_overlay_pano) 579 605 { 580 606 case 0: // pano off … … 583 609 break; 584 610 case 1: // pano from left to right 585 xoffset = -x_max*(100- conf.edge_overlay_pano_overlap)/100;611 xoffset = -x_max*(100-econf.edge_overlay_pano_overlap)/100; 586 612 break; 587 613 case 2: // pano from top to bottom 588 yoffset = -y_max*(100- conf.edge_overlay_pano_overlap)/100;614 yoffset = -y_max*(100-econf.edge_overlay_pano_overlap)/100; 589 615 break; 590 616 case 3: // pano from right to left 591 xoffset = x_max*(100- conf.edge_overlay_pano_overlap)/100;617 xoffset = x_max*(100-econf.edge_overlay_pano_overlap)/100; 592 618 break; 593 619 case 4: // pano from bottom to top 594 yoffset = y_max*(100- conf.edge_overlay_pano_overlap)/100;620 yoffset = y_max*(100-econf.edge_overlay_pano_overlap)/100; 595 621 break; 596 622 case 5: // free mode … … 630 656 const int bHalfPress = kbd_is_key_pressed(KEY_SHOOT_HALF); 631 657 const int bPlayMode = (mode_get() & MODE_MASK) == MODE_PLAY; 632 const int bPanoramaMode = ( conf.edge_overlay_pano != 0);633 const int bNeedHalfPress = ( conf.edge_overlay_show != 1);634 const int bDisplayInPlay = ( conf.edge_overlay_play == 1);658 const int bPanoramaMode = (econf.edge_overlay_pano != 0); 659 const int bNeedHalfPress = (econf.edge_overlay_show != 1); 660 const int bDisplayInPlay = (econf.edge_overlay_play == 1); 635 661 const int bGuiModeNone = (gui_get_mode() == GUI_MODE_NONE); 636 662 const int bGuiModeAlt = (gui_get_mode() == GUI_MODE_ALT); … … 766 792 static CMenuItem edge_overlay_submenu_items[] = { 767 793 MENU_ITEM(0x5c,LANG_MENU_EDGE_OVERLAY_ENABLE, MENUITEM_BOOL, &conf.edge_overlay_enable, 0 ), 768 MENU_ITEM(0x5c,LANG_MENU_EDGE_FILTER, MENUITEM_BOOL, & conf.edge_overlay_filter, 0 ),769 MENU_ENUM2(0x5f,LANG_MENU_EDGE_PANO, & conf.edge_overlay_pano, gui_edge_pano_modes ),770 MENU_ITEM(0x5e,LANG_MENU_EDGE_PANO_OVERLAP, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, & conf.edge_overlay_pano_overlap, MENU_MINMAX(0, 100) ),771 MENU_ITEM(0x5c,LANG_MENU_EDGE_SHOW, MENUITEM_BOOL, & conf.edge_overlay_show, 0 ),794 MENU_ITEM(0x5c,LANG_MENU_EDGE_FILTER, MENUITEM_BOOL, &econf.edge_overlay_filter, 0 ), 795 MENU_ENUM2(0x5f,LANG_MENU_EDGE_PANO, &econf.edge_overlay_pano, gui_edge_pano_modes ), 796 MENU_ITEM(0x5e,LANG_MENU_EDGE_PANO_OVERLAP, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &econf.edge_overlay_pano_overlap, MENU_MINMAX(0, 100) ), 797 MENU_ITEM(0x5c,LANG_MENU_EDGE_SHOW, MENUITEM_BOOL, &econf.edge_overlay_show, 0 ), 772 798 MENU_ITEM(0x5e,LANG_MENU_EDGE_OVERLAY_TRESH, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &conf.edge_overlay_thresh, MENU_MINMAX(0, 255) ), 773 MENU_ITEM(0x65,LANG_MENU_EDGE_OVERLAY_COLOR, MENUITEM_COLOR_FG, & conf.edge_overlay_color, 0 ),774 MENU_ITEM(0x5c,LANG_MENU_EDGE_PLAY, MENUITEM_BOOL, & conf.edge_overlay_play, 0 ), //does not work on cams like s-series, which dont have a real "hardware" play/rec switch, need a workaround, probably another button799 MENU_ITEM(0x65,LANG_MENU_EDGE_OVERLAY_COLOR, MENUITEM_COLOR_FG, &econf.edge_overlay_color, 0 ), 800 MENU_ITEM(0x5c,LANG_MENU_EDGE_PLAY, MENUITEM_BOOL, &econf.edge_overlay_play, 0 ), //does not work on cams like s-series, which dont have a real "hardware" play/rec switch, need a workaround, probably another button 775 801 MENU_ITEM(0x33,LANG_MENU_EDGE_SAVE, MENUITEM_PROC, gui_menuproc_edge_save, 0 ), 776 MENU_ITEM(0x5c,LANG_MENU_EDGE_ZOOM, MENUITEM_BOOL, & conf.edge_overlay_zoom, 0 ),802 MENU_ITEM(0x5c,LANG_MENU_EDGE_ZOOM, MENUITEM_BOOL, &econf.edge_overlay_zoom, 0 ), 777 803 MENU_ITEM(0x33,LANG_MENU_EDGE_LOAD, MENUITEM_PROC, gui_menuproc_edge_load, 0 ), 778 804 MENU_ITEM(0x51,LANG_MENU_BACK, MENUITEM_UP, 0, 0 ), … … 820 846 if ( !API_VERSION_MATCH_REQUIREMENT( camera_sensor.api_version, 1, 0 ) ) 821 847 return 1; 822 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 1, 0 ) )848 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 2, 0 ) ) 823 849 return 1; 850 851 conf_info[0].cl = MAKE_COLOR(0, COLOR_BLUE); 852 config_restore(&conf_info[0], "A/CHDK/MODULES/CFG/edgeovr.cfg", sizeof(conf_info)/sizeof(conf_info[0]), 0, 0); 824 853 825 854 return 0; … … 838 867 // because even if we turn off edgeovr we could turn on back and 839 868 // should get same content. 840 return 0; 869 config_save(&conf_info[0], "A/CHDK/MODULES/CFG/edgeovr.cfg", sizeof(conf_info)/sizeof(conf_info[0])); 870 reset_edge_overlay(); 871 return 0; 841 872 } 842 873 … … 850 881 module_idx=moduleidx; 851 882 852 gui_activate_sub_menu(&edge_overlay_submenu, -1);883 gui_activate_sub_menu(&edge_overlay_submenu, module_idx); 853 884 854 885 return 0; -
branches/reyalp-flt/core/gui.c
r1537 r1542 592 592 MENU_ITEM(0x65,LANG_MENU_VIS_HISTO_BORDER, MENUITEM_COLOR_FG, &conf.histo_color2, 0 ), 593 593 MENU_ITEM(0x65,LANG_MENU_VIS_HISTO_MARKERS, MENUITEM_COLOR_BG, &conf.histo_color2, 0 ), 594 MENU_ITEM(0x65,LANG_MENU_VIS_ZEBRA_UNDER, MENUITEM_COLOR_BG, &conf.zebra_color, 0 ),595 MENU_ITEM(0x65,LANG_MENU_VIS_ZEBRA_OVER, MENUITEM_COLOR_FG, &conf.zebra_color, 0 ),594 //MENU_ITEM(0x65,LANG_MENU_VIS_ZEBRA_UNDER, MENUITEM_COLOR_BG, &conf.zebra_color, 0 ), // moved to zebra menu 595 //MENU_ITEM(0x65,LANG_MENU_VIS_ZEBRA_OVER, MENUITEM_COLOR_FG, &conf.zebra_color, 0 ), // moved to zebra menu 596 596 MENU_ITEM(0x65,LANG_MENU_VIS_BATT_ICON, MENUITEM_COLOR_FG, &conf.batt_icon_color, 0 ), 597 597 MENU_ITEM(0x65,LANG_MENU_VIS_SPACE_ICON, MENUITEM_COLOR_FG, &conf.space_color, 0 ), … … 605 605 MENU_ITEM(0x65,LANG_MENU_VIS_MENU_SYMBOL_TEXT, MENUITEM_COLOR_FG, &conf.menu_symbol_color, 0 ), 606 606 MENU_ITEM(0x65,LANG_MENU_VIS_MENU_SYMBOL_BKG, MENUITEM_COLOR_BG, &conf.menu_symbol_color, 0 ), 607 MENU_ITEM(0x65,LANG_MENU_VIS_READER_TEXT, MENUITEM_COLOR_FG, &conf.reader_color, 0 ),608 MENU_ITEM(0x65,LANG_MENU_VIS_READER_BKG, MENUITEM_COLOR_BG, &conf.reader_color, 0 ),607 //MENU_ITEM(0x65,LANG_MENU_VIS_READER_TEXT, MENUITEM_COLOR_FG, &conf.reader_color, 0 ), // moved to text reader menu 608 //MENU_ITEM(0x65,LANG_MENU_VIS_READER_BKG, MENUITEM_COLOR_BG, &conf.reader_color, 0 ), // moved to text reader menu 609 609 MENU_ITEM(0x65,LANG_MENU_VIS_OSD_OVERRIDE, MENUITEM_COLOR_FG, &conf.osd_color_override, 0 ), 610 610 MENU_ITEM(0x65,LANG_MENU_VIS_OSD_OVERRIDE_BKG, MENUITEM_COLOR_BG, &conf.osd_color_override, 0 ), -
branches/reyalp-flt/core/gui_debug.c
r1536 r1542 197 197 if ( !API_VERSION_MATCH_REQUIREMENT( camera_info.api_version, 1, 0 ) ) 198 198 return 1; 199 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 1, 0 ) )199 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 2, 0 ) ) 200 200 return 1; 201 201 -
branches/reyalp-flt/core/gui_fselect.c
r1539 r1542 1416 1416 if ( !API_VERSION_MATCH_REQUIREMENT( gui_version.common_api, 1, 0 ) ) 1417 1417 return 1; 1418 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 1, 0 ) )1418 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 2, 0 ) ) 1419 1419 return 1; 1420 1420 -
branches/reyalp-flt/core/gui_games.c
r1536 r1542 54 54 return 1; 55 55 56 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 1, 0 ) )56 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 2, 0 ) ) 57 57 return 1; 58 58 -
branches/reyalp-flt/core/gui_grid.c
r1536 r1542 12 12 #include "modules.h" 13 13 #include "module_exportlist.h" 14 15 //------------------------------------------------------------------- 16 17 typedef struct 18 { 19 color grid_color; 20 char grid_lines_file[100]; 21 int grid_force_color; 22 } GridConf; 23 24 GridConf gconf; 25 26 static ConfInfo conf_info[] = { 27 CONF_INFO( 1, gconf.grid_color, CONF_DEF_VALUE, cl:0, NULL), 28 CONF_INFO( 2, gconf.grid_lines_file, CONF_CHAR_PTR, ptr:"", NULL), 29 CONF_INFO( 3, gconf.grid_force_color, CONF_DEF_VALUE, i:0, NULL), 30 }; 14 31 15 32 //------------------------------------------------------------------- … … 158 175 } 159 176 close(fd); 160 strcpy( conf.grid_lines_file, fn);177 strcpy(gconf.grid_lines_file, fn); 161 178 } else { 162 conf.grid_lines_file[0] = 0;179 gconf.grid_lines_file[0] = 0; 163 180 } 164 181 … … 178 195 switch (ptr->type) { 179 196 case GRID_ELEM_LINE: 180 draw_line(ptr->x0, ptr->y0, ptr->x1, ptr->y1, ( conf.grid_force_color)?conf.grid_color:ptr->clf);197 draw_line(ptr->x0, ptr->y0, ptr->x1, ptr->y1, (gconf.grid_force_color)?gconf.grid_color:ptr->clf); 181 198 break; 182 199 case GRID_ELEM_RECT: 183 draw_rect(ptr->x0, ptr->y0, ptr->x1, ptr->y1, ( conf.grid_force_color)?conf.grid_color:ptr->clf);200 draw_rect(ptr->x0, ptr->y0, ptr->x1, ptr->y1, (gconf.grid_force_color)?gconf.grid_color:ptr->clf); 184 201 break; 185 202 case GRID_ELEM_FILLED_RECT: 186 draw_filled_rect(ptr->x0, ptr->y0, ptr->x1, ptr->y1, ( conf.grid_force_color)?conf.grid_color:MAKE_COLOR(ptr->clb, ptr->clf));203 draw_filled_rect(ptr->x0, ptr->y0, ptr->x1, ptr->y1, (gconf.grid_force_color)?gconf.grid_color:MAKE_COLOR(ptr->clb, ptr->clf)); 187 204 break; 188 205 case GRID_ELEM_ELLIPSE: 189 draw_ellipse(ptr->x0, ptr->y0, (unsigned int)(ptr->x1), (unsigned int)(ptr->y1), ( conf.grid_force_color)?conf.grid_color:ptr->clf);206 draw_ellipse(ptr->x0, ptr->y0, (unsigned int)(ptr->x1), (unsigned int)(ptr->y1), (gconf.grid_force_color)?gconf.grid_color:ptr->clf); 190 207 break; 191 208 case GRID_ELEM_FILLED_ELLIPSE: 192 draw_filled_ellipse(ptr->x0, ptr->y0, (unsigned int)(ptr->x1), (unsigned int)(ptr->y1), ( conf.grid_force_color)?conf.grid_color:MAKE_COLOR(ptr->clf, 0));209 draw_filled_ellipse(ptr->x0, ptr->y0, (unsigned int)(ptr->x1), (unsigned int)(ptr->y1), (gconf.grid_force_color)?gconf.grid_color:MAKE_COLOR(ptr->clf, 0)); 193 210 break; 194 211 } … … 205 222 } 206 223 void gui_grid_lines_load(int arg) { 207 module_fselect_init(LANG_STR_SELECT_GRID_FILE, conf.grid_lines_file, "A/CHDK/GRIDS", gui_grid_lines_load_selected);224 module_fselect_init(LANG_STR_SELECT_GRID_FILE, gconf.grid_lines_file, "A/CHDK/GRIDS", gui_grid_lines_load_selected); 208 225 } 209 226 … … 214 231 MENU_ITEM(0x0,(int)grid_title, MENUITEM_TEXT, 0, 0 ), 215 232 MENU_ITEM(0x0,(int)"", MENUITEM_SEPARATOR, 0, 0 ), 216 MENU_ITEM(0x5c,LANG_MENU_GRID_FORCE_COLOR, MENUITEM_BOOL, & conf.grid_force_color, 0 ),217 MENU_ITEM(0x65,LANG_MENU_GRID_COLOR_LINE, MENUITEM_COLOR_FG, & conf.grid_color, 0 ),218 MENU_ITEM(0x65,LANG_MENU_GRID_COLOR_FILL, MENUITEM_COLOR_BG, & conf.grid_color, 0 ),233 MENU_ITEM(0x5c,LANG_MENU_GRID_FORCE_COLOR, MENUITEM_BOOL, &gconf.grid_force_color, 0 ), 234 MENU_ITEM(0x65,LANG_MENU_GRID_COLOR_LINE, MENUITEM_COLOR_FG, &gconf.grid_color, 0 ), 235 MENU_ITEM(0x65,LANG_MENU_GRID_COLOR_FILL, MENUITEM_COLOR_BG, &gconf.grid_color, 0 ), 219 236 MENU_ITEM(0x51,LANG_MENU_BACK, MENUITEM_UP, 0, 0 ), 220 237 {0} … … 259 276 if ( !API_VERSION_MATCH_REQUIREMENT( camera_sensor.api_version, 1, 0 ) ) 260 277 return 1; 261 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 1, 0 ) )278 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 2, 0 ) ) 262 279 return 1; 263 280 264 grid_lines_load(conf.grid_lines_file); 281 conf_info[0].cl = MAKE_COLOR(COLOR_BG, COLOR_FG); 282 config_restore(&conf_info[0], "A/CHDK/MODULES/CFG/grids.cfg", sizeof(conf_info)/sizeof(conf_info[0]), 0, 0); 283 284 grid_lines_load(gconf.grid_lines_file); 265 285 266 286 return 0; … … 275 295 int _module_unloader() 276 296 { 297 config_save(&conf_info[0], "A/CHDK/MODULES/CFG/grids.cfg", sizeof(conf_info)/sizeof(conf_info[0])); 277 298 grid_lines_free_data(); 278 299 return 0; -
branches/reyalp-flt/core/gui_read.c
r1536 r1542 15 15 #include "module_load.h" 16 16 17 //------------------------------------------------------------------- 18 19 typedef struct 20 { 21 color reader_color; 22 char reader_file[100]; 23 int reader_pos; 24 int reader_autoscroll; 25 int reader_autoscroll_delay; 26 char reader_rbf_file[100]; 27 int reader_codepage; 28 int reader_wrap_by_words; 29 } ReadConf; 30 31 ReadConf rconf; 32 33 static ConfInfo conf_info[] = { 34 CONF_INFO( 1, rconf.reader_color, CONF_DEF_VALUE, cl:0, NULL), 35 CONF_INFO( 2, rconf.reader_file, CONF_CHAR_PTR, ptr:"A/CHDK/BOOKS/README.TXT", NULL), 36 CONF_INFO( 3, rconf.reader_pos, CONF_DEF_VALUE, i:0, NULL), 37 CONF_INFO( 4, rconf.reader_autoscroll, CONF_DEF_VALUE, i:0, NULL), 38 CONF_INFO( 5, rconf.reader_autoscroll_delay,CONF_DEF_VALUE, i:5, NULL), 39 CONF_INFO( 6, rconf.reader_rbf_file, CONF_CHAR_PTR, ptr:"", NULL), 40 CONF_INFO( 7, rconf.reader_codepage, CONF_DEF_VALUE, i:FONT_CP_WIN, NULL), 41 CONF_INFO( 8, rconf.reader_wrap_by_words, CONF_DEF_VALUE, i:1, NULL), 42 }; 43 44 //------------------------------------------------------------------- 45 17 46 extern void gui_read_kbd_process_menu_btn(); 18 47 void gui_read_kbd_process(); … … 57 86 //------------------------------------------------------------------- 58 87 static void gui_read_draw_scroll_indicator() { 59 draw_txt_char((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2, 0, ( conf.reader_autoscroll)?((pause)?'\x05':'\x04'):'\x03', MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline88 draw_txt_char((camera_screen.width-camera_screen.ts_button_border)/FONT_WIDTH-2, 0, (rconf.reader_autoscroll)?((pause)?'\x05':'\x04'):'\x03', MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline 60 89 } 61 90 … … 64 93 static struct STD_stat st; 65 94 read_file = safe_open(file, O_RDONLY, 0777); 66 if (strcmp(file, conf.reader_file)!=0) {67 conf.reader_pos = 0;68 strcpy( conf.reader_file, file);95 if (strcmp(file, rconf.reader_file)!=0) { 96 rconf.reader_pos = 0; 97 strcpy(rconf.reader_file, file); 69 98 } 70 99 read_on_screen = 0; 71 100 read_file_size = (read_file>=0 && safe_stat((char*)file, &st)==0)?st.st_size:0; 72 if (read_file_size<= conf.reader_pos) {73 conf.reader_pos = 0;101 if (read_file_size<=rconf.reader_pos) { 102 rconf.reader_pos = 0; 74 103 } 75 104 pause = 0; … … 85 114 86 115 draw_filled_rect(0, 0, camera_screen.width-1, y-1, MAKE_COLOR(COLOR_BLACK, COLOR_BLACK)); 87 draw_filled_rect(0, y, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(BG_COLOR( conf.reader_color), BG_COLOR(conf.reader_color)));116 draw_filled_rect(0, y, camera_screen.width-1, camera_screen.height-1, MAKE_COLOR(BG_COLOR(rconf.reader_color), BG_COLOR(rconf.reader_color))); 88 117 89 118 gui_read_draw_scroll_indicator(); … … 95 124 //------------------------------------------------------------------- 96 125 static void read_goto_next_line() { 97 draw_filled_rect(xx, yy, x+w-1, yy+rbf_font_height()-1, MAKE_COLOR(BG_COLOR( conf.reader_color), BG_COLOR(conf.reader_color)));126 draw_filled_rect(xx, yy, x+w-1, yy+rbf_font_height()-1, MAKE_COLOR(BG_COLOR(rconf.reader_color), BG_COLOR(rconf.reader_color))); 98 127 xx = x; 99 128 yy += rbf_font_height(); … … 107 136 //------------------------------------------------------------------- 108 137 void gui_read_draw(int enforce_redraw) { 109 if ( conf.reader_autoscroll && !pause && get_tick_count()-last_time >= conf.reader_autoscroll_delay*1000 && (conf.reader_pos+read_on_screen)<read_file_size) {110 conf.reader_pos += read_on_screen;138 if (rconf.reader_autoscroll && !pause && get_tick_count()-last_time >= rconf.reader_autoscroll_delay*1000 && (rconf.reader_pos+read_on_screen)<read_file_size) { 139 rconf.reader_pos += read_on_screen; 111 140 read_to_draw = 1; 112 141 } … … 116 145 xx=x; yy=y; 117 146 118 lseek(read_file, conf.reader_pos, SEEK_SET);147 lseek(read_file, rconf.reader_pos, SEEK_SET); 119 148 read_on_screen=0; 120 149 … … 124 153 read_goto_next_line(); 125 154 if (yy < y+h) 126 draw_filled_rect(x, yy, x+w-1, y+h-1, MAKE_COLOR(BG_COLOR( conf.reader_color), BG_COLOR(conf.reader_color)));155 draw_filled_rect(x, yy, x+w-1, y+h-1, MAKE_COLOR(BG_COLOR(rconf.reader_color), BG_COLOR(rconf.reader_color))); 127 156 break; 128 157 } … … 141 170 // no break here 142 171 default: 143 if ( conf.reader_wrap_by_words) {172 if (rconf.reader_wrap_by_words) { 144 173 if (buffer[i] == ' ') { 145 174 new_word = 1; … … 171 200 continue; 172 201 } 173 xx+=rbf_draw_char(xx, yy, buffer[i], conf.reader_color);202 xx+=rbf_draw_char(xx, yy, buffer[i], rconf.reader_color); 174 203 break; 175 204 } … … 183 212 } 184 213 185 sprintf(buffer, "(%3d%%) %d/%d ", (read_file_size)?( conf.reader_pos*100/read_file_size):0,conf.reader_pos, read_file_size);214 sprintf(buffer, "(%3d%%) %d/%d ", (read_file_size)?(rconf.reader_pos*100/read_file_size):0, rconf.reader_pos, read_file_size); 186 215 buffer[camera_screen.width/FONT_WIDTH]=0; 187 216 draw_txt_string((camera_screen.ts_button_border/FONT_WIDTH), 0, buffer, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)); //title infoline … … 192 221 n=i*read_on_screen/read_file_size; // bar height 193 222 if (n<20) n=20; 194 i=(i-n)* conf.reader_pos/read_file_size; // top pos223 i=(i-n)*rconf.reader_pos/read_file_size; // top pos 195 224 draw_filled_rect(x+w+6+2, y+1, x+w+6+6, y+1+i, MAKE_COLOR(COLOR_BLACK, COLOR_BLACK)); 196 225 draw_filled_rect(x+w+6+2, y+i+n, x+w+6+6, y+h-1-1, MAKE_COLOR(COLOR_BLACK, COLOR_BLACK)); … … 215 244 case KEY_UP: 216 245 case KEY_LEFT: 217 if ( conf.reader_pos>0) {218 conf.reader_pos -= 45*15;219 if ( conf.reader_pos<0)conf.reader_pos=0;246 if (rconf.reader_pos>0) { 247 rconf.reader_pos -= 45*15; 248 if (rconf.reader_pos<0) rconf.reader_pos=0; 220 249 read_to_draw = 1; 221 250 } … … 226 255 case KEY_RIGHT: 227 256 case KEY_SHOOT_HALF: 228 if (( conf.reader_pos+read_on_screen)<read_file_size) {229 conf.reader_pos += read_on_screen;257 if ((rconf.reader_pos+read_on_screen)<read_file_size) { 258 rconf.reader_pos += read_on_screen; 230 259 read_to_draw = 1; 231 260 } … … 270 299 static void gui_draw_read_selected(const char *fn) { 271 300 if (fn) { 272 if (!rbf_load( conf.reader_rbf_file))301 if (!rbf_load(rconf.reader_rbf_file)) 273 302 rbf_load_from_8x16(current_font); 274 rbf_set_codepage( conf.reader_codepage);303 rbf_set_codepage(rconf.reader_codepage); 275 304 gui_set_mode(&GUI_MODE_READ); 276 305 gui_read_init(fn); … … 282 311 283 312 void gui_draw_read(int arg) { 284 module_fselect_init_w_mode(LANG_STR_SELECT_TEXT_FILE, conf.reader_file, "A/CHDK/BOOKS", gui_draw_read_selected, 1);313 module_fselect_init_w_mode(LANG_STR_SELECT_TEXT_FILE, rconf.reader_file, "A/CHDK/BOOKS", gui_draw_read_selected, 1); 285 314 void gui_fselect_set_key_redraw(int n); 286 315 //gui_fselect_set_key_redraw(1); @tsv … … 289 318 void gui_draw_read_last(int arg) { 290 319 struct STD_stat st; 291 if (safe_stat( conf.reader_file,&st) == 0) {292 gui_draw_read_selected( conf.reader_file);320 if (safe_stat(rconf.reader_file,&st) == 0) { 321 gui_draw_read_selected(rconf.reader_file); 293 322 } else { 294 323 gui_draw_read(arg); … … 298 327 static void gui_draw_rbf_selected(const char *fn) { 299 328 if (fn) { 300 strcpy( conf.reader_rbf_file, fn);329 strcpy(rconf.reader_rbf_file, fn); 301 330 } 302 331 } 303 332 304 333 void gui_draw_load_rbf(int arg) { 305 module_fselect_init(LANG_STR_SELECT_FONT_FILE, conf.reader_rbf_file, "A/CHDK/FONTS", gui_draw_rbf_selected);334 module_fselect_init(LANG_STR_SELECT_FONT_FILE, rconf.reader_rbf_file, "A/CHDK/FONTS", gui_draw_rbf_selected); 306 335 } 307 336 … … 311 340 MENU_ITEM(0x35,LANG_MENU_READ_OPEN_LAST, MENUITEM_PROC, gui_draw_read_last, 0 ), 312 341 MENU_ITEM(0x35,LANG_MENU_READ_SELECT_FONT, MENUITEM_PROC, gui_draw_load_rbf, 0 ), 313 MENU_ENUM2(0x5f,LANG_MENU_READ_CODEPAGE, &conf.reader_codepage, gui_reader_codepage_cps ), 314 MENU_ITEM(0x5c,LANG_MENU_READ_WORD_WRAP, MENUITEM_BOOL, &conf.reader_wrap_by_words, 0 ), 315 MENU_ITEM(0x5c,LANG_MENU_READ_AUTOSCROLL, MENUITEM_BOOL, &conf.reader_autoscroll, 0 ), 316 MENU_ITEM(0x5f,LANG_MENU_READ_AUTOSCROLL_DELAY, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &conf.reader_autoscroll_delay, MENU_MINMAX(0, 60) ), 342 MENU_ENUM2(0x5f,LANG_MENU_READ_CODEPAGE, &rconf.reader_codepage, gui_reader_codepage_cps ), 343 MENU_ITEM(0x5c,LANG_MENU_READ_WORD_WRAP, MENUITEM_BOOL, &rconf.reader_wrap_by_words, 0 ), 344 MENU_ITEM(0x5c,LANG_MENU_READ_AUTOSCROLL, MENUITEM_BOOL, &rconf.reader_autoscroll, 0 ), 345 MENU_ITEM(0x5f,LANG_MENU_READ_AUTOSCROLL_DELAY, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &rconf.reader_autoscroll_delay, MENU_MINMAX(0, 60) ), 346 MENU_ITEM(0x65,LANG_MENU_VIS_READER_TEXT, MENUITEM_COLOR_FG, &rconf.reader_color, 0 ), 347 MENU_ITEM(0x65,LANG_MENU_VIS_READER_BKG, MENUITEM_COLOR_BG, &rconf.reader_color, 0 ), 317 348 MENU_ITEM(0x51,LANG_MENU_BACK, MENUITEM_UP, 0, 0 ), 318 349 {0} … … 344 375 if ( chdk_export_list[0] != EXPORTLIST_MAGIC_NUMBER ) 345 376 return 1; 377 346 378 if ( !API_VERSION_MATCH_REQUIREMENT( gui_version.common_api, 1, 0 ) ) 347 379 return 1; 348 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 1, 0 ) )380 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 2, 0 ) ) 349 381 return 1; 382 383 conf_info[0].cl = MAKE_COLOR(COLOR_GREY, COLOR_WHITE); 384 config_restore(&conf_info[0], "A/CHDK/MODULES/CFG/txtread.cfg", sizeof(conf_info)/sizeof(conf_info[0]), 0, 0); 350 385 351 386 return 0; … … 360 395 int _module_unloader() 361 396 { 362 GUI_MODE_READ.magicnum = 0; //sanity clean to prevent accidentaly assign/restore guimode to unloaded module 363 364 return 0; 397 config_save(&conf_info[0], "A/CHDK/MODULES/CFG/txtread.cfg", sizeof(conf_info)/sizeof(conf_info[0])); 398 399 GUI_MODE_READ.magicnum = 0; //sanity clean to prevent accidentaly assign/restore guimode to unloaded module 400 401 return 0; 365 402 } 366 403 -
branches/reyalp-flt/core/gui_sokoban.c
r1536 r1542 13 13 #include "module_load.h" 14 14 15 //------------------------------------------------------------------- 16 17 typedef struct 18 { 19 int sokoban_level; 20 } SokobanConf; 21 22 SokobanConf sconf; 23 24 static const ConfInfo conf_info[] = { 25 CONF_INFO( 1, sconf.sokoban_level, CONF_DEF_VALUE, i:0, NULL), 26 }; 27 15 28 void gui_module_menu_kbd_process(); 16 29 void gui_sokoban_kbd_process(); … … 19 32 gui_handler GUI_MODE_SOKOBAN = 20 33 /*GUI_MODE_SOKOBAN*/ { GUI_MODE_MODULE, gui_sokoban_draw, gui_sokoban_kbd_process, gui_module_menu_kbd_process, GUI_MODE_FLAG_NODRAWRESTORE, GUI_MODE_MAGICNUM }; 21 22 34 23 35 //------------------------------------------------------------------- … … 206 218 207 219 free(buf); 208 conf.sokoban_level = lvl;220 sconf.sokoban_level = lvl; 209 221 moves = 0; 210 222 sokoban_undo_reset(); … … 224 236 //------------------------------------------------------------------- 225 237 static void sokoban_next_level() { 226 if (++ conf.sokoban_level >= num_levels)conf.sokoban_level = 0;227 sokoban_set_level( conf.sokoban_level);238 if (++sconf.sokoban_level >= num_levels) sconf.sokoban_level = 0; 239 sokoban_set_level(sconf.sokoban_level); 228 240 need_redraw_all = 1; 229 241 } … … 322 334 return 0; 323 335 } 324 else if( conf.sokoban_level >= num_levels) {325 conf.sokoban_level = 0;336 else if(sconf.sokoban_level >= num_levels) { 337 sconf.sokoban_level = 0; 326 338 } 327 339 cell_size = camera_screen.height/FIELD_HEIGHT; 328 sokoban_set_level( conf.sokoban_level);340 sokoban_set_level(sconf.sokoban_level); 329 341 // if the file is no longer readable, set_level will set this 330 342 if(!num_levels) { … … 335 347 gui_set_mode(&GUI_MODE_SOKOBAN); 336 348 return 1; 337 }338 339 int basic_module_init() {340 return gui_sokoban_init();341 349 } 342 350 … … 375 383 case KEY_ERASE: 376 384 case KEY_DISPLAY: 377 sokoban_set_level( conf.sokoban_level);385 sokoban_set_level(sconf.sokoban_level); 378 386 need_redraw_all = 1; 379 387 break; … … 426 434 draw_line(camera_screen.ts_button_border+cell_size*FIELD_WIDTH+1, 0, camera_screen.ts_button_border+cell_size*FIELD_WIDTH+1, camera_screen.height-1, COLOR_BLACK); 427 435 428 sprintf(str, "%s: %-6d", lang_str(LANG_SOKOBAN_TEXT_LEVEL), conf.sokoban_level+1);436 sprintf(str, "%s: %-6d", lang_str(LANG_SOKOBAN_TEXT_LEVEL), sconf.sokoban_level+1); 429 437 draw_string(camera_screen.ts_button_border+cell_size*FIELD_WIDTH+2, 8, str, MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 430 438 sprintf(str, "%s: %-6d", lang_str(LANG_SOKOBAN_TEXT_MOVES), moves); … … 448 456 gui_default_kbd_process_menu_btn(); 449 457 module_async_unload(module_idx); 458 } 459 460 461 // ========= MODULE INIT ================= 462 463 int module_idx=-1; 464 465 /***************** BEGIN OF AUXILARY PART ********************* 466 ATTENTION: DO NOT REMOVE OR CHANGE SIGNATURES IN THIS SECTION 467 **************************************************************/ 468 469 void* MODULE_EXPORT_LIST[] = { 470 /* 0 */ (void*)EXPORTLIST_MAGIC_NUMBER, 471 /* 1 */ (void*)0 472 }; 473 474 475 //--------------------------------------------------------- 476 // PURPOSE: Bind module symbols with chdk. 477 // Required function 478 // PARAMETERS: pointer to chdk list of export 479 // RETURN VALUE: 1 error, 0 ok 480 //--------------------------------------------------------- 481 int _module_loader( unsigned int* chdk_export_list ) 482 { 483 if ( chdk_export_list[0] != EXPORTLIST_MAGIC_NUMBER ) 484 return 1; 485 486 if ( !API_VERSION_MATCH_REQUIREMENT( gui_version.common_api, 1, 0 ) ) 487 return 1; 488 489 config_restore(&conf_info[0], "A/CHDK/MODULES/CFG/sokoban.cfg", sizeof(conf_info)/sizeof(conf_info[0]), 0, 0); 490 491 return 0; 492 } 493 494 495 //--------------------------------------------------------- 496 // PURPOSE: Finalize module operations (close allocs, etc) 497 // RETURN VALUE: 0-ok, 1-fail 498 //--------------------------------------------------------- 499 int _module_unloader() 500 { 501 config_save(&conf_info[0], "A/CHDK/MODULES/CFG/sokoban.cfg", sizeof(conf_info)/sizeof(conf_info[0])); 502 return 0; 503 } 504 505 506 //--------------------------------------------------------- 507 // PURPOSE: Default action for simple modules (direct run) 508 // NOTE: Please comment this function if no default action and this library module 509 //--------------------------------------------------------- 510 int _module_run(int moduleidx, int argn, int* arguments) 511 { 512 module_idx=moduleidx; 513 514 int rv = 0; 515 if ((mode_get()&MODE_MASK) != MODE_PLAY) { 516 gui_mbox_init(LANG_MSG_INFO_TITLE, LANG_MSG_SWITCH_TO_PLAY_MODE, 517 MBOX_FUNC_RESTORE|MBOX_TEXT_CENTER, 0); 518 } else { 519 rv = gui_sokoban_init(); 520 } 521 if ( ! rv ) 522 module_async_unload(moduleidx); // fail to init - "unload me" 523 524 return 0; 450 525 } 451 526 -
branches/reyalp-flt/core/main.c
r1522 r1542 128 128 } 129 129 130 int core_get_free_memory() { 130 int core_get_free_memory() 131 { 132 cam_meminfo camera_meminfo; 133 131 134 #if defined(OPT_EXMEM_MALLOC) && !defined(OPT_EXMEM_TESTING) 132 135 // If using the exmem / suba memory allocation system then don't need 133 136 // to try allocating memory to find out how much is available 134 137 // Call function to scan free list for the largest free block available. 135 cam_meminfo camera_meminfo;136 138 GetExMemInfo(&camera_meminfo); 139 #else 140 // Call function to fill memory info structure and return size of largest free block 141 // If implemented this will use firmware function, otherwise it will calculate largest 142 // free block 143 GetMemInfo(&camera_meminfo); 144 #endif 145 137 146 return camera_meminfo.free_block_max_size; 138 #elif defined(CAM_FIRMWARE_MEMINFO)139 // Call firmware function to fill memory info structure and return size of largest free block140 cam_meminfo camera_meminfo;141 GetMemInfo(&camera_meminfo);142 return camera_meminfo.free_block_max_size;143 #else144 int size, l_size, d;145 char* ptr;146 147 size = 16;148 while (1) {149 ptr= malloc(size);150 if (ptr) {151 free(ptr);152 size <<= 1;153 } else154 break;155 }156 157 l_size = size;158 size >>= 1;159 d=1024;160 while (d) {161 ptr = malloc(size);162 if (ptr) {163 free(ptr);164 d = l_size-size;165 if (d<0) d=-d;166 l_size = size;167 size += d>>1;168 } else {169 d = size-l_size;170 if (d<0) d=-d;171 l_size = size;172 size -= d>>1;173 }174 175 }176 return size-1;177 #endif178 147 } 179 148 … … 226 195 mkdir("A/CHDK/BOOKS"); 227 196 mkdir("A/CHDK/MODULES"); 197 mkdir("A/CHDK/MODULES/CFG"); 228 198 mkdir("A/CHDK/GRIDS"); 229 199 #ifdef OPT_CURVES … … 271 241 272 242 #ifdef OPT_EDGEOVERLAY 273 if( conf.edge_overlay_thresh && conf.edge_overlay_enable) {243 if(((gui_get_mode()==GUI_MODE_NONE) || (gui_get_mode()==GUI_MODE_ALT)) && conf.edge_overlay_thresh && conf.edge_overlay_enable) { 274 244 275 245 // We need to skip first tick because stability -
branches/reyalp-flt/core/module_exportlist.c
r1537 r1542 41 41 42 42 // ** SECTION 1: DEFINE UNDECLARED EXPORTED ITEMS 43 44 #ifndef CAM_FIRMWARE_MEMINFO45 #define GetMemInfo 046 #endif47 #if !defined(OPT_EXMEM_MALLOC)48 #define GetExMemInfo 049 #endif50 43 51 44 … … 84 77 char COLOR__EXPORTEDSYM_HISTO_RG_PLAY = COLOR_HISTO_RG_PLAY ; 85 78 86 87 79 /* EXPORTED_DEFINES_END */ 88 80 81 89 82 // ** SECTION 3: LIST OF EXPORTED SYMBOLS (pointer to function/variable) 90 // 1. DO NOT CHANGE ORDER AND DO NOT DELETE EXISTED ENTRIES 91 // 2. VARIABLE conf SHOULDN'T EXIST IN THE LIST TO KEEP ISOLATION. USE set|get_chdk_conf|get_chdk_conf_ptr INSTEAD 92 // STOPLIST: conf, open, opendir, closedir, rewinddir, readdir, stat 83 // STOPLIST: open, opendir, closedir, rewinddir, readdir, stat 84 85 // This section is parsed by the makeexport.c program to generate the 86 // symbol hash table loaded later (from module_hashlist.h) 87 // Symbols to be exported should be on seperate lines, blank lines and '//' style comments are allowed 93 88 94 89 #if 0 95 96 void* CHDK_EXPORT_LIST[] = { 97 (void*)EXPORTLIST_MAGIC_NUMBER, 98 (void*)EXPORTLIST_LAST_IDX, 99 90 { 100 91 module_async_unload, 101 92 module_set_flags, … … 325 316 module_tbox_get_version, 326 317 module_tbox_run, 327 }; 328 318 319 config_save, 320 config_restore, 321 } 329 322 #endif 330 323 324 // Symbol hash table for resolving exported symbol references 331 325 sym_hash symbol_hash_table[] = 332 326 { -
branches/reyalp-flt/core/module_load.c
r1536 r1542 158 158 { 159 159 // binary search (first entry is magic number & entry count) 160 int min = 1, max = EXPORTLIST_LAST_IDX -1;160 int min = 1, max = EXPORTLIST_LAST_IDX; 161 161 do 162 162 { … … 186 186 187 187 if (importaddress == 0) return 0; 188 189 // //@tsv todo: if (*relocbuf>=flat->reloc_start) error_out_of_bound190 //// No such symbol to import191 //if ( importidx<2 || importidx>EXPORTLIST_LAST_IDX )192 // return 0;193 194 //// Empty symbol - module could only if import such symbol manually195 //if ( CHDK_EXPORT_LIST[importidx]==0 )196 // return 0;197 188 198 189 *ptr += (int)importaddress; //(uint32_t)CHDK_EXPORT_LIST[importidx]; -
branches/reyalp-flt/core/modules.c
r1539 r1542 288 288 module_dng_semaphore |= owner; 289 289 290 module_load_generic((void**)&lib grids, MODULE_NAME_GRIDS, bind_module_dng, 0);290 module_load_generic((void**)&libdng, MODULE_NAME_DNG, bind_module_dng, 0); 291 291 292 292 if (libdng == 0) -
branches/reyalp-flt/core/modules/Makefile
r1537 r1542 28 28 all: exportlist ../flt.h \ 29 29 _dng.flt benchm.flt calend.flt 4wins.flt mastmind.flt reversi.flt sokoban.flt _rawop10.flt _rawop12.flt \ 30 txtread.flt memview.flt modinsp.flt tetris.flt snake.flt gamemenu.flt modmenu.flt _tbox.flt $(OPT_FLT)30 txtread.flt memview.flt modinsp.flt tetris.flt snake.flt gamemenu.flt modmenu.flt _tbox.flt $(OPT_FLT) 31 31 32 32 %.o: %.c … … 52 52 @echo \-\> $@ 53 53 $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS) 54 55 54 56 55 benchm.elf: simple_module.o ../gui_bench.o … … 78 77 $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS) 79 78 80 sokoban.elf: simple_game.o../gui_sokoban.o79 sokoban.elf: ../gui_sokoban.o 81 80 @echo \-\> $@ 82 81 $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS) -
branches/reyalp-flt/core/modules/module_inspector.c
r1537 r1542 9 9 10 10 extern int basic_module_init(); 11 void (*_getmeminfo)(void*) = 0;12 void (*_getexmeminfo)(void*) = 0;13 11 14 12 /***************** BEGIN OF AUXILARY PART ********************* … … 35 33 if ( !API_VERSION_MATCH_REQUIREMENT( gui_version.common_api, 1, 0 ) ) 36 34 return 1; 37 38 _getmeminfo = module_find_symbol_address(MODULESYM_GETMEMINFO);39 _getexmeminfo = module_find_symbol_address(MODULESYM_GETEXMEMINFO);40 35 41 36 return 0; … … 184 179 draw_txt_string(1, 4+showidx, "SET-redraw, DISP-unload_all, MENU-exit", MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE)); 185 180 186 // Simple platform-dependend part [not always GetMemInfo exits]187 181 cam_meminfo meminfo; 188 if (_getmeminfo) { 189 190 memset(&meminfo,0,sizeof(meminfo)); 191 _getmeminfo(&meminfo); 192 193 gui_mem_info("MEM", &meminfo, showidx); 194 195 showidx += 3; 196 } 197 if (_getexmeminfo) { 198 199 memset(&meminfo,sizeof(meminfo),0); 200 _getexmeminfo(&meminfo); 201 182 183 // Display Canon heap memory info 184 // amount of data displayed may vary depending on GetMemInfo implementation 185 memset(&meminfo,0,sizeof(meminfo)); 186 GetMemInfo(&meminfo); 187 gui_mem_info("MEM", &meminfo, showidx); 188 showidx += 3; 189 190 // Display EXMEM memory info (only if enabled) 191 memset(&meminfo,0,sizeof(meminfo)); 192 if (GetExMemInfo(&meminfo)) 193 { 202 194 gui_mem_info("EXMEM", &meminfo, showidx); 203 195 } -
branches/reyalp-flt/core/zebra.c
r1536 r1542 13 13 #include "modules.h" 14 14 #include "module_exportlist.h" 15 16 //------------------------------------------------------------------- 17 18 typedef struct 19 { 20 color zebra_color; // under/over 21 int zebra_mode; 22 int zebra_restore_screen; 23 int zebra_restore_osd; 24 int zebra_over; 25 int zebra_under; 26 int zebra_draw_osd; 27 int zebra_multichannel; 28 } ZebraConf; 29 30 ZebraConf zconf; 31 32 static ConfInfo conf_info[] = { 33 CONF_INFO( 1, zconf.zebra_color, CONF_DEF_VALUE, cl:0, NULL), 34 CONF_INFO( 2, zconf.zebra_mode, CONF_DEF_VALUE, i:ZEBRA_MODE_BLINKED_2, NULL), 35 CONF_INFO( 3, zconf.zebra_restore_screen, CONF_DEF_VALUE, i:1, NULL), 36 CONF_INFO( 4, zconf.zebra_restore_osd, CONF_DEF_VALUE, i:1, NULL), 37 CONF_INFO( 5, zconf.zebra_over, CONF_DEF_VALUE, i:1, NULL), 38 CONF_INFO( 6, zconf.zebra_under, CONF_DEF_VALUE, i:0, NULL), 39 CONF_INFO( 7, zconf.zebra_draw_osd, CONF_DEF_VALUE, i:ZEBRA_DRAW_HISTO, NULL), 40 CONF_INFO( 8, zconf.zebra_multichannel, CONF_DEF_VALUE, i:0, NULL), 41 }; 15 42 16 43 //------------------------------------------------------------------- … … 166 193 //------------------------------------------------------------------- 167 194 static void gui_osd_draw_zebra_osd() { 168 switch ( conf.zebra_draw_osd) {195 switch (zconf.zebra_draw_osd) { 169 196 case ZEBRA_DRAW_NONE: 170 197 break; … … 219 246 int gui_osd_draw_zebra(int show) { 220 247 unsigned int v, s, x, y, f, over; 221 color cl_under = BG_COLOR( conf.zebra_color), cl_over = FG_COLOR(conf.zebra_color);248 color cl_under = BG_COLOR(zconf.zebra_color), cl_over = FG_COLOR(zconf.zebra_color); 222 249 static int need_restore=0; 223 250 int viewport_height; … … 274 301 viewport_xoffset = vid_get_viewport_xoffset(); 275 302 viewport_yoffset = vid_get_viewport_yoffset(); 276 switch ( conf.zebra_mode) {303 switch (zconf.zebra_mode) { 277 304 case ZEBRA_MODE_ZEBRA_1: 278 305 f = 4; … … 302 329 } 303 330 int step_x, step_v, sy, sx; 304 over = 255- conf.zebra_over;305 if ( conf.zebra_multichannel) {step_x=2; step_v=6;} else {step_x=1; step_v=3;}331 over = 255-zconf.zebra_over; 332 if (zconf.zebra_multichannel) {step_x=2; step_v=6;} else {step_x=1; step_v=3;} 306 333 for (y=viewport_yoffset, v=viewport_image_offset; y<viewport_yoffset+viewport_height; ++y) { 307 334 sy=y*camera_screen.buffer_width; … … 316 343 yy = img_buf[v+1]; 317 344 s=sy+sx*2; 318 if ( conf.zebra_multichannel) {345 if (zconf.zebra_multichannel) { 319 346 uu = (signed char)img_buf[v]; 320 347 vv = (signed char)img_buf[v+2]; 321 348 sel=0; 322 if (!(( conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 ||conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) {349 if (!((zconf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || zconf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) { 323 350 if (clip8(((yy<<12) + vv*5743 + 2048)>>12)>over) sel = 4; // R 324 351 if (clip8(((yy<<12) - uu*1411 - vv*2925 + 2048)>>12)>over) sel |= 2; // G … … 328 355 buf[s+2]=buf[s+3]=cls[sel]; 329 356 } 330 else if ((( conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 ||conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) buf[s]=buf[s+1]=COLOR_TRANSPARENT;331 else buf[s]=buf[s+1]=(yy>over)?cl_over:(yy< conf.zebra_under)?cl_under:COLOR_TRANSPARENT;357 else if (((zconf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || zconf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) buf[s]=buf[s+1]=COLOR_TRANSPARENT; 358 else buf[s]=buf[s+1]=(yy>over)?cl_over:(yy<zconf.zebra_under)?cl_under:COLOR_TRANSPARENT; 332 359 if (buf[s] != COLOR_TRANSPARENT && !zebra_drawn) zebra_drawn = 1; 333 360 #if ZEBRA_CANONOSD_BORDER_RESTORE 334 361 if(get_cur_buf(s)!=COLOR_TRANSPARENT) buf[s]=get_cur_buf(s); 335 if( conf.zebra_multichannel && get_cur_buf(s+1)!=COLOR_TRANSPARENT) buf[s+1]=get_cur_buf(s+1);362 if(zconf.zebra_multichannel && get_cur_buf(s+1)!=COLOR_TRANSPARENT) buf[s+1]=get_cur_buf(s+1); 336 363 #else 337 364 if(cur_buf[s]!=COLOR_TRANSPARENT) buf[s]=cur_buf[s]; 338 if( conf.zebra_multichannel && cur_buf[s+1]!=COLOR_TRANSPARENT) buf[s+1]=cur_buf[s+1];365 if(zconf.zebra_multichannel && cur_buf[s+1]!=COLOR_TRANSPARENT) buf[s+1]=cur_buf[s+1]; 339 366 #endif 340 367 … … 351 378 // if zebra was drawn during previous call of this function 352 379 if (need_restore) { 353 if ( conf.zebra_restore_screen ||conf.zebra_restore_osd) {380 if (zconf.zebra_restore_screen || zconf.zebra_restore_osd) { 354 381 draw_restore(); 355 382 } else { // clear buf[] of zebra, only leave Canon OSD … … 380 407 need_restore=0; 381 408 } 382 return !( conf.zebra_restore_screen &&conf.zebra_restore_osd);409 return !(zconf.zebra_restore_screen && zconf.zebra_restore_osd); 383 410 // if zebra was drawn 384 411 } else { … … 399 426 int gui_osd_draw_zebra(int show) { 400 427 unsigned int v, s, x, y, f, over; 401 color cl_under = BG_COLOR( conf.zebra_color), cl_over = FG_COLOR(conf.zebra_color);428 color cl_under = BG_COLOR(zconf.zebra_color), cl_over = FG_COLOR(zconf.zebra_color); 402 429 static int need_restore=0; 403 430 int viewport_height; … … 471 498 } 472 499 viewport_height = vid_get_viewport_height(); 473 switch ( conf.zebra_mode) {500 switch (zconf.zebra_mode) { 474 501 case ZEBRA_MODE_ZEBRA_1: 475 502 f = 4; … … 495 522 if (f) { 496 523 int step_x, step_v; 497 over = 255- conf.zebra_over;498 if ( conf.zebra_multichannel) {step_x=2; step_v=6;} else {step_x=1; step_v=3;}524 over = 255-zconf.zebra_over; 525 if (zconf.zebra_multichannel) {step_x=2; step_v=6;} else {step_x=1; step_v=3;} 499 526 s = aspOffset; 500 527 for (y=1, v=0; y<=viewport_height; ++y) { … … 506 533 507 534 yy = img_buf[v+1]; 508 if ( conf.zebra_multichannel) {535 if (zconf.zebra_multichannel) { 509 536 uu = (signed char)img_buf[v]; 510 537 vv = (signed char)img_buf[v+2]; 511 538 sel=0; 512 if (!(( conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 ||conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) {539 if (!((zconf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || zconf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) { 513 540 if (clip8(((yy<<12) + vv*5743 + 2048)>>12)>over) sel = 4; // R 514 541 if (clip8(((yy<<12) - uu*1411 - vv*2925 + 2048)>>12)>over) sel |= 2; // G … … 517 544 buf[s]=buf[s+1]=cls[sel]; 518 545 } 519 else if ((( conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 ||conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) buf[s]=COLOR_TRANSPARENT;520 else buf[s]=(yy>over)?cl_over:(yy< conf.zebra_under)?cl_under:COLOR_TRANSPARENT;546 else if (((zconf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || zconf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) buf[s]=COLOR_TRANSPARENT; 547 else buf[s]=(yy>over)?cl_over:(yy<zconf.zebra_under)?cl_under:COLOR_TRANSPARENT; 521 548 if (buf[s] != COLOR_TRANSPARENT && !zebra_drawn) zebra_drawn = 1; 522 549 if (mrec) { … … 524 551 #if ZEBRA_CANONOSD_BORDER_RESTORE 525 552 if(get_cur_buf(s)!=COLOR_TRANSPARENT) buf[s]=get_cur_buf(s); 526 if( conf.zebra_multichannel && get_cur_buf(s+1)!=COLOR_TRANSPARENT) buf[s+1]=get_cur_buf(s+1);553 if(zconf.zebra_multichannel && get_cur_buf(s+1)!=COLOR_TRANSPARENT) buf[s+1]=get_cur_buf(s+1); 527 554 #else 528 555 if(cur_buf[s]!=COLOR_TRANSPARENT) buf[s]=cur_buf[s]; 529 if( conf.zebra_multichannel && cur_buf[s+1]!=COLOR_TRANSPARENT) buf[s+1]=cur_buf[s+1];556 if(zconf.zebra_multichannel && cur_buf[s+1]!=COLOR_TRANSPARENT) buf[s+1]=cur_buf[s+1]; 530 557 #endif 531 558 } … … 543 570 // if zebra was drawn during previous call of this function 544 571 if (need_restore) { 545 if ( conf.zebra_restore_screen ||conf.zebra_restore_osd) {572 if (zconf.zebra_restore_screen || zconf.zebra_restore_osd) { 546 573 draw_restore(); 547 574 } else { // clear buf[] of zebra, only leave Canon OSD … … 570 597 need_restore=0; 571 598 } 572 return !( conf.zebra_restore_screen &&conf.zebra_restore_osd);599 return !(zconf.zebra_restore_screen && zconf.zebra_restore_osd); 573 600 // if zebra was drawn 574 601 } else { … … 589 616 590 617 void cb_zebra_restore_screen() { 591 if (! conf.zebra_restore_screen)592 conf.zebra_restore_osd = 0;618 if (!zconf.zebra_restore_screen) 619 zconf.zebra_restore_osd = 0; 593 620 } 594 621 595 622 void cb_zebra_restore_osd() { 596 if ( conf.zebra_restore_osd)597 conf.zebra_restore_screen = 1;623 if (zconf.zebra_restore_osd) 624 zconf.zebra_restore_screen = 1; 598 625 } 599 626 … … 602 629 static CMenuItem zebra_submenu_items[] = { 603 630 MENU_ITEM(0x5c,LANG_MENU_ZEBRA_DRAW, MENUITEM_BOOL, &conf.zebra_draw, 0 ), 604 MENU_ENUM2(0x5f,LANG_MENU_ZEBRA_MODE, &conf.zebra_mode, gui_zebra_mode_modes ), 605 MENU_ITEM(0x58,LANG_MENU_ZEBRA_UNDER, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &conf.zebra_under, MENU_MINMAX(0, 32) ), 606 MENU_ITEM(0x57,LANG_MENU_ZEBRA_OVER, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &conf.zebra_over, MENU_MINMAX(0, 32) ), 607 MENU_ITEM(0x28,LANG_MENU_ZEBRA_RESTORE_SCREEN, MENUITEM_BOOL|MENUITEM_ARG_CALLBACK, &conf.zebra_restore_screen, cb_zebra_restore_screen ), 608 MENU_ITEM(0x5c,LANG_MENU_ZEBRA_RESTORE_OSD, MENUITEM_BOOL|MENUITEM_ARG_CALLBACK, &conf.zebra_restore_osd, cb_zebra_restore_osd ), 609 MENU_ENUM2(0x5f,LANG_MENU_ZEBRA_DRAW_OVER, &conf.zebra_draw_osd, gui_zebra_draw_osd_modes ), 610 MENU_ITEM(0x5c,LANG_MENU_ZEBRA_MULTICHANNEL, MENUITEM_BOOL, &conf.zebra_multichannel, 0 ), 631 MENU_ENUM2(0x5f,LANG_MENU_ZEBRA_MODE, &zconf.zebra_mode, gui_zebra_mode_modes ), 632 MENU_ITEM(0x58,LANG_MENU_ZEBRA_UNDER, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &zconf.zebra_under, MENU_MINMAX(0, 32) ), 633 MENU_ITEM(0x57,LANG_MENU_ZEBRA_OVER, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &zconf.zebra_over, MENU_MINMAX(0, 32) ), 634 MENU_ITEM(0x28,LANG_MENU_ZEBRA_RESTORE_SCREEN, MENUITEM_BOOL|MENUITEM_ARG_CALLBACK, &zconf.zebra_restore_screen, cb_zebra_restore_screen ), 635 MENU_ITEM(0x5c,LANG_MENU_ZEBRA_RESTORE_OSD, MENUITEM_BOOL|MENUITEM_ARG_CALLBACK, &zconf.zebra_restore_osd, cb_zebra_restore_osd ), 636 MENU_ENUM2(0x5f,LANG_MENU_ZEBRA_DRAW_OVER, &zconf.zebra_draw_osd, gui_zebra_draw_osd_modes ), 637 MENU_ITEM(0x5c,LANG_MENU_ZEBRA_MULTICHANNEL, MENUITEM_BOOL, &zconf.zebra_multichannel, 0 ), 638 MENU_ITEM(0x65,LANG_MENU_VIS_ZEBRA_UNDER, MENUITEM_COLOR_BG, &zconf.zebra_color, 0 ), 639 MENU_ITEM(0x65,LANG_MENU_VIS_ZEBRA_OVER, MENUITEM_COLOR_FG, &zconf.zebra_color, 0 ), 611 640 MENU_ITEM(0x51,LANG_MENU_BACK, MENUITEM_UP, 0, 0 ), 612 641 {0} … … 650 679 return 1; 651 680 652 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 1, 0 ) )681 if ( !API_VERSION_MATCH_REQUIREMENT( conf.api_version, 2, 0 ) ) 653 682 return 1; 683 684 conf_info[0].cl = MAKE_COLOR(COLOR_RED, COLOR_RED); 685 config_restore(&conf_info[0], "A/CHDK/MODULES/CFG/zebra.cfg", sizeof(conf_info)/sizeof(conf_info[0]), 0, 0); 654 686 655 687 return 0; … … 663 695 int _module_unloader() 664 696 { 697 config_save(&conf_info[0], "A/CHDK/MODULES/CFG/zebra.cfg", sizeof(conf_info)/sizeof(conf_info[0])); 665 698 gui_osd_zebra_free(); 666 699 return 0; -
branches/reyalp-flt/include/conf.h
r1539 r1542 113 113 114 114 int zebra_draw; 115 int zebra_mode;116 int zebra_restore_screen;117 int zebra_restore_osd;118 int zebra_over;119 int zebra_under;120 int zebra_draw_osd;121 int zebra_multichannel;115 //int zebra_mode; 116 //int zebra_restore_screen; 117 //int zebra_restore_osd; 118 //int zebra_over; 119 //int zebra_under; 120 //int zebra_draw_osd; 121 //int zebra_multichannel; 122 122 123 123 OSD_pos histo_pos; … … 152 152 int menu_select_first_entry; 153 153 int menu_symbol_enable; 154 color reader_color;155 color zebra_color; // under/over156 color grid_color;154 //color reader_color; 155 //color zebra_color; // under/over 156 //color grid_color; 157 157 color osd_color_override; 158 158 … … 163 163 char lang_file[100]; 164 164 165 char reader_file[100];166 int reader_pos;167 int reader_autoscroll;168 int reader_autoscroll_delay;169 char reader_rbf_file[100];170 int reader_codepage;171 int reader_wrap_by_words;172 173 int sokoban_level;165 //char reader_file[100]; 166 //int reader_pos; 167 //int reader_autoscroll; 168 //int reader_autoscroll_delay; 169 //char reader_rbf_file[100]; 170 //int reader_codepage; 171 //int reader_wrap_by_words; 172 173 //int sokoban_level; 174 174 175 175 int flashlight; … … 188 188 189 189 int show_grid_lines; 190 char grid_lines_file[100];191 int grid_force_color;190 //char grid_lines_file[100]; 191 //int grid_force_color; 192 192 193 193 int video_mode; … … 281 281 282 282 int edge_overlay_enable; 283 int edge_overlay_filter;283 //int edge_overlay_filter; 284 284 int edge_overlay_thresh; 285 int edge_overlay_zoom; // shall zoom be set when *edg file is loaded?286 int edge_overlay_pano; // whether a full press changes back to live mode287 int edge_overlay_pano_overlap; // overlap in % in pano mode288 int edge_overlay_show; // whether to show overlay even when no button is pressed289 int edge_overlay_play; // whether edge overlay is switched on also for play mode290 color edge_overlay_color;285 //int edge_overlay_zoom; // shall zoom be set when *edg file is loaded? 286 //int edge_overlay_pano; // whether a full press changes back to live mode 287 //int edge_overlay_pano_overlap; // overlap in % in pano mode 288 //int edge_overlay_show; // whether to show overlay even when no button is pressed 289 //int edge_overlay_play; // whether edge overlay is switched on also for play mode 290 //color edge_overlay_color; 291 291 292 292 int synch_enable; … … 363 363 extern int is_raw_enabled(); 364 364 365 //------------------------------------------------------------------- 366 367 typedef struct { 368 unsigned short id; 369 unsigned char size; 370 char type; 371 void *var; 372 union { 373 void *ptr; 374 int i; 375 color cl; 376 }; 377 // Since only a few of the ConfInfo entries have a 'func' it saves space to not store the function addresses in the ConfInfo struct 378 // handled in conf_info_func code 379 //void (*func)(); 380 } ConfInfo; 381 382 #define CONF_INFO(id, param, type, def, func) { id, sizeof( param ), type, ¶m, {def}/*, func*/ } 383 384 extern void config_save(const ConfInfo *conf_info, char *filename, int conf_num); 385 extern void config_restore(const ConfInfo *confinfo, char *filename, int conf_num, void (*init_defaults)(), void (*info_func)(unsigned short id)); 386 387 //------------------------------------------------------------------- 388 365 389 #endif -
branches/reyalp-flt/include/platform.h
r1514 r1542 587 587 } cam_meminfo; 588 588 589 #if defined(CAM_FIRMWARE_MEMINFO) 589 // Always included for module_inspector 590 590 extern void GetMemInfo(cam_meminfo*); 591 #endif 591 extern int GetExMemInfo(cam_meminfo*); 592 592 593 593 #ifdef OPT_EXMEM_MALLOC 594 void exmem_malloc_init(void); 595 void GetExMemInfo(cam_meminfo*); 594 extern void exmem_malloc_init(void); 596 595 #endif 597 596 -
branches/reyalp-flt/platform/generic/wrappers.c
r1514 r1542 692 692 // Use suba functions to fill meminfo structure to match firmware GetMemInfo function 693 693 694 voidGetExMemInfo(cam_meminfo *camera_meminfo)694 int GetExMemInfo(cam_meminfo *camera_meminfo) 695 695 { 696 696 extern void suba_getmeminfo(void*, int*, int*, int*, int*, int*, int*); … … 702 702 &camera_meminfo->allocated_size, &camera_meminfo->allocated_peak, &camera_meminfo->allocated_count, 703 703 &camera_meminfo->free_size, &camera_meminfo->free_block_max_size, &camera_meminfo->free_block_count); 704 705 return 1; // return success 704 706 } 705 707 // regular malloc … … 711 713 void free(void *p) { 712 714 return _free(p); 715 } 716 717 // Include this for the module_inspector module to simplify symbol export logic 718 int GetExMemInfo(cam_meminfo *camera_meminfo) 719 { 720 return 0; // return failure (not implemented) 713 721 } 714 722 #endif … … 747 755 } 748 756 757 void GetMemInfo(cam_meminfo *camera_meminfo) 758 { 749 759 #if defined(CAM_FIRMWARE_MEMINFO) 750 760 751 761 // Use firmware GetMemInfo function to retrieve info about Canon heap memory allocation 752 762 753 void GetMemInfo(cam_meminfo *camera_meminfo)754 {755 763 #if defined(CAM_DRYOS) 756 764 // Prior to dryos R39 GetMemInfo returns 9 values, after R39 it returns 10 (all but 1 are used in each case) … … 800 808 #endif 801 809 #endif 802 } 803 804 #endif 810 811 #else //!defined(CAM_FIRMWARE_MEMINFO) 812 // -1 for invalid 813 memset(camera_meminfo,0xFF,sizeof(cam_meminfo)); 814 815 // Calculate largest free block size 816 int size, l_size, d; 817 char* ptr; 818 819 size = 16; 820 while (1) { 821 ptr= malloc(size); 822 if (ptr) { 823 free(ptr); 824 size <<= 1; 825 } else 826 break; 827 } 828 829 l_size = size; 830 size >>= 1; 831 d=1024; 832 while (d) { 833 ptr = malloc(size); 834 if (ptr) { 835 free(ptr); 836 d = l_size-size; 837 if (d<0) d=-d; 838 l_size = size; 839 size += d>>1; 840 } else { 841 d = size-l_size; 842 if (d<0) d=-d; 843 l_size = size; 844 size -= d>>1; 845 } 846 847 } 848 849 camera_meminfo->free_block_max_size = size-1; 850 #endif 851 } 852 805 853 806 854 //---------------------------------------------------------------------------- -
branches/reyalp-flt/tools/elf2flt/myio.c
r1536 r1542 84 84 85 85 static char* import_buf=0; 86 static char* import_syms[MAX_SYM]; 87 static unsigned int import_hash[MAX_SYM]; 88 static int import_counts=0; 86 static char* import_syms[MAX_SYM]; // Symbol names in input file 87 static unsigned int import_hash[MAX_SYM]; // Symbol hash values in input file 88 static int import_counts=0; // # of symbols found 89 89 static int importfilesize=0; 90 91 unsigned int hash(unsigned char *str)92 {93 unsigned int hash = 5381;94 int c;95 96 while ((c = *str++) != 0)97 hash = ((hash << 5) + hash) ^ c; /* hash * 33 xor c */98 99 return hash;100 }101 90 102 91 int load_import(char* importfile) … … 137 126 return -loaded; 138 127 139 // Parse and check 128 // Input file contains symbol hash value (in hex), a space and then the symbol name 129 // Parse the input file and build the symbol / hash table 140 130 char* p=import_buf; 141 131 char* s=p; … … 149 139 if (*p==10) { 150 140 *p=0; 151 import_syms[import_counts] = s; 152 import_hash[import_counts] = hash(s); 141 unsigned int h; 142 sscanf(s,"%x ",&h); 143 import_syms[import_counts] = s+9; 144 import_hash[import_counts] = h; 153 145 import_counts++; 154 146 s = p + 1; … … 156 148 } 157 149 158 if (!((*p>='A' && *p<='Z') || 159 (*p>='a' && *p<='z') || 160 (*p>='0' && *p<='9') || 161 *p=='_' )) 162 { 163 PRINTERR(stderr,"Found '%c' sym. Import file should contain only symbol names. No spaces or other sym allowed\n",*p); 164 break; 165 } 166 150 //if (!((*p>='A' && *p<='Z') || 151 // (*p>='a' && *p<='z') || 152 // (*p>='0' && *p<='9') || 153 // *p=='_' )) 154 //{ 155 // PRINTERR(stderr,"Found '%c' sym. Import file should contain only symbol names. No spaces or other sym allowed\n",*p); 156 // break; 157 //} 167 158 } 168 159 if ( FLAG_VERBOSE ) … … 171 162 } 172 163 173 // Return: 0=not_found, >=2 - import_sym_idx164 // Return: 0=not_found, otherwise return has value of symbol name 174 165 int find_import_symbol(char* sym) 175 166 { … … 195 186 } 196 187 197 // Return symbol name by its idx188 // Return symbol name by its hash value 198 189 char* get_import_symbol( unsigned symidx ) 199 190 { -
branches/reyalp-flt/tools/makeexport.c
r1538 r1542 34 34 hash_vals[i].count++; 35 35 fprintf(stderr,"Hash collision for 0x%08x (%s and %s)\n",val, sym, hash_vals[i].symbol); 36 return;36 exit(-3); 37 37 } 38 38 } … … 63 63 int c; 64 64 65 // djb2 hash algorithm (Dan Bernstein - http://cr.yp.to/djb.html) 65 66 while ((c = *str++) != 0) 66 67 hash = ((hash << 5) + hash) ^ c; /* hash * 33 xor c */ … … 205 206 cut_export_token(symbol); 206 207 207 if (num_lines>=2) { 208 unsigned int hash_val = hash(symbol); 209 add_hash(hash_val,full_symbol); 210 fprintf(out_txt,"%s\x0a",symbol); 211 for(; size>=0; size--) 212 { 213 if ( symbol[size]>='a' && symbol[size]<='z') 214 symbol[size]-=0x20; 215 } 216 fprintf(out_h,"#define MODULESYM_%-32s 0x%08x\n",symbol,hash_val); 208 unsigned int hash_val = hash(symbol); 209 add_hash(hash_val,full_symbol); 210 fprintf(out_txt,"%08x %s\n",hash_val,symbol); 211 for(; size>=0; size--) 212 { 213 if ( symbol[size]>='a' && symbol[size]<='z') 214 symbol[size]-=0x20; 217 215 } 216 fprintf(out_h,"#define MODULESYM_%-32s 0x%08x\n",symbol,hash_val); 218 217 219 218 num_lines++; … … 226 225 227 226 sort_hash(); 227 fprintf(out_hash,"// This is an automatically generated file. DO NOT EDIT!\n"); 228 228 int n; 229 229 for (n=0; n<hash_idx; n++) … … 233 233 234 234 if (num_lines>=1) 235 fprintf(out_h,"\n#define EXPORTLIST_LAST_IDX %d\n\n",num_lines -1);235 fprintf(out_h,"\n#define EXPORTLIST_LAST_IDX %d\n\n",num_lines); 236 236 else { 237 fprintf(out_h,"#error Malformed export list. Only %d valid records\n\n",num_lines +2);237 fprintf(out_h,"#error Malformed export list. Only %d valid records\n\n",num_lines); 238 238 exit(-2); 239 239 }
Note: See TracChangeset
for help on using the changeset viewer.