fixed for new vesrion of usefull_macros

This commit is contained in:
2026-01-26 16:54:50 +03:00
parent 50cbaea550
commit a80347643f
25 changed files with 107 additions and 103 deletions

View File

@@ -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")

View File

@@ -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");

View File

@@ -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++){