
---- info on locks ----

addrefs/src/addrefs.c:  fd = setlockfile2 (ImageCat, 3600.0, LCK_HARD, &dbstate);
addspphot/src/addspphot.c:  fd = setlockfile2 (ImageCat, 3600.0, LCK_HARD, &dbstate);
addstar/src/addstar.c:  fd = setlockfile2 (ImageCat, 3600.0, LCK_HARD, &dbstate);
elixir/src/DumpStatus.c:    fd = setlockfile2 (filename, 0.1, LCK_XCLD, &state);
elixir/src/LoadPending.c:    fd = setlockfile2 (filename, 1.0, LCK_XCLD, &lockstate);
elixir/src/MachineOps.c:    fd = setlockfile2 (filename, 0.1, LCK_XCLD, &state);
elixir/src/MsgOps.c:  fd = setlockfile2 (fifo, 0.1, LCK_XCLD, &state);
elixir/src/MsgOps.c:  fd = setlockfile2 (fifo, 0.1, LCK_XCLD, &state);
imregister/old/imregister1.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister/old/imsort1.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister/old/imstatreg1.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister/old/photreg1.c:  fd = setlockfile2 (dBFile, 120.0, LCK_HARD, &dbstate);
imregister/old/photsearch1.c:  fd = setlockfile2 (dBFile, 300.0, lockstate, &dbstate);
imregister/old/transearch1.c:  fd = setlockfile2 (dBFile, 300.0, lockstate, &dbstate);
imregister/old/transreg1.c:  fd = setlockfile2 (dBFile, 120.0, LCK_HARD, &dbstate);
imregister/old/imregister1b.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister/old/imsearch.c:  fd = setlockfile2 (DataBase, 300.0, lockstate, &dbstate);
imregister/old/imsort.c:  fd = setlockfile2 (DataBase, 600.0, LCK_HARD, &dbstate);
imregister/old/imstatreg.c:  fd = setlockfile2 (DataBase, 600.0, LCK_HARD, &dbstate);
imregister/base/WriteFIFO.c:  fd = setlockfile2 (filename, 20.0, LCK_XCLD, &state);
imregister/detrend/detregister2.c:    fd = setlockfile2 (fullname, 2.0, LCK_XCLD, &filestate);
imregister-1.0/src/old/imdbset.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister-1.0/src/old/detsearch1.c:  fd = setlockfile2 (dBFile, 300.0, lockstate, &dbstate);
imregister-1.0/src/WriteFIFO.c:  fd = setlockfile2 (filename, 20.0, LCK_XCLD, &state);
imregister-1.0/src/photsearch1.c:  fd = setlockfile2 (dBFile, 300.0, lockstate, &dbstate);
imregister-1.0/src/detsearch1.c:  fd = setlockfile2 (dBFile, 300.0, lockstate, &dbstate);
imregister-1.0/src/imstatreg1.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister-1.0/src/imregister1.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister-1.0/src/photreg1.c:  fd = setlockfile2 (dBFile, 120.0, LCK_HARD, &dbstate);
imregister-1.0/src/detregister1.c:  fd = setlockfile2 (dBFile, 600.0, LCK_HARD, &dbstate);
imregister-1.0/src/transearch1.c:  fd = setlockfile2 (dBFile, 300.0, lockstate, &dbstate);
imregister-1.0/src/transreg1.c:  fd = setlockfile2 (dBFile, 120.0, LCK_HARD, &dbstate);
imregister-1.0/src/detregister.c:    fd = setlockfile2 (fullname, 2.0, LCK_XCLD, &filestate);
imregister-1.0/src/imsort1.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister-1.0/src/imregister.c:  fd = setlockfile2 (DataBase, 120.0, LCK_HARD, &dbstate);
imregister-1.0/src/imsearch.c:  fd = setlockfile2 (DataBase, 300.0, lockstate, &dbstate);
imregister-1.0/src/imsort.c:  fd = setlockfile2 (DataBase, 600.0, LCK_HARD, &dbstate);
imregister-1.0/src/detregister2.c:    fd = setlockfile2 (fullname, 2.0, LCK_XCLD, &filestate);
imregister-1.0/src/imstatreg.c:  fd = setlockfile2 (DataBase, 600.0, LCK_HARD, &dbstate);
imregister-1.0/src/mknames.c:  fd = setlockfile2 (argv[1], 60.0, LCK_XCLD, &dbstate);
libohana/src/glockfile.c:   setlockfile2 returns a file descriptor to an open READ/WRITE access file,
libohana/src/glockfile.c:  fd = setlockfile2 (filename, timeout, type, state);
libohana/src/glockfile.c:  /* setlockfile2 returns a pointer to a vile open for update */
libohana/src/glockfile.c:int setlockfile2 (char *filename, double timeout, int type, int *state) {
libohana/src/phot_catalog.c:  fd = setlockfile2 (catalog[0].filename, 3600.0, lockmode, &dbstate);
misc/src/dbtest.c:int setlockfile2 (char *filename, double timeout, int hard, int *state);
misc/src/dbtest.c:  if ((fd = setlockfile2 (dbfile, 60.0, LCK_HARD, &dbstate)) == -1) {
misc/src/glockfile2.c:int setlockfile2 (char *filename, double timeout, int type, int *state) {
status/user/elixir.c:  fd = setlockfile2 (fifo, 2.0, LCK_XCLD, &state);
status/user/elixir.c:  fd = setlockfile2 (fifo, 2.0, LCK_XCLD, &state);

---- info on -time -trange ----


convert to a single usage: -trange (start) (stop||range), -time (time)
allow multiple entries

-time vs -trange:

./imregister/src/photsearch.c:   if (N = get_argument (argc, argv, "-trange")) {
./imregister/src/transreg.c:     if (N = get_argument (argc, argv, "-trange")) {
./imregister/src/imsearch.c:     if (N = get_argument (argc, argv, "-trange")) {
./imregister/src/photsearch2.c:  if (N = get_argument (argc, argv, "-trange")) {
./status/user/detrend.c:         if (N = get_argument (argc, argv, "-trange")) {
./status/user/images.c:          if (N = get_argument (argc, argv, "-trange")) {
./status/user/imrough.c:         if (N = get_argument (argc, argv, "-trange")) {

elixir2: grep -- -time `find . -name "*.c"`
./addrefs/src/args.c:  if ((i = get_argument (argc, argv, "-time"))) {
./imregister/src/old/detsearch.new.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/old/imsearchrough.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/old/detregister.old2.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/old/detregister.old.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/old/detsearch1.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/detsearch.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/detregister.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/photsearch.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/transearch.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/imsearch.c:  if (N = get_argument (argc, argv, "-time")) {
./imregister/src/photsearch2.c:  if (N = get_argument (argc, argv, "-time")) {
./scatfit/src/initialize.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/gimages.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/detrend.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/dmags.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/elixir.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/ddmags.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/resid.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/photresid.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/images.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/imdata.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/imextract.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/imlist.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/imrough.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/imsearch.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/photcodes.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/zeropts.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/ddmagsextract.c:  if (N = get_argument (argc, argv, "-time")) {
./status/user/ddmagextract.c:  if (N = get_argument (argc, argv, "-time")) {


haka1: grep -- -trange *
dt.select:    $line = "-type flat -filter $name -mode $mode -trange $start $stop";
fr.select:    $line = "-type object -mode $mode -trange $start $stop -filter $name";
imselect:     $line = "-type flat -filter $name -mode $mode -trange $ARGV[3] $ARGV[4]";
mktrans:      @list = `photsearch -trange $start $stop -photcode $code`;

haka1: grep -- -time *
normalize:    if ($ARGV[0] eq "-time") {

haka1: grep -- -trange *
mk.ptlist:  imsearch $config $type -trange $start $stop | awk '{n=substr($6,0,7)}{printf "%s/%s %s/%s%s %s %s\n", $5, $6, n, n, $4, $4, $3}'
phot.by.night: transreg $code $zp $dzp $date 1d -trange

haka1: grep -- -time *
fr.smooth:set mask=`detsearch -ccd $ccd -type mask -time $start -select -quiet`
phot.by.night:set answer=`photsearch -time $date 1d -photcode $code | awk '{f+=$3}{f2+=$3*$3}END{print f/NR, sqrt (f2/NR - f*f/NR/NR)}'`
