Changeset 8161
- Timestamp:
- Aug 4, 2006, 3:08:30 PM (20 years ago)
- Location:
- trunk/ippdb
- Files:
-
- 3 edited
-
configure.ac (modified) (1 diff)
-
src/ippdb.c (modified) (1 diff)
-
src/ippdb.h (modified) (32 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/configure.ac
r8156 r8161 1 1 AC_PREREQ(2.59) 2 2 3 AC_INIT([ippdb], [0.0.1 5], [pan-starrs.ifa.hawaii.edu])3 AC_INIT([ippdb], [0.0.1], [pan-starrs.ifa.hawaii.edu]) 4 4 AC_CONFIG_SRCDIR([ippdb.pc.in]) 5 5 -
trunk/ippdb/src/ippdb.c
r8156 r8161 77 77 } 78 78 79 bool ippdbPrintMetadatas(FILE *stream, psArray *mds, const char *mdname, bool mdconfigformat) 80 { 81 PS_ASSERT_PTR_NON_NULL(mds, false); 82 PS_ASSERT_PTR_NON_NULL(mdname, false); 83 84 psMetadata *output = psMetadataAlloc(); 85 for (long i = 0; i < psArrayLength(mds); i++) { 86 psMetadata *md = mds->data[i]; 87 if (!psMetadataAddMetadata( 88 output, 89 PS_LIST_TAIL, 90 mdname, 91 PS_META_DUPLICATE_OK, 92 NULL, 93 md 94 )) { 95 psError(PS_ERR_UNKNOWN, false, "failed to add metadata"); 96 psFree(md); 97 psFree(output); 98 return false; 99 } 100 psFree(md); 101 } 102 103 psString str = psMetadataConfigFormat(output); 104 if (!str) { 105 psError(PS_ERR_UNKNOWN, false, "failed to format data into a string"); 106 psFree(output); 107 } 108 psFree(output); 109 fprintf(stream, "%s\n", str); 110 psFree(str); 111 112 return true; 113 } 114 79 115 static void weatherRowFree(weatherRow *object); 80 116 -
trunk/ippdb/src/ippdb.h
r8152 r8161 29 29 void ippdbCleanup( 30 30 psDB *dbh ///< Database handle 31 ); 32 33 /** Formats and prints an array of metadata 34 * 35 * When mdconfigformat is set the formated output is in psMetadataConfig 36 * format, otherwise it is in a simple tabular format. 37 * 38 * @return true on success 39 */ 40 41 bool ippdbPrintMetadatas( 42 FILE *stream, ///< a stream 43 psArray *mds, ///< An array of metadata 44 const char *mdname, ///< name of the metadata(s) 45 bool mdconfigformat ///< format as mdconfig or simple 31 46 ); 32 47 … … 235 250 /** Formats and prints an array of weatherRow objects 236 251 * 237 * @return A boolean - false on error 252 * When mdconfigformat is set the formated output is in psMetadataConfig 253 * format, otherwise it is in a simple tabular format. 254 * 255 * @return true on success 238 256 */ 239 257 … … 447 465 /** Formats and prints an array of skyp_transparencyRow objects 448 466 * 449 * @return A boolean - false on error 467 * When mdconfigformat is set the formated output is in psMetadataConfig 468 * format, otherwise it is in a simple tabular format. 469 * 470 * @return true on success 450 471 */ 451 472 … … 667 688 /** Formats and prints an array of skyp_absorptionRow objects 668 689 * 669 * @return A boolean - false on error 690 * When mdconfigformat is set the formated output is in psMetadataConfig 691 * format, otherwise it is in a simple tabular format. 692 * 693 * @return true on success 670 694 */ 671 695 … … 875 899 /** Formats and prints an array of skyp_emissionRow objects 876 900 * 877 * @return A boolean - false on error 901 * When mdconfigformat is set the formated output is in psMetadataConfig 902 * format, otherwise it is in a simple tabular format. 903 * 904 * @return true on success 878 905 */ 879 906 … … 1087 1114 /** Formats and prints an array of dimmRow objects 1088 1115 * 1089 * @return A boolean - false on error 1116 * When mdconfigformat is set the formated output is in psMetadataConfig 1117 * format, otherwise it is in a simple tabular format. 1118 * 1119 * @return true on success 1090 1120 */ 1091 1121 … … 1295 1325 /** Formats and prints an array of skyp_irRow objects 1296 1326 * 1297 * @return A boolean - false on error 1327 * When mdconfigformat is set the formated output is in psMetadataConfig 1328 * format, otherwise it is in a simple tabular format. 1329 * 1330 * @return true on success 1298 1331 */ 1299 1332 … … 1495 1528 /** Formats and prints an array of domeRow objects 1496 1529 * 1497 * @return A boolean - false on error 1530 * When mdconfigformat is set the formated output is in psMetadataConfig 1531 * format, otherwise it is in a simple tabular format. 1532 * 1533 * @return true on success 1498 1534 */ 1499 1535 … … 1699 1735 /** Formats and prints an array of telescopeRow objects 1700 1736 * 1701 * @return A boolean - false on error 1737 * When mdconfigformat is set the formated output is in psMetadataConfig 1738 * format, otherwise it is in a simple tabular format. 1739 * 1740 * @return true on success 1702 1741 */ 1703 1742 … … 1903 1942 /** Formats and prints an array of summitExpRow objects 1904 1943 * 1905 * @return A boolean - false on error 1944 * When mdconfigformat is set the formated output is in psMetadataConfig 1945 * format, otherwise it is in a simple tabular format. 1946 * 1947 * @return true on success 1906 1948 */ 1907 1949 … … 2107 2149 /** Formats and prints an array of pzPendingExpRow objects 2108 2150 * 2109 * @return A boolean - false on error 2151 * When mdconfigformat is set the formated output is in psMetadataConfig 2152 * format, otherwise it is in a simple tabular format. 2153 * 2154 * @return true on success 2110 2155 */ 2111 2156 … … 2315 2360 /** Formats and prints an array of pzPendingImfileRow objects 2316 2361 * 2317 * @return A boolean - false on error 2362 * When mdconfigformat is set the formated output is in psMetadataConfig 2363 * format, otherwise it is in a simple tabular format. 2364 * 2365 * @return true on success 2318 2366 */ 2319 2367 … … 2519 2567 /** Formats and prints an array of newExpRow objects 2520 2568 * 2521 * @return A boolean - false on error 2569 * When mdconfigformat is set the formated output is in psMetadataConfig 2570 * format, otherwise it is in a simple tabular format. 2571 * 2572 * @return true on success 2522 2573 */ 2523 2574 … … 2719 2770 /** Formats and prints an array of newImfileRow objects 2720 2771 * 2721 * @return A boolean - false on error 2772 * When mdconfigformat is set the formated output is in psMetadataConfig 2773 * format, otherwise it is in a simple tabular format. 2774 * 2775 * @return true on success 2722 2776 */ 2723 2777 … … 2947 3001 /** Formats and prints an array of rawDetrendExpRow objects 2948 3002 * 2949 * @return A boolean - false on error 3003 * When mdconfigformat is set the formated output is in psMetadataConfig 3004 * format, otherwise it is in a simple tabular format. 3005 * 3006 * @return true on success 2950 3007 */ 2951 3008 … … 3175 3232 /** Formats and prints an array of rawScienceExpRow objects 3176 3233 * 3177 * @return A boolean - false on error 3234 * When mdconfigformat is set the formated output is in psMetadataConfig 3235 * format, otherwise it is in a simple tabular format. 3236 * 3237 * @return true on success 3178 3238 */ 3179 3239 … … 3375 3435 /** Formats and prints an array of rawImfileRow objects 3376 3436 * 3377 * @return A boolean - false on error 3437 * When mdconfigformat is set the formated output is in psMetadataConfig 3438 * format, otherwise it is in a simple tabular format. 3439 * 3440 * @return true on success 3378 3441 */ 3379 3442 … … 3611 3674 /** Formats and prints an array of p1PendingExpRow objects 3612 3675 * 3613 * @return A boolean - false on error 3676 * When mdconfigformat is set the formated output is in psMetadataConfig 3677 * format, otherwise it is in a simple tabular format. 3678 * 3679 * @return true on success 3614 3680 */ 3615 3681 … … 3851 3917 /** Formats and prints an array of p2PendingExpRow objects 3852 3918 * 3853 * @return A boolean - false on error 3919 * When mdconfigformat is set the formated output is in psMetadataConfig 3920 * format, otherwise it is in a simple tabular format. 3921 * 3922 * @return true on success 3854 3923 */ 3855 3924 … … 4059 4128 /** Formats and prints an array of p2PendingImfileRow objects 4060 4129 * 4061 * @return A boolean - false on error 4130 * When mdconfigformat is set the formated output is in psMetadataConfig 4131 * format, otherwise it is in a simple tabular format. 4132 * 4133 * @return true on success 4062 4134 */ 4063 4135 … … 4299 4371 /** Formats and prints an array of p2DoneExpRow objects 4300 4372 * 4301 * @return A boolean - false on error 4373 * When mdconfigformat is set the formated output is in psMetadataConfig 4374 * format, otherwise it is in a simple tabular format. 4375 * 4376 * @return true on success 4302 4377 */ 4303 4378 … … 4507 4582 /** Formats and prints an array of p2DoneImfileRow objects 4508 4583 * 4509 * @return A boolean - false on error 4584 * When mdconfigformat is set the formated output is in psMetadataConfig 4585 * format, otherwise it is in a simple tabular format. 4586 * 4587 * @return true on success 4510 4588 */ 4511 4589 … … 4743 4821 /** Formats and prints an array of p3PendingExpRow objects 4744 4822 * 4745 * @return A boolean - false on error 4823 * When mdconfigformat is set the formated output is in psMetadataConfig 4824 * format, otherwise it is in a simple tabular format. 4825 * 4826 * @return true on success 4746 4827 */ 4747 4828 … … 4935 5016 /** Formats and prints an array of detRunRow objects 4936 5017 * 4937 * @return A boolean - false on error 5018 * When mdconfigformat is set the formated output is in psMetadataConfig 5019 * format, otherwise it is in a simple tabular format. 5020 * 5021 * @return true on success 4938 5022 */ 4939 5023 … … 5171 5255 /** Formats and prints an array of detInputExpRow objects 5172 5256 * 5173 * @return A boolean - false on error 5257 * When mdconfigformat is set the formated output is in psMetadataConfig 5258 * format, otherwise it is in a simple tabular format. 5259 * 5260 * @return true on success 5174 5261 */ 5175 5262 … … 5375 5462 /** Formats and prints an array of detProcessedImfileRow objects 5376 5463 * 5377 * @return A boolean - false on error 5464 * When mdconfigformat is set the formated output is in psMetadataConfig 5465 * format, otherwise it is in a simple tabular format. 5466 * 5467 * @return true on success 5378 5468 */ 5379 5469 … … 5579 5669 /** Formats and prints an array of detStackedImfileRow objects 5580 5670 * 5581 * @return A boolean - false on error 5671 * When mdconfigformat is set the formated output is in psMetadataConfig 5672 * format, otherwise it is in a simple tabular format. 5673 * 5674 * @return true on success 5582 5675 */ 5583 5676 … … 5783 5876 /** Formats and prints an array of detNormalizedImfileRow objects 5784 5877 * 5785 * @return A boolean - false on error 5878 * When mdconfigformat is set the formated output is in psMetadataConfig 5879 * format, otherwise it is in a simple tabular format. 5880 * 5881 * @return true on success 5786 5882 */ 5787 5883 … … 5979 6075 /** Formats and prints an array of detMasterFrameRow objects 5980 6076 * 5981 * @return A boolean - false on error 6077 * When mdconfigformat is set the formated output is in psMetadataConfig 6078 * format, otherwise it is in a simple tabular format. 6079 * 6080 * @return true on success 5982 6081 */ 5983 6082 … … 6179 6278 /** Formats and prints an array of detMasterImfileRow objects 6180 6279 * 6181 * @return A boolean - false on error 6280 * When mdconfigformat is set the formated output is in psMetadataConfig 6281 * format, otherwise it is in a simple tabular format. 6282 * 6283 * @return true on success 6182 6284 */ 6183 6285 … … 6395 6497 /** Formats and prints an array of detResidImfileAnalysisRow objects 6396 6498 * 6397 * @return A boolean - false on error 6499 * When mdconfigformat is set the formated output is in psMetadataConfig 6500 * format, otherwise it is in a simple tabular format. 6501 * 6502 * @return true on success 6398 6503 */ 6399 6504 … … 6599 6704 /** Formats and prints an array of detResidExpAnalysisRow objects 6600 6705 * 6601 * @return A boolean - false on error 6706 * When mdconfigformat is set the formated output is in psMetadataConfig 6707 * format, otherwise it is in a simple tabular format. 6708 * 6709 * @return true on success 6602 6710 */ 6603 6711
Note:
See TracChangeset
for help on using the changeset viewer.
