mirror of
https://github.com/eddyem/small_tel.git
synced 2026-03-20 08:41:03 +03:00
fixed for new vesrion of usefull_macros
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
set(PROJ PCS_create)
|
||||
set(MINOR_VERSION "0")
|
||||
set(MID_VERSION "1")
|
||||
|
||||
@@ -321,7 +321,7 @@ static void printheader(){
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
initial_setup();
|
||||
sl_init();
|
||||
G = parse_args(argc, argv);
|
||||
if(G->pressure < 0.) ERRX("Pressure should be greater than zero");
|
||||
if(G->temperature < -100. || G->temperature > 100.) ERRX("Temperature over the range -100..+100");
|
||||
|
||||
@@ -40,7 +40,7 @@ glob_pars const Gdefault = {
|
||||
* Define command line options by filling structure:
|
||||
* name has_arg flag val type argptr help
|
||||
*/
|
||||
static myoption cmdlnopts[] = {
|
||||
static sl_option_t cmdlnopts[] = {
|
||||
// set 1 to param despite of its repeating number:
|
||||
{"help", NO_ARGS, NULL, 'h', arg_int, APTR(&help), _("show this help")},
|
||||
{"10m", NO_ARGS, NULL, 't', arg_int, APTR(&G.for10m), _("make output suitable for 10-micron mount")},
|
||||
@@ -68,10 +68,10 @@ static myoption cmdlnopts[] = {
|
||||
glob_pars *parse_args(int argc, char **argv){
|
||||
void *ptr = memcpy(&G, &Gdefault, sizeof(G)); assert(ptr);
|
||||
// format of help: "Usage: progname [args]\n"
|
||||
change_helpstring(_("Version: " PACKAGE_VERSION "\nUsage: %s [args] FITS_files\nMake PCS list for equatorial mount\n\tWhere args are:\n"));
|
||||
sl_helpstring(_("Version: " PACKAGE_VERSION "\nUsage: %s [args] FITS_files\nMake PCS list for equatorial mount\n\tWhere args are:\n"));
|
||||
// parse arguments
|
||||
parseargs(&argc, &argv, cmdlnopts);
|
||||
if(help) showhelp(-1, cmdlnopts);
|
||||
sl_parseargs(&argc, &argv, cmdlnopts);
|
||||
if(help) sl_showhelp(-1, cmdlnopts);
|
||||
G.nfiles = argc;
|
||||
G.infiles = MALLOC(char*, argc);
|
||||
for(int i = 0; i < argc; i++){
|
||||
|
||||
Reference in New Issue
Block a user