Skip to content

Commit

Permalink
Merge pull request #352 from olebole/noirlab-unused
Browse files Browse the repository at this point in the history
NOIRLAB: Remove or comment out unused variables
  • Loading branch information
olebole authored Jan 28, 2024
2 parents 95d3652 + 5a4a7b6 commit 76925f7
Show file tree
Hide file tree
Showing 27 changed files with 23 additions and 66 deletions.
4 changes: 1 addition & 3 deletions noao/artdata/mktemplates.x
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,9 @@ pointer procedure mkt_object (name)
char name[ARB] # Profile name or file

int i, j, n, nxm, nym, fd
real radius, r, dr, s, b, flux, der[2]
real radius, r, dr, s, flux, der[2]
pointer sym, mkt, prof, asi, msi, buf, im

real c3, c4, c5, c6, c7

real asieval()
double uigamma()
int open(), fscan(), nscan(), strncmp(), ctor()
Expand Down
2 changes: 1 addition & 1 deletion noao/onedspec/t_specplot.x
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ int i, j, k, l, m, trans
pointer sp, im, mw, sh, stack, aps, bands, str, ptr

int ctor(), open(), fscan(), nowhite(), clgwrd()
bool rng_elementi(), fp_equalr()
bool rng_elementi()
real clgetr(), asumr(), imgetr(), sp_logerr()
pointer immap(), smw_openim(), rng_open()

Expand Down
4 changes: 1 addition & 3 deletions pkg/images/imcoords/src/t_ccmap.x
Original file line number Diff line number Diff line change
Expand Up @@ -1136,9 +1136,7 @@ double lng1, lat1, lng2, lat2, x, y, z, sumx, sumy, sumz, r, pa, wterm[8]
pointer sp, inbuf, linebuf, field_pos
pointer mw, ct, coo
int getline(), li_get_numd(), sk_decim()
pointer mw_ctrand(), mw_sctran()

int sk_stati()
pointer mw_sctran()

begin
call smark (sp)
Expand Down
2 changes: 1 addition & 1 deletion pkg/images/imutil/src/imdelete.x
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int list, nchars
pointer sp, tty, imname, im

pointer ttyodes(), immap()
int imtopenp(), imtgetim(), imaccess(), strlen(), strncmp()
int imtopenp(), imtgetim(), imaccess(), strlen()
bool clgetb()

begin
Expand Down
2 changes: 1 addition & 1 deletion pkg/images/tv/display/zdisplay.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Display devices defined by OS

define IIS "/dev/iis" # IIS display device
#define IIS "/dev/iis" # IIS display device
define IIS_CHAN 1 # Device channel identifier
define DEVCODE 100 # Channel = DEVCODE * DEVCHAN
define FRTOCHAN (IIS_CHAN*DEVCODE+($1))
2 changes: 1 addition & 1 deletion pkg/system/t_fcache.x
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ procedure t_fcache ()

char cmd[SZ_FNAME], cache[SZ_FNAME], fname[SZ_FNAME]
char pattern[SZ_FNAME], src[SZ_FNAME], cname[SZ_FNAME], extn[SZ_FNAME]
bool verbose, in_src, exists
bool verbose, exists
int age

int strdic(), clgeti(), envgeti()
Expand Down
2 changes: 1 addition & 1 deletion pkg/xtools/mef/mefappfile.x
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ procedure mef_wrblank (out, olines)
int out #I output file descriptor
int olines #I number of blank lines

int nlines, i, nbk
int nlines, i
char card[80]

begin
Expand Down
2 changes: 0 additions & 2 deletions sys/etc/miiread.gx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ int pksize, nchars, nelem
int miipksize(), miinelem(), read()
errchk read()

long note()

begin
pksize = miipksize (maxelem, MII_PIXEL)
nelem = EOF
Expand Down
2 changes: 0 additions & 2 deletions sys/etc/nmiread.gx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ int pksize, nchars, nelem
int nmipksize(), nminelem(), read()
errchk read()

long note()

begin
pksize = nmipksize (maxelem, NMI_PIXEL)
nelem = EOF
Expand Down
3 changes: 0 additions & 3 deletions sys/etc/nmireadb.x
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ int fd #I input file
bool spp[ARB] #O receives data
int maxelem # max number of data elements to be read

pointer sp, bp
int pksize, nchars, nelem
int nminelem(), read()
errchk read()

