Changeset 29537
- Timestamp:
- Oct 25, 2010, 12:36:40 PM (16 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 10 edited
- 1 copied
-
libautocode/Makefile.Targets (modified) (2 diffs)
-
libautocode/def/autocode.c (modified) (3 diffs)
-
libautocode/def/cmf-ps1-v3.d (copied) (copied from branches/eam_branches/ipp-20100823/Ohana/src/libautocode/def/cmf-ps1-v3.d )
-
libdvo/src/cmf-ps1-v1-alt.c (modified) (1 diff)
-
libfits/header/F_H_field.c (modified) (1 diff)
-
libfits/include/gfitsio.h (modified) (1 diff)
-
libkapa/include/kapa.h (modified) (1 diff)
-
libkapa/src/RotFont.c (modified) (5 diffs)
-
libkapa/src/bDrawFuncs.c (modified) (1 diff)
-
libohana/include/ohana.h (modified) (2 diffs)
-
libohana/src/Fread.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libautocode/Makefile.Targets
r27579 r29537 59 59 $(ASRC)/cmf-ps1-v1.$(ARCH).o \ 60 60 $(ASRC)/cmf-ps1-v2.$(ARCH).o \ 61 $(ASRC)/cmf-ps1-v3.$(ARCH).o \ 61 62 $(ASRC)/cmf-smpdata.$(ARCH).o \ 62 63 $(ASRC)/getstar-ps1-dev-0.$(ARCH).o \ … … 129 130 $(AINC)/cmf-ps1-v1.h \ 130 131 $(AINC)/cmf-ps1-v2.h \ 132 $(AINC)/cmf-ps1-v3.h \ 131 133 $(AINC)/cmf-smpdata.h \ 132 134 $(AINC)/getstar-ps1-dev-0.h \ -
trunk/Ohana/src/libautocode/def/autocode.c
r29001 r29537 25 25 } 26 26 27 $STRUCT *gfits_downsize_and_convert_$STRUCT ($STRUCT *data, off_t size, off_t nitems) {28 29 off_t i;30 unsigned char *byte, tmp;31 $STRUCT *output;32 33 if ($SIZE > size) {34 fprintf (stderr, "ERROR: uncorrectable mismatch in data types $STRUCT: "OFF_T_FMT" vs %d\n", size, $SIZE);35 exit (1);36 }37 38 // allocate a new array39 ALLOCATE (output, $STRUCT, nitems);40 for (i = 0; i < nitems; i++) {41 memcpy (&output[i], &data[i], $SIZE);42 }43 44 /* provide initial values to avoid compiler warnings for non-BYTE_SWAP arch */45 i = tmp = 0;46 byte = NULL;47 48 # ifdef BYTE_SWAP49 byte = (unsigned char *) output;50 for (i = 0; i < nitems; i++, byte += size) {51 /** BYTE SWAP **/52 }53 # endif54 55 return (output);56 }57 58 27 /*** add test of EXTNAME and header-defined columns? ***/ 59 28 /* return internal structure representation */ … … 61 30 62 31 int Ncols; 63 $STRUCT *data , *output;32 $STRUCT *data; 64 33 65 34 Ncols = ftable[0].header[0].Naxis[0]; … … 73 42 if ((swapped == NULL) || (*swapped == FALSE)) { 74 43 if (!gfits_convert_$STRUCT (data, sizeof ($STRUCT), *Ndata)) { 75 output = gfits_downsize_and_convert_$STRUCT (data, sizeof ($STRUCT), *Ndata); 76 free (ftable[0].buffer); 77 ftable[0].buffer = (char *) output; 78 // XXX do I need to change NX? 44 return NULL; 79 45 } 80 46 gfits_table_scale_data (ftable); -
trunk/Ohana/src/libdvo/src/cmf-ps1-v1-alt.c
r29001 r29537 1 1 # include "dvo.h" 2 3 /* if we are not correctly including the ohana headers, this will fail */ 4 # ifndef BYTE_SWAP 5 # ifndef NOT_BYTE_SWAP 6 # error "neither BYTE_SWAP not NOT_BYTE_SWAP is set" 7 # endif 8 # endif 2 9 3 10 CMF_PS1_V2 *gfits_table_get_CMF_PS1_V1_Alt (FTable *ftable, off_t *Ndata, char *swapped) { -
trunk/Ohana/src/libfits/header/F_H_field.c
r27435 r29537 11 11 12 12 if (header[0].buffer == NULL) return NULL; 13 14 // regular keywords cannot be larger than 8 chars (use HIERARCH instead) 15 if (strlen(field) > 8) return NULL; 13 16 14 17 /* create a blank-padded keyword with exactly 8 characters */ -
trunk/Ohana/src/libfits/include/gfitsio.h
r28241 r29537 13 13 # endif 14 14 15 /* if we are not correctly including the ohana headers, this will fail */ 15 16 # ifndef NEWLINE 16 17 # define NEWLINE 10 /* UNIX RETURN character */ -
trunk/Ohana/src/libkapa/include/kapa.h
r27790 r29537 12 12 # include <png.h> 13 13 # include <dvo.h> 14 15 /* if we are not correctly including the ohana headers, this will fail */ 16 # ifndef BYTE_SWAP 17 # ifndef NOT_BYTE_SWAP 18 # error "neither BYTE_SWAP not NOT_BYTE_SWAP is set" 19 # endif 20 # endif 14 21 15 22 typedef struct sockaddr_in KapaSockAddress; -
trunk/Ohana/src/libkapa/src/RotFont.c
r5854 r29537 10 10 static RotFont *currentfont; 11 11 12 static int RotFontInited = FALSE; 13 12 14 void InitRotFonts () { 13 15 14 16 int i, Nhardwired; 17 18 if (RotFontInited) return; 19 RotFontInited = TRUE; 15 20 16 21 Nhardwired = sizeof (HardwiredFonts) / sizeof (FontSet); … … 32 37 33 38 int i, nsize, msize, bsize, bigger, dsize, match, good; 39 40 InitRotFonts(); 34 41 35 42 bigger = good = match = -1; … … 69 76 char *GetRotFont (int *size) { 70 77 78 InitRotFonts(); 79 71 80 *size = currentsize; 72 81 return (currentname); … … 75 84 76 85 RotFont *GetRotFontData (double *scale) { 86 87 InitRotFonts(); 88 77 89 *scale = currentscale; 78 90 return (currentfont); … … 84 96 double scale; 85 97 98 InitRotFonts(); 99 86 100 scale = currentscale; 87 101 -
trunk/Ohana/src/libkapa/src/bDrawFuncs.c
r5999 r29537 1 1 # include <kapa_internal.h> 2 3 // XXX we can get rid of these static vars by making them elements of the bDrawBuffer 4 // 5 2 6 3 7 static int bWeight; -
trunk/Ohana/src/libohana/include/ohana.h
r28645 r29537 94 94 }; 95 95 96 /* note: in the Ohana tree, the byte order is determined by the ARCH variable 97 if you have a small endian machine that is not listed here, the test 98 program 'typestest' should fail */ 96 /* Some notes on the Ohana BYTE_SWAP macros: 97 98 1) BYTE_SWAP is set in this file based on the environment variable 'ARCH', which is in turn 99 set by the psconfig system (or is set manually by the builder). 100 101 2) BYTE_SWAP is only used when building the Ohana tree: code which links against Ohana 102 (eg, libkapa or others) does not need to have this value correctly set. 103 104 3) the libohana build tests for the validity of the BYTE_SWAP choice by running the test 105 program 'typestest' and raising an error if the tests fail. 106 107 4) if your build fails due to the typestest program, check your value of 'ARCH' and if 108 necessary add it to the list below. 109 110 */ 111 99 112 # ifndef BYTE_SWAP 100 113 # ifdef linux … … 117 130 # define BYTE_SWAP 118 131 # endif 119 # else 132 # endif /* BYTE_SWAP */ 133 134 /* other Ohana components use these two values to check that ohana.h was correctly included */ 135 # ifndef BYTE_SWAP 120 136 # define NOT_BYTE_SWAP 121 # endif /* BYTE_SWAP */137 # endif 122 138 123 139 # ifndef NAN -
trunk/Ohana/src/libohana/src/Fread.c
r27435 r29537 14 14 tmp = byte[X+2]; byte[X+2] = byte[X+5]; byte[X+5] = tmp; \ 15 15 tmp = byte[X+3]; byte[X+3] = byte[X+4]; byte[X+4] = tmp; 16 17 /** this is also used in libautocode/def/common.h -- consolidate **/18 # ifdef linux19 # define BYTE_SWAP20 # endif21 22 # ifdef sid23 # define BYTE_SWAP24 # endif25 26 # ifdef dec27 # define BYTE_SWAP28 # endif29 16 30 17 /* add other architectures here, ie dec, alpha, etc */
Note:
See TracChangeset
for help on using the changeset viewer.
