Changeset 5237
- Timestamp:
- Oct 7, 2005, 2:57:16 PM (21 years ago)
- Location:
- trunk/Ohana/src/libohana
- Files:
-
- 17 deleted
- 5 edited
-
Makefile (modified) (4 diffs)
-
doc/ChangeLog.txt (modified) (1 diff)
-
include/ohana.h (modified) (2 diffs)
-
src/Fread.c (modified) (7 diffs)
-
src/LoadPhotcodes.c (deleted)
-
src/coordops.c (deleted)
-
src/dvo_catalog.c (deleted)
-
src/dvo_catalog_mef.c (deleted)
-
src/dvo_catalog_raw.c (deleted)
-
src/dvo_catalog_split.c (deleted)
-
src/dvo_convert.c (deleted)
-
src/dvo_convert_elixir.c (deleted)
-
src/dvo_convert_loneos.c (deleted)
-
src/dvo_convert_panstarrs.c (deleted)
-
src/dvo_image.c (deleted)
-
src/dvo_image_raw.c (deleted)
-
src/fits_db.c (deleted)
-
src/imreg_datatypes.c (deleted)
-
src/mosaic_astrom.c (deleted)
-
src/ohana_allocate.c (modified) (2 diffs)
-
src/photfits.c (deleted)
-
src/skydb.c (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libohana/Makefile
r5228 r5237 22 22 libohana: $(LIB)/libohana.$(ARCH).a 23 23 24 INC 1= \24 INCS = \ 25 25 $(DESTINC)/Xohana.h \ 26 26 $(DESTINC)/ohana_allocate.h \ 27 27 $(DESTINC)/ohana.h 28 28 29 INC2 = \ 30 $(DESTINC)/dvo.h 31 32 OBJ1 = \ 29 OBJS = \ 33 30 $(SRC)/ohana_allocate.$(ARCH).o \ 34 31 $(SRC)/string.$(ARCH).o \ … … 37 34 $(SRC)/time.$(ARCH).o \ 38 35 $(SRC)/config.$(ARCH).o \ 36 $(SRC)/Fread.$(ARCH).o \ 39 37 $(SRC)/version.$(ARCH).o 40 38 41 OBJ2 = \ 42 $(SRC)/Fread.$(ARCH).o \ 43 $(SRC)/coordops.$(ARCH).o \ 44 $(SRC)/LoadPhotcodes.$(ARCH).o \ 45 $(SRC)/imreg_datatypes.$(ARCH).o \ 46 $(SRC)/mosaic_astrom.$(ARCH).o \ 47 $(SRC)/fits_db.$(ARCH).o \ 48 $(SRC)/photfits.$(ARCH).o \ 49 $(SRC)/dvo_image.$(ARCH).o \ 50 $(SRC)/dvo_image_raw.$(ARCH).o \ 51 $(SRC)/dvo_catalog.$(ARCH).o \ 52 $(SRC)/dvo_catalog_raw.$(ARCH).o \ 53 $(SRC)/dvo_catalog_mef.$(ARCH).o \ 54 $(SRC)/dvo_catalog_split.$(ARCH).o \ 55 $(SRC)/dvo_convert.$(ARCH).o \ 56 $(SRC)/dvo_convert_elixir.$(ARCH).o \ 57 $(SRC)/dvo_convert_loneos.$(ARCH).o \ 58 $(SRC)/dvo_convert_panstarrs.$(ARCH).o 59 60 AOBJ = \ 61 $(ASRC)/coords.$(ARCH).o \ 62 $(ASRC)/average.$(ARCH).o \ 63 $(ASRC)/average-loneos.$(ARCH).o \ 64 $(ASRC)/average-elixir.$(ARCH).o \ 65 $(ASRC)/average-panstarrs.$(ARCH).o \ 66 $(ASRC)/secfilt.$(ARCH).o \ 67 $(ASRC)/secfilt-loneos.$(ARCH).o \ 68 $(ASRC)/secfilt-elixir.$(ARCH).o \ 69 $(ASRC)/secfilt-panstarrs.$(ARCH).o \ 70 $(ASRC)/measure.$(ARCH).o \ 71 $(ASRC)/measure-loneos.$(ARCH).o \ 72 $(ASRC)/measure-elixir.$(ARCH).o \ 73 $(ASRC)/measure-panstarrs.$(ARCH).o \ 74 $(ASRC)/missing.$(ARCH).o \ 75 $(ASRC)/photcode.$(ARCH).o \ 76 $(ASRC)/image.$(ARCH).o \ 77 $(ASRC)/image-loneos.$(ARCH).o \ 78 $(ASRC)/image-elixir.$(ARCH).o \ 79 $(ASRC)/image-panstarrs.$(ARCH).o \ 80 $(ASRC)/regimage.$(ARCH).o \ 81 $(ASRC)/detreg.$(ARCH).o \ 82 $(ASRC)/photreg.$(ARCH).o \ 83 $(ASRC)/photreg-old.$(ARCH).o \ 84 $(ASRC)/smpdata.$(ARCH).o \ 85 $(ASRC)/spectrum.$(ARCH).o \ 86 $(ASRC)/spectrum-ascii.$(ARCH).o 87 88 ACOM = $(ADEF)/autocode.c $(ADEF)/autocode.h $(ADEF)/common.h 89 90 $(OBJ1): $(INC1) 91 $(OBJ2): $(INC2) 92 $(AOBJ): $(ASRC)/%.$(ARCH).o : $(ADEF)/%.d $(ACOM) 93 cd $(AUTO) && make install 39 $(OBJS): $(INCS) 94 40 95 41 $(DESTLIB)/libohana.a: $(LIB)/libohana.$(ARCH).a … … 98 44 cp $(LIB)/libohana.$(ARCH).a $(DESTLIB)/libohana.a 99 45 100 $(LIB)/libohana.$(ARCH).a: $(OBJ 1) $(AOBJ) $(OBJ2)46 $(LIB)/libohana.$(ARCH).a: $(OBJS) 101 47 @if [ ! -d $(LIB) ]; then mkdir -p $(LIB); fi 102 48 rm -f $(LIB)/libohana.$(ARCH).a 103 ar rcv $(LIB)/libohana.$(ARCH).a $(OBJ 1) $(AOBJ) $(OBJ2)49 ar rcv $(LIB)/libohana.$(ARCH).a $(OBJS) 104 50 $(RANLIB) $(LIB)/libohana.$(ARCH).a 105 51 … … 114 60 rm -f */*.o 115 61 rm -f */*.a 116 cd $(AUTO) && make clean117 62 118 63 dist: clean -
trunk/Ohana/src/libohana/doc/ChangeLog.txt
r4736 r5237 1 2 2005.10.07 3 4 I was having some memory collision problems, and attempting to 5 use the ohana_allocate functions reminded me that the libFITS 6 functions were not supported under ohana_allocate. This was 7 unhelpful. I bit the bullet and split libohana into libohana 8 (base functions only, including ohana_allocate) and libdvo 9 (functions based on the libautocode structures). Doing this 10 allowed me to make libFITS depend on libohana (including 11 ohana_allocate). BUT, this forced me to change all LDFLAGS 12 entries in ohana to swap -lohana -lFITS for -lFITS -lohana, 13 and to add include <fitsio.h> in some cases. 1 14 2 15 libohana-1-4 -
trunk/Ohana/src/libohana/include/ohana.h
r4810 r5237 20 20 21 21 /* OHANA included stuff */ 22 # include <fitsio.h>23 24 22 # ifndef OHANA_H 25 23 # define OHANA_H … … 152 150 */ 153 151 152 /* 153 # ifndef ANSI 154 # include <varargs.h> 155 # else 156 # include <stdarg.h> 157 # include <cfuncs.h> 154 158 # endif 159 */ 160 161 # endif -
trunk/Ohana/src/libohana/src/Fread.c
r4025 r5237 1 1 # include <ohana.h> 2 # include <dvo.h>3 2 4 3 int ByteSwap (char *ptr, int size, int nitems, char *type); 5 int ConvertStruct (char *buffer, int size, int Nbytes, char *type);6 4 7 5 # define BYTE_EXCHANGE(X,Y) tmp = byte[X]; byte[X] = byte[Y]; byte[Y] = tmp; … … 17 15 tmp = byte[X+3]; byte[X+3] = byte[X+4]; byte[X+4] = tmp; 18 16 19 # define REGIMAGE_SIZE 360 20 # define DETREG_SIZE 416 21 # define PHOTPARS_SIZE 108 22 # define MISSING_SIZE 4 23 # define SECFILT_SIZE 6 24 # define SPECTRUM_SIZE 216 /* where is this?? */ 25 # define IMAGE_SIZE 240 26 27 # if (PANSTARRS) 28 # define AVERAGE_SIZE 40 29 # define MEASURE_SIZE 32 30 # endif 31 32 # if (ELIXIR) 33 # define AVERAGE_SIZE 32 34 # define MEASURE_SIZE 32 35 # endif 36 37 # if (LONEOS) 38 # define AVERAGE_SIZE 28 39 # define MEASURE_SIZE 20 40 # endif 41 42 # define OLDPHOTPARS_SIZE 100 43 # define OLDSECFILT_SIZE 4 44 # define OLDDETREG_SIZE 288 45 17 /** this is also used in libautocode/def/common.h -- consolidate **/ 46 18 # ifdef linux 47 19 # define BYTE_SWAP … … 52 24 # endif 53 25 54 /* add other architectures here, ie dec, alpha, etc */55 26 # ifdef dec 56 27 # define BYTE_SWAP 57 28 # endif 58 29 30 /* add other architectures here, ie dec, alpha, etc */ 31 59 32 int Fread (void *ptr, int size, int nitems, FILE *f, char *type) { 60 33 … … 81 54 } 82 55 83 int ConvertStruct (char *buffer, int size, int nitems, char *type) {84 85 int status;86 status = ByteSwap (buffer, size, nitems, type);87 return (status);88 }89 90 56 int ByteSwap (char *ptr, int size, int nitems, char *type) { 91 57 92 58 # ifdef BYTE_SWAP 93 59 94 int i , j;95 unsigned char *byte , *byte0, *byte1, *byte2, *byte3, *byte4, *byte5, *byte6, *byte7, tmp;60 int i; 61 unsigned char *byte0, *byte1, *byte2, *byte3, *byte4, *byte5, *byte6, *byte7, tmp; 96 62 97 63 if (!strcmp (type, "char")) return (TRUE); … … 150 116 } 151 117 118 # if (0) /** now in autocode **/ 152 119 if (!strcmp (type, "regimage")) { 153 120 if (size != REGIMAGE_SIZE) { … … 352 319 } 353 320 354 # endif /** ELIXIR**/321 # endif /** PANSTARRS **/ 355 322 356 323 … … 494 461 } 495 462 # endif /** others **/ 463 # endif /** now in autocode **/ 496 464 497 465 fprintf (stderr, "unknown type %s\n", type); -
trunk/Ohana/src/libohana/src/ohana_allocate.c
r4718 r5237 198 198 } 199 199 200 fprintf (stderr, "checking for memory corruption...\n");201 200 header = FALSE; 202 201 for (i = 0; i < Nmemlist; i++) { … … 216 215 } 217 216 fprintf (stderr, "corrupt: %3d %c %c %-15s %3d\n", i, bottom, top, memlist[i].file, memlist[i].line); 217 abort (); 218 218 } 219 219 return;
Note:
See TracChangeset
for help on using the changeset viewer.
