Changeset 310 for SH_SHM/trunk
- Timestamp:
- 01/26/2011 12:14:48 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/source/seed_io/sfd2db.c
r307 r310 3 3 * ======== 4 4 * 5 * $Revision: 1 49 $, $Date: 2011-01-14 05:46:15 +0100 (Fr, 14Jan 2011) $5 * $Revision: 152 $, $Date: 2011-01-26 12:13:52 +0100 (Mi, 26 Jan 2011) $ 6 6 * 7 7 * reads lines from sfdfile and creates commands to insert into sfdb database … … 322 322 network[2] = '\0'; 323 323 324 /* one digit network codes are common */ 325 if (network[1] == '.') 326 network[1] = '\0'; 327 328 /* no network set at all. */ 329 if (!strncmp(network, "..", 2)) 330 network[0] = '\0'; 331 324 332 for (i=2; i<4; i++) 325 333 location[i-2] = descr.addinf[i]; 326 334 location[2] = '\0'; 327 335 328 if (!strncmp(network, "..", 2)) 329 network[0] = '\0'; 330 336 /* The SEED manual states for the "Location identiï¬er": 337 * Left justify and pad with spaces. Especially for file 338 * system this is quite weird, so we support 2 digits only. 339 * (for now). 340 */ 331 341 if (!strncmp(location, "..", 2)) 332 342 location[0] = '\0'; … … 354 364 sfcnt++; 355 365 356 /* old lines for mysql357 "insert %sinto sftab values ( \"%s\", \"%s\", \"%c\", \"%d\", \"%s\", \"%4d%02d%02d\", \"%2d%02d%02d.%03d\", \"%4d%02d%02d\", \"%2d%02d%02d.%03d\", \"%d\", \"%d\", \"%d\", \"%d\", \"%d\", \"%d\", \"%d\", NULL );\n",358 "update %ssftab set sdate=\"%4d%02d%02d\", stime=\"%2d%02d%02d.%03d\", edate=\"%4d%02d%02d\", etime=\"%2d%02d%02d.%03d\", recnum=\"%d\", dataflags=\"%d\", priority=\"%d\", dataformat=\"%d\", hswap=\"%d\" where pathid=\"%d\" and relpath=\"%s\";\n",359 */360 361 366 } /*endwhile*/ 362 367 … … 367 372 fclose( out ); 368 373 369 /*sprintf( shellcmd, "cat %s", tmpfile );*/370 374 /*system( shellcmd );*/ 371 375 sprintf( shellcmd, "%s sfdb < %s", sfdbreqscriptfile, tmpfile );
Note: See TracChangeset
for help on using the changeset viewer.