Index: trunk/doc/TODO =================================================================== --- trunk/doc/TODO (revision 21109) +++ trunk/doc/TODO (revision 21110) @@ -3,6 +3,7 @@ 1. For the upcoming release =============================================================================== + FEATURE: (prio) invert selection [report: Keantoken] + BUG: (prio) bug_files/png_export_fix_dpi.patch , ML #2474 [report: Cyril] ++ FEATURE: an alternative --version that has script-parsable output [report: bdale] - CLEANUP: boardflip rewrite: use data_mirror - BUG: can't undo after boardflip(), (ERROR: Attempt to pcb_undo() with Serial == 0) [report:Miloh] - BUG: boardflip() action moves the objects and doesn't move the subc outline and origin (repro: place single part, run boardflip) [report:Miloh] @@ -56,7 +57,6 @@ - switch over core from storing color names to storing pcb_color_t - remove per hid, non-backup-lib custom color structs - FEATURE: session persistent DAD message log (messages are flushed after dialog is closed?) [report: Miloh] -- FEATURE: an alternative --version that has script-parsable output [report: bdale] - FEATURE: make propset() able to change board properties if first arg is "board" (change baord size) [report: rqsall] - FEATURE: the property editor should display a stat of number/type of objects selected [report: Igor2] - CLEANUP: dad: make the implicit dialog ok/cancel buttons configurable or do not use them at all; e.g. export dialog is confusing [report: Cyril, ml2409] Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 21109) +++ trunk/src/main.c (revision 21110) @@ -300,6 +300,7 @@ NULL, "-show-paths", "PrintPaths()", "Print all configured paths and exit", NULL, NULL, "-dump-config", "dumpconf(native,1)", "Print the config tree and exit", "Config dump not available - make sure you have configured pcb-rnd with --buildin-diag", "V", "-version", "PrintVersion()", "Print version info and exit", NULL, + "V", "-dump-version", "DumpVersion()", "Print version info in script readable format and exit", NULL, NULL, "-copyright", "PrintCopyright()", "Print copyright and exit", NULL, NULL, NULL, NULL, NULL, NULL /* terminator */ }; Index: trunk/src/main_act.c =================================================================== --- trunk/src/main_act.c (revision 21109) +++ trunk/src/main_act.c (revision 21110) @@ -200,6 +200,16 @@ return 0; } +static const char pcb_acts_DumpVersion[] = "DumpVersion()"; +static const char pcb_acth_DumpVersion[] = "Dump version in script readable format."; +fgw_error_t pcb_act_DumpVersion(fgw_arg_t *res, int argc, fgw_arg_t *argv) +{ + printf("%s\n", PCB_VERSION); + printf("%s\n", PCB_REVISION); + PCB_ACT_IRES(0); + return 0; +} + static const char pcb_acts_PrintCopyright[] = "PrintCopyright()"; static const char pcb_acth_PrintCopyright[] = "Print copyright notice."; fgw_error_t pcb_act_PrintCopyright(fgw_arg_t *res, int argc, fgw_arg_t *argv) @@ -413,6 +423,7 @@ {"DumpActions", pcb_act_DumpActions, pcb_acth_DumpActions, pcb_acts_DumpActions}, {"PrintUsage", pcb_act_PrintUsage, pcb_acth_PrintUsage, pcb_acts_PrintUsage}, {"PrintVersion", pcb_act_PrintVersion, pcb_acth_PrintVersion, pcb_acts_PrintVersion}, + {"DumpVersion", pcb_act_DumpVersion, pcb_acth_DumpVersion, pcb_acts_DumpVersion}, {"PrintCopyright", pcb_act_PrintCopyright, pcb_acth_PrintCopyright, pcb_acts_PrintCopyright}, {"PrintPaths", pcb_act_PrintPaths, pcb_acth_PrintPaths, pcb_acts_PrintPaths}, {"PrintFiles", pcb_act_PrintFiles, pcb_acth_PrintFiles, pcb_acts_PrintFiles},