long note()

begin
pksize = nminelem (maxelem, NMI_INT)
nelem = EOF
Expand Down
2 changes: 0 additions & 2 deletions sys/etc/nmireadc.x
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ int pksize, nchars
int nmipksize(), nminelem(), read()
errchk read()

long note()

begin
pksize = nmipksize (maxchars, NMI_BYTE)
nchars = max (maxchars, pksize)
Expand Down
2 changes: 1 addition & 1 deletion sys/fio/fmkcopy.x
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ procedure fmkcopy (oldfile, newfile)
char oldfile[ARB] # file to be copied
char newfile[ARB] # newfile

char url[SZ_PATHNAME], old[SZ_PATHNAME]
char old[SZ_PATHNAME]
int status, file_exists, junk
pointer vp, sp, oldosfn, newosfn
int vfnadd(), strncmp(), nowhite()
Expand Down
1 change: 0 additions & 1 deletion sys/fio/frmdir.x
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ char dir[ARB] # virtual or OS-dependent directory spec

int status
pointer sp, osfn, dirname
int access()
errchk syserrs

begin
Expand Down
3 changes: 1 addition & 2 deletions sys/imio/db/imrenf.x
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ pointer im # image descriptor
char oldkey[ARB] # old keyword
char newkey[ARB] # new keyword

int off
pointer rp, sp, keyname
int idb_kwlookup(), idb_findrecord(), stridxs()
int idb_kwlookup(), idb_findrecord()
errchk syserrs

begin
Expand Down
5 changes: 2 additions & 3 deletions sys/imio/dbc/imgcom.x
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ pointer im #I image descriptor
char key[ARB] #I parameter to be set
char comment[ARB] #O comment string

bool string_valued
int ch, i, n, j, ic, op
int i, op
pointer rp, ip, sp, buf
int idb_findrecord(), ctowrd(), stridx(), idb_getstring()
int idb_findrecord(), ctowrd()
errchk syserrs

define end_ 91
Expand Down
2 changes: 1 addition & 1 deletion sys/imio/dbc/iminfi.x
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ char datatype[ARB] #I string permits generalization to domains
int baf # I Insert BEFORE or AFTER

pointer rp, sp, keyname, ua, ip
int fd, max_lenuserarea, curlen, buflen, nchars, piv
int max_lenuserarea, curlen, buflen, nchars, piv
int idb_kwlookup(), idb_findrecord()
int strlen(), idb_filstr(), nowhite()
char card[IDB_RECLEN+1]
Expand Down
10 changes: 4 additions & 6 deletions sys/imio/iki/fxf/zfiofxf.x
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int status #O output status - i/o channel if successful

pointer im, fit
int ip, indx, channel, strldx(), ctoi()
bool lscale, lzero, bfloat, fxf_fpl_equald()
bool lscale, lzero, fxf_fpl_equald()#, bfloat
char fname[SZ_PATHNAME]

begin
Expand Down Expand Up @@ -110,8 +110,6 @@ pointer fit, im
int ip, pixtype, nb
int status, totpix, npix
int datasizeb, pixoffb, nb_skipped, i
double dtemp
real rtemp, rscale, roffset
include <szpixtype.inc>
Expand Down Expand Up @@ -182,9 +180,9 @@ end
procedure fxf_zaltrr (data, npix, bscale, bzero)
real data[ARB], rt
int npix
double bscale, bzero
real data[ARB]
int npix
double bscale, bzero
int i
Expand Down
2 changes: 0 additions & 2 deletions sys/imio/imgobf.x
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ int sizeof()

errchk imopsf, malloc, realloc, calloc

include <szpixtype.inc>

begin
# If first write, and if new image, create pixel storage file,
# otherwise open pixel storage file. Allocate and initialize
Expand Down
2 changes: 0 additions & 2 deletions sys/imio/imrdpx.x
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ pointer pl
long offset
int sz_pixel, nbytes, fd, op, step, nchars, n

char zbuf[1024]

int read()
long imnote()
errchk imerr, seek, read, pl_glpi, pl_glri
Expand Down
9 changes: 0 additions & 9 deletions sys/imio/imt/imt.x
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,5 @@ begin
}
}
outstr[op] = EOS

# FIXME
if (envgetb ("vo_prefetch") && strncmp (outstr, "cache", 5) == 0) {
# call sprintf (cfname, SZ_LINE, "%s.fits")
call sprintf (cfname, SZ_LINE, "%s")
call pargstr (outstr)
call fcwait ("cache$", cfname)
}

return (op - 1)
end
4 changes: 1 addition & 3 deletions sys/imio/imt/imx.x
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pointer procedure imxopen (template)
char template[ARB] # image template

int i, sort, level, ip, ch, expand, nchars, nimages, index, type
int max_fnt, fnt_len, len, flen
int max_fnt, fnt_len, len
pointer listp, intmp, fnt, op, exp
char lfile[SZ_LINE], lexpr[SZ_LINE], likparams[SZ_LINE], lsec[SZ_LINE]
char lindex[SZ_LINE], lextname[SZ_LINE], lextver[SZ_LINE], elem[SZ_LINE]
Expand All @@ -26,8 +26,6 @@ pointer imx_preproc (), imx_imexpand (), imx_fexpand ()
pointer imx_texpand (), imx_dexpand ()
int imx_filetype (), imx_parse (), imx_get_element ()
int fntopnb (), strlen (), strsearch()
int sum, fntlenb()
bool envgetb()

define output {Memc[op]=$1;op=op+1}
define escape {output('\\');output($1)}
Expand Down
2 changes: 1 addition & 1 deletion sys/imio/imt/imxbreakout.x
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int nchars, ip, op
bool is_sif
bool imx_issection(), imx_sifmatch()
int stridx()
#int stridx()
define next_str_ 99
Expand Down
4 changes: 2 additions & 2 deletions sys/imio/imt/imxexpand.x
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ char ikparams[ARB] # IKI parameters
char sec[ARB] # Image section
int nimages # Number of output images

pointer sp, exp, nodename, imname, listout
pointer sp, nodename, imname, listout
int dir, len, llen, nim, ip, delim, vfd, status, maxlen
char dirname[SZ_PATHNAME], ofname[SZ_PATHNAME], pdir[SZ_PATHNAME]
char fpath[SZ_PATHNAME], fname[SZ_PATHNAME]
Expand Down Expand Up @@ -495,7 +495,7 @@ char buf[SZ_LINE], cfname[SZ_PATHNAME]

int open(), getline(), strlen()
int imx_decode_ranges()
bool imx_in_range(), envgetb()
bool imx_in_range()

begin
call aclrc (buf, SZ_LINE)
Expand Down
8 changes: 0 additions & 8 deletions sys/imio/imt/imxparse.x
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ char sec[ARB] #o image section string
char ikparams[ARB] #o image kernel section params
int maxch #i max chars in string params

pointer im
int nchars, ip, idx
char comma, lexpr[SZ_LINE], subex[SZ_LINE], name[SZ_PATHNAME]

int imx_breakout(), imx_next_expr(), imx_expr_type(), stridx()
pointer immap()

begin
call aclrc (expr, maxch) # initialize
Expand Down Expand Up @@ -109,12 +107,6 @@ begin
call strcat ("]", name, SZ_PATHNAME)
}

# iferr {
# im = immap (name, READ_ONLY, 0)
# call imunmap (im)
# } then
# ;

return (nchars)
end

Expand Down
2 changes: 0 additions & 2 deletions sys/imio/imupk.gx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ procedure imupk$t (a, b, npix, dtype)
PIXEL b[npix]
int a[npix], npix, dtype

pointer bp

begin
switch (dtype) {
case TY_USHORT:
Expand Down
2 changes: 1 addition & 1 deletion sys/mwcs/wftpv.x
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int i, ualen, index, ip
double dec, dval
pointer ct, mw, wp, wv, im, idb, rp

int idb_nextcard(), itoc(), ctod()
int idb_nextcard(), ctod()
pointer idb_open()
errchk wf_decaxis()

Expand Down
4 changes: 2 additions & 2 deletions sys/mwcs/wfzpn.x
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ double dec, zd1, d1, zd2, d2, zd, d, r, tol, dval
pointer sp, atname, atvalue, ct, mw, wp, wv, im, idb, rp
char compare[4]
bool match
int ctod(), strlen(), idb_nextcard(), itoc()
pointer wf_gsopen(), idb_open()
int ctod(), idb_nextcard(), itoc()
pointer idb_open()
data tol/1.0d-13/
errchk wf_decaxis(), mw_gwattrs()

Expand Down

0 comments on commit 76925f7

Please sign in to comment.