[SCM] Minimal buy-in FITS library and utility package branch, debian, updated. c4d06adaa94659722cf9fc4c97b2683f63b88997
Ole Streicher
debian at liska.ath.cx
Thu Apr 5 08:35:31 UTC 2012
The following commit has been merged in the debian branch:
commit d8e04097de258990307e67e060c61c286c3b9308
Author: Ole Streicher <debian at liska.ath.cx>
Date: Fri Mar 2 10:18:08 2012 +0100
Add fixes that come from the DS9 source package
diff --git a/debian/patches/ds9_fixes.diff b/debian/patches/ds9_fixes.diff
new file mode 100644
index 0000000..57b31de
--- /dev/null
+++ b/debian/patches/ds9_fixes.diff
@@ -0,0 +1,185 @@
+Origin: http://hea-www.harvard.edu/saord/download/ds9/source/ds9.6.2.tar.gz
+Description: Fixes that were applied to the package included in the saods9 source.
+ These patches are not specific for DS9, however.
+--- funtools-1.4.4/filter/filter.c 2012-03-02 09:35:45.000000000 +0100
++++ funtools-1.4.4_ds9//filter/filter.c 2012-03-02 09:35:47.000000000 +0100
+@@ -326,6 +326,8 @@
+ }
+
+ /* determine which type of process execution we do */
++ switch(filter->method){
++ case METHOD_C:
+ filter->ptype = DEFAULT_FILTER_PTYPE;
+ *tbuf = '\0';
+ if( (s=(char *)getenv("FILTER_PTYPE")) ){
+@@ -345,6 +347,11 @@
+ filter->ptype = PTYPE_DYNAMIC;
+ #endif
+ }
++ break;
++ default:
++ filter->ptype = PTYPE_PROCESS;
++ break;
++ }
+
+ /* determine region paint mode */
+ *tbuf = '\0';
+@@ -470,7 +477,10 @@
+ if( !FilterProgCompile(filter) )
+ goto error;
+
+- if( filter->debug < 2 ){
++ if( filter->debug >= 2 ) goto done;
++
++ switch(filter->method){
++ case METHOD_C:
+ switch(filter->ptype){
+ case PTYPE_PROCESS:
+ case PTYPE_CONTAINED:
+@@ -501,6 +511,9 @@
+ default:
+ goto error;
+ }
++ break;
++ default:
++ goto error;
+ }
+
+ /* return the good news */
+--- funtools-1.4.4/filter/filt.l 2012-03-02 09:35:45.000000000 +0100
++++ funtools-1.4.4_ds9//filter/filt.l 2012-03-02 09:35:47.000000000 +0100
+@@ -871,6 +871,26 @@
+ *
+ */
+
++
++#ifdef YY_USE_PROTOS
++static void floatprefix(void)
++#else
++static void floatprefix()
++#endif
++{
++ if( filt->method == METHOD_C )
++ _FiltLexCat("(double)");
++}
++
++#ifdef YY_USE_PROTOS
++static void floatsuffix(void)
++#else
++static void floatsuffix()
++#endif
++{
++ return;
++}
++
+ #ifdef YY_USE_PROTOS
+ static void
+ bin2num(char *d, char *s, int maxlen)
+@@ -1414,7 +1434,14 @@
+ FilterSymbolDefaults(filt, 0);
+ /* initialize wcs for default image case */
+ _FiltLexWcsCols(filt->fhd, filt->xbin, filt->ybin);
+- _FiltLexCat(",(double)x,(double)y");
++ _FiltLexCat(",");
++ floatprefix();
++ _FiltLexCat("x");
++ floatsuffix();
++ _FiltLexCat(",");
++ floatprefix();
++ _FiltLexCat("y");
++ floatsuffix();
+ break;
+ case 1:
+ if( !initbindefs ){
+@@ -1427,16 +1454,24 @@
+ if( !filt->xbin || !filt->ybin ){
+ _filterror("two binning columns are required for regions");
+ }
+- _FiltLexCat(",(double)");
++ _FiltLexCat(",");
++ floatprefix();
+ _FiltLexCat(filt->xbin);
+- _FiltLexCat(",(double)");
++ floatsuffix();
++ _FiltLexCat(",");
++ floatprefix();
+ _FiltLexCat(filt->ybin);
++ floatsuffix();
+ break;
+ case 2:
+- _FiltLexCat(",(double)");
++ _FiltLexCat(",");
++ floatprefix();
+ _FiltLexCat(colnames[0]);
+- _FiltLexCat(",(double)");
++ floatsuffix();
++ _FiltLexCat(",");
++ floatprefix();
+ _FiltLexCat(colnames[1]);
++ floatsuffix();
+ break;
+ }
+ if( s ) xfree(s);
+--- funtools-1.4.4/filter/filtprog_c.c 2012-03-02 09:35:45.000000000 +0100
++++ funtools-1.4.4_ds9//filter/filtprog_c.c 2012-03-02 09:35:47.000000000 +0100
+@@ -198,7 +198,8 @@
+ ccstr = "gcc";
+ }
+ /* make sure we have a compiler */
+- if( !(filter->cc = Find(ccstr, "x", NULL, FilterPath())) &&
++ if( !(filter->cc = Access(ccstr, "x")) &&
++ !(filter->cc = Find(ccstr, "x", NULL, FilterPath())) &&
+ !(filter->cc = Find("gcc", "x", NULL, FilterPath())) &&
+ !(filter->cc = Find("cc", "x", NULL, FilterPath())) &&
+ !(filter->cc = Find("cc", "x", NULL, ".")) &&
+--- funtools-1.4.4/filter/symbols.c 2012-03-02 09:35:45.000000000 +0100
++++ funtools-1.4.4_ds9//filter/symbols.c 2012-03-02 09:35:47.000000000 +0100
+@@ -217,6 +217,7 @@
+ #else
+ int FilterSymbolDefaults(filter, enter)
+ Filter filter;
++ int enter;
+ #endif
+ {
+ int ip=0;
+--- funtools-1.4.4/funcone.c 2012-03-02 09:35:45.000000000 +0100
++++ funtools-1.4.4_ds9//funcone.c 2012-03-02 09:35:48.000000000 +0100
+@@ -1036,6 +1036,9 @@
+ strncpy(decstr, argv[optind+ioff++], SZ_LINE-1);
+ strncpy(radstr, argv[optind+ioff++], SZ_LINE-1);
+
++ /* dolimfilt does not work with doall */
++ if( doall ) dolimfilt = 0;
++
+ /* process list arguments */
+ if( dolist ){
+ if( !(list=OpenList(lname, rastr, decstr, radstr)) ){
+@@ -1085,6 +1088,8 @@
+ if( !(adbuf=xcalloc(nrow+1, sizeof(char))) ){
+ gerror(stderr, "can't allocate all (-J|-X) buffer of size %d\n", nrow);
+ }
++ /* must read one event at a time, or else we can't tell the event num */
++ maxrow = 1;
+ }
+
+ /* activate columns specified by user, if necessary */
+@@ -1371,7 +1376,7 @@
+ while( (ebuf = (Ev)FunTableRowGet(fun, NULL, maxrow, NULL, &got)) ){
+ /* if we have a filter, then we don't know the row number til after
+ we read the event, i.e. now */
+- if( doall & ALL_FILT ) FunInfoGet(fun, FUN_ROW, &irow, 0);
++ FunInfoGet(fun, FUN_ROW, &irow, 0);
+ /* process all rows */
+ for(i=0; i<got; i++){
+ /* skip rows that already were written out */
+--- funtools-1.4.4/funtab.c 2012-03-02 09:35:45.000000000 +0100
++++ funtools-1.4.4_ds9//funtab.c 2012-03-02 09:35:48.000000000 +0100
+@@ -1386,7 +1386,7 @@
+ off_t
+ FunTableRowSeek(Fun fun, int nrow, char *plist)
+ #else
+-off_t FunTableRowPut(fun, nrow, plist)
++off_t FunTableRowSeek(fun, nrow, plist)
+ Fun fun;
+ int nrow;
+ char *plist;
diff --git a/debian/patches/series b/debian/patches/series
index e710981..9ab10aa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ link_to_so.patch
use_shared_libwcstools.patch
build_tclfun.patch
build_bsd+hurd.patch
+ds9_fixes.diff
--
Minimal buy-in FITS library and utility package
More information about the debian-science-commits
mailing list