Commit 7e3cadd1 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Fixed double image syntax issue when using spaces between the two filenames.

parent e9ebcc2a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2013 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2018 IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 04/06/2013 * Last modified: 09/01/2018
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -76,7 +76,7 @@ setlinebuf(stdout); ...@@ -76,7 +76,7 @@ setlinebuf(stdout);
prefs.ncommand_line = argc; prefs.ncommand_line = argc;
prefs.pipe_flag = 0; prefs.pipe_flag = 0;
prefs.nimage_name = 1; prefs.nimage_name = 1;
prefs.image_name[0] = "image"; strcpy(prefs.image_name[0], "image");
strcpy(prefs.prefs_name, "default.sex"); strcpy(prefs.prefs_name, "default.sex");
narg = nim = 0; narg = nim = 0;
...@@ -132,7 +132,7 @@ setlinebuf(stdout); ...@@ -132,7 +132,7 @@ setlinebuf(stdout);
strncpy(str, argv[a], MAXCHARL-1); strncpy(str, argv[a], MAXCHARL-1);
for (pstr=NULL;(pstr=strtok(pstr?NULL:str, notokstr)); nim++) for (pstr=NULL;(pstr=strtok(pstr?NULL:str, notokstr)); nim++)
if (nim<MAXIMAGE) if (nim<MAXIMAGE)
prefs.image_name[nim] = pstr; strncpy(prefs.image_name[nim], pstr, MAXCHAR-1);
else else
error(EXIT_FAILURE, "*Error*: Too many input images: ", pstr); error(EXIT_FAILURE, "*Error*: Too many input images: ", pstr);
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 1993-2015 Emmanuel Bertin -- IAP/CNRS/UPMC * Copyright: (C) 1993-2018 IAP/CNRS/UPMC
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 02/12/2015 * Last modified: 09/01/2018
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -50,7 +50,7 @@ typedef struct ...@@ -50,7 +50,7 @@ typedef struct
char **command_line; /* Command line */ char **command_line; /* Command line */
int ncommand_line; /* nb of params */ int ncommand_line; /* nb of params */
char prefs_name[MAXCHAR]; /* prefs filename*/ char prefs_name[MAXCHAR]; /* prefs filename*/
char *(image_name[2]); /* image filenames */ char image_name[2][MAXCHAR]; /* image filenames */
int nimage_name; /* nb of params */ int nimage_name; /* nb of params */
char cat_name[MAXCHAR]; /* catalog filename*/ char cat_name[MAXCHAR]; /* catalog filename*/
char head_suffix[MAXCHAR]; /* ext. header suffix */ char head_suffix[MAXCHAR]; /* ext. header suffix */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment