Changeset 38997
- Timestamp:
- Oct 28, 2015, 8:31:48 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/tools/src/fits_to_mysql.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/tools/src/fits_to_mysql.c
r38986 r38997 52 52 char *DATABASE_NAME; 53 53 char *TABLENAME; 54 char *TABLEPREFIX; 54 55 55 56 int args (int *argc, char **argv); … … 193 194 FREE (DATABASE_NAME); 194 195 FREE (TABLENAME); 196 FREE (TABLEPREFIX); 195 197 196 198 ohana_memdump (TRUE); … … 308 310 InitIOBuffer (&buffer, 1024); 309 311 310 char *tablename = TABLENAME ? strcreate (TABLENAME) : strcreate (extname); 312 char *tablename = NULL; 313 if (TABLEPREFIX) { 314 if (TABLENAME) { 315 strextend (&tablename, "%s%s", TABLEPREFIX, TABLENAME); 316 } else { 317 strextend (&tablename, "%s%s", TABLEPREFIX, extname); 318 } 319 } else { 320 tablename = TABLENAME ? strcreate (TABLENAME) : strcreate (extname); 321 } 311 322 replace_dot_with_underscore (tablename); 312 323 … … 702 713 } 703 714 715 TABLEPREFIX = NULL; 716 if ((N = get_argument (*argc, argv, "-tableprefix"))) { 717 remove_argument (N, argc, argv); 718 TABLEPREFIX = strcreate (argv[N]); 719 remove_argument (N, argc, argv); 720 } 721 704 722 return TRUE; 705 723 }
Note:
See TracChangeset
for help on using the changeset viewer.
