Compare commits
No commits in common. "c48a3f39642c3aa17764e2030209ca2f0fb71bb7" and "dfb25a03d8322032c483c6582ec8874ae88bb4ed" have entirely different histories.
c48a3f3964
...
dfb25a03d8
6 changed files with 274 additions and 229 deletions
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
# This makefile generates the following staden programs which
|
# This makefile generates the following staden programs which
|
||||||
# run under xterm (normal, `N') and those which run directly under X.
|
# run under xterm (normal, `N') and those which run directly under X.
|
||||||
NPROGS= mep nip bap sap sip splitp1 splitp2 splitp3 sethelp
|
NPROGS= mep nip pip bap sap sip splitp1 splitp2 splitp3 sethelp convert_project
|
||||||
LPROGS= nipl
|
LPROGS= nipl pip sipl
|
||||||
XPROGS= xmep xnip xbap xsap xsip
|
XPROGS= xmep xnip xpip xbap xsap xsip
|
||||||
PROGS= $(NPROGS) $(LPROGS) $(XPROGS)
|
PROGS= $(NPROGS) $(LPROGS) $(XPROGS)
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ INCLUDES= -I$(SRC) -I$(STADENSRC) -I$(TEDSRC) -I$(OSPSRC) -I$(MISCSRC)
|
||||||
CC= cc
|
CC= cc
|
||||||
CFLAGS= -g $(INCLUDES)
|
CFLAGS= -g $(INCLUDES)
|
||||||
F77= gfortran
|
F77= gfortran
|
||||||
FFLAGS= -g -fdec -std=legacy -C
|
FFLAGS= -g -C
|
||||||
|
|
||||||
#FLIBS= -lfor -lUfor -lots -lFutil
|
#FLIBS= -lfor -lUfor -lots -lFutil
|
||||||
FLIBS = -lm -lutil
|
FLIBS = -lm -lutil
|
||||||
|
@ -53,7 +53,7 @@ XLFLAGS= $(XLIBS) $(FLIBS)
|
||||||
|
|
||||||
LD = gfortran
|
LD = gfortran
|
||||||
XLD = cc
|
XLD = cc
|
||||||
LDFLAGS = -g -fdec -std=legacy
|
LDFLAGS = -g
|
||||||
|
|
||||||
#
|
#
|
||||||
# Avoid compilation of objects in remote directories
|
# Avoid compilation of objects in remote directories
|
||||||
|
@ -76,7 +76,7 @@ SEQLIB=\
|
||||||
#
|
#
|
||||||
CCORE=\
|
CCORE=\
|
||||||
$(STADENBIN)/postscript.o\
|
$(STADENBIN)/postscript.o\
|
||||||
$(TEDBIN)/Graph.o\
|
$(STADENBIN)/Graph.o\
|
||||||
$(STADENBIN)/plotLog.o\
|
$(STADENBIN)/plotLog.o\
|
||||||
$(STADENBIN)/help.o\
|
$(STADENBIN)/help.o\
|
||||||
$(STADENBIN)/dialogues.o\
|
$(STADENBIN)/dialogues.o\
|
||||||
|
@ -101,7 +101,7 @@ COBJS2=\
|
||||||
#
|
#
|
||||||
COMMONOBJSB=\
|
COMMONOBJSB=\
|
||||||
$(STADENBIN)/fmain.o\
|
$(STADENBIN)/fmain.o\
|
||||||
$(STADENBIN)/seeme-aix.o\
|
$(STADENBIN)/seeme-dec.o\
|
||||||
$(STADENBIN)/nxspec.o\
|
$(STADENBIN)/nxspec.o\
|
||||||
$(STADENBIN)/userface.o\
|
$(STADENBIN)/userface.o\
|
||||||
$(STADENBIN)/userfacecom.o\
|
$(STADENBIN)/userfacecom.o\
|
||||||
|
@ -118,13 +118,13 @@ SCOMMONOBJS=\
|
||||||
$(COMMONOBJSB)
|
$(COMMONOBJSB)
|
||||||
|
|
||||||
XCOMMONOBJS=\
|
XCOMMONOBJS=\
|
||||||
$(STADENBIN)/seeme-aix.o\
|
$(STADENBIN)/seeme-dec.o\
|
||||||
$(STADENBIN)/xspec.o\
|
$(STADENBIN)/xspec.o\
|
||||||
$(STADENBIN)/subs89.a\
|
$(STADENBIN)/subs89.a\
|
||||||
$(COBJS)
|
$(COBJS)
|
||||||
|
|
||||||
XCOMMONOBJS2=\
|
XCOMMONOBJS2=\
|
||||||
$(STADENBIN)/seeme-aix.o\
|
$(STADENBIN)/seeme-dec.o\
|
||||||
$(STADENBIN)/xspec.o\
|
$(STADENBIN)/xspec.o\
|
||||||
$(STADENBIN)/subs89.a\
|
$(STADENBIN)/subs89.a\
|
||||||
$(COBJS2)
|
$(COBJS2)
|
||||||
|
@ -562,9 +562,9 @@ splitp3: $(SPLITP3OBJS)
|
||||||
# rm -r $$TMPDIR
|
# rm -r $$TMPDIR
|
||||||
|
|
||||||
|
|
||||||
#%.a: $(SRC)/%.f
|
%.a: $(SRC)/%.f
|
||||||
# $(F77) $(FFLAGS) -c *.f;
|
$(F77) $(FFLAGS) -c *.f;
|
||||||
# ar rcv $$BINDIR/$@ *.o;
|
ar rcv $$BINDIR/$@ *.o;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
for fortran in $(ls *.f)
|
|
||||||
do
|
|
||||||
mkdir -p ${fortran%??}
|
|
||||||
cp $fortran ${fortran%??}
|
|
||||||
|
|
||||||
cd ${fortran%??}
|
|
||||||
fsplit ${fortran}
|
|
||||||
rm ${fortran}
|
|
||||||
|
|
||||||
gfortran -g -fdec -std=legacy -C -c *.f
|
|
||||||
ar rcv ${fortran%??}.a *.o
|
|
||||||
ranlib ${fortran%??}.a
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
cp ${fortran%??}/*.a .
|
|
||||||
rm -rf ${fortran%??}
|
|
||||||
done
|
|
|
@ -28,11 +28,10 @@ INCLUDES= -I$(SRC) -I$(TEDSRC) -I$(MISCSRC)
|
||||||
CC= cc
|
CC= cc
|
||||||
CFLAGS= -g $(INCLUDES)
|
CFLAGS= -g $(INCLUDES)
|
||||||
F77= gfortran
|
F77= gfortran
|
||||||
FFLAGS= -g -fdec -std=legacy -C
|
FFLAGS= -g -fdec -C
|
||||||
|
|
||||||
FLIBS = -lutil -lm
|
FLIBS= -lfor -lutil -lUfor -lots -lFutil -lm -lfor -lutil -lUfor -lots -lFutil
|
||||||
#FLIBS= -lfor -lutil -lUfor -lots -lFutil -lm
|
XLIBS= -lXaw -lXt -lXmu -lXext -lX11 -ldnet_stub
|
||||||
XLIBS= -lXaw -lXt -lXmu -lXext -lX11
|
|
||||||
LFLAGS= $(FLIBS)
|
LFLAGS= $(FLIBS)
|
||||||
XLFLAGS= $(FLIBS) $(XLIBS)
|
XLFLAGS= $(FLIBS) $(XLIBS)
|
||||||
|
|
||||||
|
@ -79,7 +78,7 @@ XDAPCOBJS=\
|
||||||
#
|
#
|
||||||
COMMONOBJSB=\
|
COMMONOBJSB=\
|
||||||
fmain.o\
|
fmain.o\
|
||||||
seeme-aix.o\
|
seeme-dec.o\
|
||||||
nxspec.o\
|
nxspec.o\
|
||||||
userface.o\
|
userface.o\
|
||||||
userfacecom.o\
|
userfacecom.o\
|
||||||
|
@ -96,13 +95,13 @@ SCOMMONOBJS=\
|
||||||
$(COMMONOBJSB)
|
$(COMMONOBJSB)
|
||||||
|
|
||||||
XCOMMONOBJS=\
|
XCOMMONOBJS=\
|
||||||
seeme-aix.o\
|
seeme-dec.o\
|
||||||
xspec.o\
|
xspec.o\
|
||||||
subs89.a\
|
subs89.a\
|
||||||
$(COBJS)
|
$(COBJS)
|
||||||
|
|
||||||
XDAPCOMMONOBJS=\
|
XDAPCOMMONOBJS=\
|
||||||
seeme-aix.o\
|
seeme-dec.o\
|
||||||
xspec.o\
|
xspec.o\
|
||||||
subs89.a\
|
subs89.a\
|
||||||
$(XDAPCOBJS)
|
$(XDAPCOBJS)
|
||||||
|
@ -550,34 +549,29 @@ vep: $(VEPOBJS)
|
||||||
# avoid filling up the (small on this machine) /tmp directory
|
# avoid filling up the (small on this machine) /tmp directory
|
||||||
# with compiler debugging information.
|
# with compiler debugging information.
|
||||||
#
|
#
|
||||||
%.a: $(SRC)/%.f
|
#%.a: $(SRC)/%.f
|
||||||
sh gen_a.sh
|
|
||||||
|
|
||||||
# BINDIR=`pwd`; \
|
# BINDIR=`pwd`; \
|
||||||
# cd $(SRC); \
|
# cd $(SRC); \
|
||||||
# SRCDIR=`pwd`; \
|
# SRCDIR=`pwd`; \
|
||||||
#
|
|
||||||
# TMPDIR=/tmp/staden$$$$; \
|
# TMPDIR=/tmp/staden$$$$; \
|
||||||
# if test ! -d $$TMPDIR; \
|
# if test ! -d $$TMPDIR; \
|
||||||
# then mkdir $$TMPDIR; \
|
# then mkdir $$TMPDIR; \
|
||||||
# fi; \
|
# fi; \
|
||||||
# cd $$TMPDIR; \
|
# cd $$TMPDIR; \
|
||||||
# rm -f *.f *.o; \
|
# rm -f *.f *.o; \
|
||||||
#
|
|
||||||
# fsplit $$SRCDIR/`expr $< : '.*/\(.*\)' \| $<`; \
|
# fsplit $$SRCDIR/`expr $< : '.*/\(.*\)' \| $<`; \
|
||||||
# $(F77) $(FFLAGS) -c *.f; \
|
# $(F77) $(FFLAGS) -c *.f; \
|
||||||
#
|
# rm *.f; \
|
||||||
## rm *.f; \
|
# rm -f $$BINDIR/$@; \
|
||||||
#
|
# ar rcv $$BINDIR/$@ *.o; \
|
||||||
# rm -f $@; \
|
# ranlib $$BINDIR/$@; \
|
||||||
# ar rcv $@ *.o; \
|
# rm *.o; \
|
||||||
# ranlib $@; \
|
|
||||||
##rm *.o; \
|
|
||||||
#
|
|
||||||
# cd $$BINDIR; \
|
# cd $$BINDIR; \
|
||||||
# rm -r $$TMPDIR
|
# rm -r $$TMPDIR
|
||||||
|
|
||||||
|
%.a: $(SRC)/%.f
|
||||||
|
$(F77) $(FFLAGS) -c *.f; \
|
||||||
|
ar rcv *.o
|
||||||
|
|
||||||
#.f.a:
|
#.f.a:
|
||||||
# $(F77) $(FFLAGS) -c $<
|
# $(F77) $(FFLAGS) -c $<
|
||||||
|
|
|
@ -670,7 +670,6 @@ C
|
||||||
WRITE(*,*)'END IN GETRSL'
|
WRITE(*,*)'END IN GETRSL'
|
||||||
END
|
END
|
||||||
INTEGER FUNCTION SEEKRS(IDEV,IREC)
|
INTEGER FUNCTION SEEKRS(IDEV,IREC)
|
||||||
EXTERNAL FSEEK
|
INTEGER FSEEK
|
||||||
C INTEGER FSEEK
|
|
||||||
SEEKRS = FSEEK(IDEV,IREC,0)
|
SEEKRS = FSEEK(IDEV,IREC,0)
|
||||||
END
|
END
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "FtoC.h" /* IMPORT: Fstr2Cstr and Cstr2Fstr */
|
|
||||||
#include "helpnmenu.h"
|
|
||||||
#include "userface.h"
|
#include "userface.h"
|
||||||
|
#include "helpnmenu.h"
|
||||||
|
#include "FtoC.h" /* IMPORT: Fstr2Cstr and Cstr2Fstr */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prompts the user with either one yes/no question or another.
|
* Prompts the user with either one yes/no question or another.
|
||||||
|
@ -17,16 +16,16 @@
|
||||||
* 1 = no
|
* 1 = no
|
||||||
* -1 = cancel
|
* -1 = cancel
|
||||||
*/
|
*/
|
||||||
int yesono(int choice, char *prompt1, char *prompt2)
|
int yesono(int choice, char *prompt1, char *prompt2) {
|
||||||
{
|
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
switch (choice) {
|
switch(choice) {
|
||||||
case 0:
|
case 0:
|
||||||
return yesno(prompt1);
|
return yesno(prompt1);
|
||||||
case 1:
|
case 1:
|
||||||
a = yesno(prompt2);
|
a = yesno(prompt2);
|
||||||
if (a >= 0) a ^= 1;
|
if (a>=0)
|
||||||
|
a ^= 1;
|
||||||
return a;
|
return a;
|
||||||
default:
|
default:
|
||||||
fputs("yesno() called with bad 'choice'\n", stderr);
|
fputs("yesno() called with bad 'choice'\n", stderr);
|
||||||
|
@ -42,11 +41,20 @@ int yesono(int choice, char *prompt1, char *prompt2)
|
||||||
|* *|
|
|* *|
|
||||||
\*--------------------------------------------------------------------------*/
|
\*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
void getint_x(int_f *MININ_p, int_f *MAXIN_p, int_f *DEF_p, char *PROMPT_p,
|
void getint_x(int_f *MININ_p,
|
||||||
|
int_f *MAXIN_p,
|
||||||
|
int_f *DEF_p,
|
||||||
|
char *PROMPT_p,
|
||||||
int_f *VALUE_p, /* out: result */
|
int_f *VALUE_p, /* out: result */
|
||||||
int_f *KBIN_p, int_f *KBOUT_p, int_f *IHELPS_p, int_f *IHELPE_p,
|
int_f *KBIN_p,
|
||||||
char *HELPF_p, int_f *IDEVH_p, int_f *IOK_p, /* out: status */
|
int_f *KBOUT_p,
|
||||||
int_fl PROMPT_l, int_fl HELPF_l)
|
int_f *IHELPS_p,
|
||||||
|
int_f *IHELPE_p,
|
||||||
|
char *HELPF_p,
|
||||||
|
int_f *IDEVH_p,
|
||||||
|
int_f *IOK_p, /* out: status */
|
||||||
|
int_fl PROMPT_l,
|
||||||
|
int_fl HELPF_l)
|
||||||
/*
|
/*
|
||||||
* Prompt for an integer in the range *MININ_p <= i <= *MAXIN_p
|
* Prompt for an integer in the range *MININ_p <= i <= *MAXIN_p
|
||||||
* IOK=0 => OK
|
* IOK=0 => OK
|
||||||
|
@ -58,17 +66,26 @@ void getint_x(int_f *MININ_p, int_f *MAXIN_p, int_f *DEF_p, char *PROMPT_p,
|
||||||
|
|
||||||
Fstr2Cstr(PROMPT_p, PROMPT_l, prompt, (int_fl)sizeof(prompt));
|
Fstr2Cstr(PROMPT_p, PROMPT_l, prompt, (int_fl)sizeof(prompt));
|
||||||
|
|
||||||
*VALUE_p =
|
*VALUE_p = getint((int)*MININ_p, (int)*MAXIN_p, (int)*DEF_p,
|
||||||
getint((int)*MININ_p, (int)*MAXIN_p, (int)*DEF_p, prompt, &status);
|
prompt, &status);
|
||||||
*IOK_p = (int_f)((status < 0) ? 1 : 0);
|
*IOK_p = (int_f)((status < 0)? 1:0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void getrl_x(float *MININ_p, float *MAXIN_p, float *DEF_p, char *PROMPT_p,
|
void getrl_x(float *MININ_p,
|
||||||
|
float *MAXIN_p,
|
||||||
|
float *DEF_p,
|
||||||
|
char *PROMPT_p,
|
||||||
float *VALUE_p, /* out: result */
|
float *VALUE_p, /* out: result */
|
||||||
int_f *KBIN_p, int_f *KBOUT_p, int_f *IHELPS_p, int_f *IHELPE_p,
|
int_f *KBIN_p,
|
||||||
char *HELPF_p, int_f *IDEVH_p, int_f *IOK_p, int_fl PROMPT_l,
|
int_f *KBOUT_p,
|
||||||
|
int_f *IHELPS_p,
|
||||||
|
int_f *IHELPE_p,
|
||||||
|
char *HELPF_p,
|
||||||
|
int_f *IDEVH_p,
|
||||||
|
int_f *IOK_p,
|
||||||
|
int_fl PROMPT_l,
|
||||||
int_fl HELPF_l)
|
int_fl HELPF_l)
|
||||||
/*
|
/*
|
||||||
* Prompt for a real in the range *MININ_p <= i <= *MAXIN_p
|
* Prompt for a real in the range *MININ_p <= i <= *MAXIN_p
|
||||||
|
@ -83,15 +100,24 @@ void getrl_x(float *MININ_p, float *MAXIN_p, float *DEF_p, char *PROMPT_p,
|
||||||
Fstr2Cstr(PROMPT_p, PROMPT_l, prompt, (int_fl)sizeof(prompt));
|
Fstr2Cstr(PROMPT_p, PROMPT_l, prompt, (int_fl)sizeof(prompt));
|
||||||
|
|
||||||
*VALUE_p = getfloat(*MININ_p, *MAXIN_p, *DEF_p, prompt, &status, 2);
|
*VALUE_p = getfloat(*MININ_p, *MAXIN_p, *DEF_p, prompt, &status, 2);
|
||||||
*IOK_p = (int_f)((status < 0) ? 1 : 0);
|
*IOK_p = (int_f)((status < 0)? 1:0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void getrls_x(float *MININ_p, float *MAXIN_p, float *DEF_p, char *PROMPT_p,
|
void getrls_x(float *MININ_p,
|
||||||
|
float *MAXIN_p,
|
||||||
|
float *DEF_p,
|
||||||
|
char *PROMPT_p,
|
||||||
float *VALUE_p, /* out: result */
|
float *VALUE_p, /* out: result */
|
||||||
int_f *KBIN_p, int_f *KBOUT_p, int_f *IHELPS_p, int_f *IHELPE_p,
|
int_f *KBIN_p,
|
||||||
char *HELPF_p, int_f *IDEVH_p, int_f *IOK_p, int_fl PROMPT_l,
|
int_f *KBOUT_p,
|
||||||
|
int_f *IHELPS_p,
|
||||||
|
int_f *IHELPE_p,
|
||||||
|
char *HELPF_p,
|
||||||
|
int_f *IDEVH_p,
|
||||||
|
int_f *IOK_p,
|
||||||
|
int_fl PROMPT_l,
|
||||||
int_fl HELPF_l)
|
int_fl HELPF_l)
|
||||||
/*
|
/*
|
||||||
* Prompt for a real in the range *MININ_p <= i <= *MAXIN_p
|
* Prompt for a real in the range *MININ_p <= i <= *MAXIN_p
|
||||||
|
@ -106,14 +132,21 @@ void getrls_x(float *MININ_p, float *MAXIN_p, float *DEF_p, char *PROMPT_p,
|
||||||
Fstr2Cstr(PROMPT_p, PROMPT_l, prompt, (int_fl)sizeof(prompt));
|
Fstr2Cstr(PROMPT_p, PROMPT_l, prompt, (int_fl)sizeof(prompt));
|
||||||
|
|
||||||
*VALUE_p = getfloat(*MININ_p, *MAXIN_p, *DEF_p, prompt, &status, 10);
|
*VALUE_p = getfloat(*MININ_p, *MAXIN_p, *DEF_p, prompt, &status, 10);
|
||||||
*IOK_p = (int_f)((status < 0) ? 1 : 0);
|
*IOK_p = (int_f)((status < 0)? 1:0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void yesno_x(int_f *ANSWER_p, char *PROMPT_p, int_f *IHELPS_p, int_f *IHELPE_p,
|
void yesno_x(int_f *ANSWER_p,
|
||||||
char *HELPF_p, int_f *IDEVH_p, int_f *KBIN_p, int_f *KBOUT_p,
|
char *PROMPT_p,
|
||||||
int_fl PROMPT_l, int_fl HELPF_l)
|
int_f *IHELPS_p,
|
||||||
|
int_f *IHELPE_p,
|
||||||
|
char *HELPF_p,
|
||||||
|
int_f *IDEVH_p,
|
||||||
|
int_f *KBIN_p,
|
||||||
|
int_f *KBOUT_p,
|
||||||
|
int_fl PROMPT_l,
|
||||||
|
int_fl HELPF_l)
|
||||||
/*
|
/*
|
||||||
* Prompt the user with *PROMPT_l and get a YES or NO response.
|
* Prompt the user with *PROMPT_l and get a YES or NO response.
|
||||||
* ANSWER=-1 => Cancel
|
* ANSWER=-1 => Cancel
|
||||||
|
@ -127,9 +160,18 @@ void yesno_x(int_f *ANSWER_p, char *PROMPT_p, int_f *IHELPS_p, int_f *IHELPE_p,
|
||||||
*ANSWER_p = (int_f)yesno(prompt);
|
*ANSWER_p = (int_f)yesno(prompt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void yesono_x(int_f *CHOICE_p, char *P1_p, char *P2_p, int_f *IHELPS_p,
|
void yesono_x(int_f *CHOICE_p,
|
||||||
int_f *IHELPE_p, char *HELPF_p, int_f *IDEVH_p, int_f *KBIN_p,
|
char *P1_p,
|
||||||
int_f *KBOUT_p, int_fl P1_l, int_fl P2_l, int_fl HELPF_l)
|
char *P2_p,
|
||||||
|
int_f *IHELPS_p,
|
||||||
|
int_f *IHELPE_p,
|
||||||
|
char *HELPF_p,
|
||||||
|
int_f *IDEVH_p,
|
||||||
|
int_f *KBIN_p,
|
||||||
|
int_f *KBOUT_p,
|
||||||
|
int_fl P1_l,
|
||||||
|
int_fl P2_l,
|
||||||
|
int_fl HELPF_l)
|
||||||
/*
|
/*
|
||||||
* If CHOICE is 0, present a YESNO dialogue with prompt P1.
|
* If CHOICE is 0, present a YESNO dialogue with prompt P1.
|
||||||
* If CHOICE is 1, present a YESNO dialogue with prompt P2.
|
* If CHOICE is 1, present a YESNO dialogue with prompt P2.
|
||||||
|
@ -148,8 +190,12 @@ void gtstr_x(char *P_p, /* prompt */
|
||||||
char *NEW_p, /* out: dialogue result */
|
char *NEW_p, /* out: dialogue result */
|
||||||
int_f *LENGTH_p, /* in: significant length of *STRING_p
|
int_f *LENGTH_p, /* in: significant length of *STRING_p
|
||||||
out: significant length of *NEW_p */
|
out: significant length of *NEW_p */
|
||||||
int_f *KBOUT_p, int_f *KBIN_p, int_f *INFLAG_p, /* out: status */
|
int_f *KBOUT_p,
|
||||||
int_fl P_l, int_fl STRING_l, int_fl NEW_l)
|
int_f *KBIN_p,
|
||||||
|
int_f *INFLAG_p, /* out: status */
|
||||||
|
int_fl P_l,
|
||||||
|
int_fl STRING_l,
|
||||||
|
int_fl NEW_l)
|
||||||
/*
|
/*
|
||||||
* Prompt with P for a string, default value STRING.
|
* Prompt with P for a string, default value STRING.
|
||||||
* Return new string in NEW.
|
* Return new string in NEW.
|
||||||
|
@ -167,13 +213,11 @@ void gtstr_x(char *P_p, /* prompt */
|
||||||
if (*LENGTH_p > 0) {
|
if (*LENGTH_p > 0) {
|
||||||
Fstr2Cstr(STRING_p, STRING_l, def, (int_fl)sizeof(def));
|
Fstr2Cstr(STRING_p, STRING_l, def, (int_fl)sizeof(def));
|
||||||
defptr = def;
|
defptr = def;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
defptr = 0;
|
defptr = 0;
|
||||||
|
|
||||||
ret =
|
ret = gtstr(question, defptr, NEW_p, (size_t)((NEW_l==1)?40:NEW_l));
|
||||||
gtstr(question, defptr, NEW_p, (size_t)((NEW_l == 1) ? 40 : NEW_l));
|
switch(ret) {
|
||||||
switch (ret) {
|
|
||||||
case -1:
|
case -1:
|
||||||
*INFLAG_p = 2;
|
*INFLAG_p = 2;
|
||||||
*LENGTH_p = 1;
|
*LENGTH_p = 1;
|
||||||
|
@ -195,7 +239,9 @@ void getstr_x(char *P_p, /* prompt */
|
||||||
int_f *MAXSTR_p, /* array length of *STRING_p and *NEW_p */
|
int_f *MAXSTR_p, /* array length of *STRING_p and *NEW_p */
|
||||||
int_f *LENGTH_p, /* in: significant length of *STRING_p
|
int_f *LENGTH_p, /* in: significant length of *STRING_p
|
||||||
out: significant length of *NEW_p */
|
out: significant length of *NEW_p */
|
||||||
int_f *KBOUT_p, int_f *KBIN_p, int_f *INFLAG_p, /* out: status */
|
int_f *KBOUT_p,
|
||||||
|
int_f *KBIN_p,
|
||||||
|
int_f *INFLAG_p, /* out: status */
|
||||||
int_fl P_l)
|
int_fl P_l)
|
||||||
/*
|
/*
|
||||||
* Present a dialogue requesting a string result with the given prompt
|
* Present a dialogue requesting a string result with the given prompt
|
||||||
|
@ -206,16 +252,31 @@ void getstr_x(char *P_p, /* prompt */
|
||||||
* given *STRING_p and *NEW_p.
|
* given *STRING_p and *NEW_p.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
gtstr_x(P_p, STRING_p, NEW_p, LENGTH_p, KBOUT_p, KBIN_p, INFLAG_p, P_l,
|
gtstr_x(P_p,
|
||||||
*MAXSTR_p, *MAXSTR_p);
|
STRING_p,
|
||||||
|
NEW_p,
|
||||||
|
LENGTH_p,
|
||||||
|
KBOUT_p,
|
||||||
|
KBIN_p,
|
||||||
|
INFLAG_p,
|
||||||
|
P_l,
|
||||||
|
*MAXSTR_p,
|
||||||
|
*MAXSTR_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void radion_x(char *TITLE_p, char *PROMPT_p, /* Actually: *PROMPT_p[*NB_p] */
|
void radion_x(char *TITLE_p,
|
||||||
|
char *PROMPT_p, /* Actually: *PROMPT_p[*NB_p] */
|
||||||
int_f *NB_p, /* Number of buttons (1..NB) */
|
int_f *NB_p, /* Number of buttons (1..NB) */
|
||||||
int_f *CHOICE_p, /* in: default button
|
int_f *CHOICE_p, /* in: default button
|
||||||
out: selected button */
|
out: selected button */
|
||||||
int_f *IHELPS_p, int_f *IHELPE_p, char *HELPF_p, int_f *IDEVH_p,
|
int_f *IHELPS_p,
|
||||||
int_f *KBIN_p, int_f *KBOUT_p, int_fl TITLE_l, int_fl PROMPT_l,
|
int_f *IHELPE_p,
|
||||||
|
char *HELPF_p,
|
||||||
|
int_f *IDEVH_p,
|
||||||
|
int_f *KBIN_p,
|
||||||
|
int_f *KBOUT_p,
|
||||||
|
int_fl TITLE_l,
|
||||||
|
int_fl PROMPT_l,
|
||||||
int_fl HELPF_l)
|
int_fl HELPF_l)
|
||||||
/*
|
/*
|
||||||
* Present a ``radio button'' dialogue allowing the user to select
|
* Present a ``radio button'' dialogue allowing the user to select
|
||||||
|
@ -230,11 +291,10 @@ void radion_x(char *TITLE_p, char *PROMPT_p, /* Actually: *PROMPT_p[*NB_p] */
|
||||||
|
|
||||||
/* initialise options array */
|
/* initialise options array */
|
||||||
opt = (char **)malloc(numopts * sizeof(char *));
|
opt = (char **)malloc(numopts * sizeof(char *));
|
||||||
opt[0] = (char *)malloc((unsigned int)((PROMPT_l + 1) * numopts));
|
opt[0] = (char *)malloc((unsigned int)((PROMPT_l+1) * numopts));
|
||||||
for (i = 0; i < numopts; i++) {
|
for (i=0; i<numopts; i++) {
|
||||||
opt[i] = opt[0] + (PROMPT_l + 1) * i;
|
opt[i] = opt[0] + (PROMPT_l+1)*i;
|
||||||
Fstr2Cstr(PROMPT_p + (i * PROMPT_l), PROMPT_l, opt[i],
|
Fstr2Cstr(PROMPT_p+(i*PROMPT_l), PROMPT_l, opt[i], PROMPT_l+1);
|
||||||
PROMPT_l + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Fstr2Cstr(TITLE_p, TITLE_l, title, (int_fl)sizeof(title));
|
Fstr2Cstr(TITLE_p, TITLE_l, title, (int_fl)sizeof(title));
|
||||||
|
@ -246,11 +306,17 @@ void radion_x(char *TITLE_p, char *PROMPT_p, /* Actually: *PROMPT_p[*NB_p] */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void check4_x(char *P1_p, char *P2_p, char *P3_p, char *P4_p, int_f *C1_p,
|
void check4_x(char *P1_p, char *P2_p, char *P3_p, char *P4_p,
|
||||||
int_f *C2_p, int_f *C3_p, int_f *C4_p, int_f *IHELPS_p,
|
int_f *C1_p, int_f *C2_p, int_f *C3_p, int_f *C4_p,
|
||||||
int_f *IHELPE_p, char *HELPF_p, int_f *IDEVH_p, int_f *KBIN_p,
|
int_f *IHELPS_p,
|
||||||
int_f *KBOUT_p, int_f *IOK_p, int_fl P1_l, int_fl P2_l,
|
int_f *IHELPE_p,
|
||||||
int_fl P3_l, int_fl P4_l, int_fl HELPF_l)
|
char *HELPF_p,
|
||||||
|
int_f *IDEVH_p,
|
||||||
|
int_f *KBIN_p,
|
||||||
|
int_f *KBOUT_p,
|
||||||
|
int_f *IOK_p,
|
||||||
|
int_fl P1_l, int_fl P2_l, int_fl P3_l, int_fl P4_l,
|
||||||
|
int_fl HELPF_l)
|
||||||
/*
|
/*
|
||||||
* Present a ``checkbox'' dialogue allowing the user to alter the
|
* Present a ``checkbox'' dialogue allowing the user to alter the
|
||||||
* Boolean state of four items.
|
* Boolean state of four items.
|
||||||
|
@ -264,14 +330,10 @@ void check4_x(char *P1_p, char *P2_p, char *P3_p, char *P4_p, int_f *C1_p,
|
||||||
char *prompts[4];
|
char *prompts[4];
|
||||||
int *bools[4];
|
int *bools[4];
|
||||||
|
|
||||||
prompts[0] = P1_p;
|
prompts[0] = P1_p; bools[0] = (int *)C1_p;
|
||||||
bools[0] = (int *)C1_p;
|
prompts[1] = P2_p; bools[1] = (int *)C2_p;
|
||||||
prompts[1] = P2_p;
|
prompts[2] = P3_p; bools[2] = (int *)C3_p;
|
||||||
bools[1] = (int *)C2_p;
|
prompts[3] = P4_p; bools[3] = (int *)C4_p;
|
||||||
prompts[2] = P3_p;
|
|
||||||
bools[2] = (int *)C3_p;
|
|
||||||
prompts[3] = P4_p;
|
|
||||||
bools[3] = (int *)C4_p;
|
|
||||||
|
|
||||||
ret = checkn(4, prompts, bools);
|
ret = checkn(4, prompts, bools);
|
||||||
|
|
||||||
|
@ -281,7 +343,8 @@ void check4_x(char *P1_p, char *P2_p, char *P3_p, char *P4_p, int_f *C1_p,
|
||||||
*IOK_p = 1;
|
*IOK_p = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void getopt_x(int_f *KBIN_p, int_f *KOPT_p,
|
void getopt_x(int_f *KBIN_p,
|
||||||
|
int_f *KOPT_p,
|
||||||
int_f *IOPT_p) /* out: option number selected */
|
int_f *IOPT_p) /* out: option number selected */
|
||||||
/*
|
/*
|
||||||
* Select a function to execute
|
* Select a function to execute
|
||||||
|
@ -291,7 +354,7 @@ void getopt_x(int_f *KBIN_p, int_f *KOPT_p,
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
*IOPT_p = (int_f)getcopt((int *)KOPT_p);
|
*IOPT_p = (int_f)getcopt((int *)KOPT_p);
|
||||||
switch (*KOPT_p) {
|
switch(*KOPT_p) {
|
||||||
case -3:
|
case -3:
|
||||||
case -2:
|
case -2:
|
||||||
*KOPT_p = 0;
|
*KOPT_p = 0;
|
||||||
|
@ -304,7 +367,9 @@ void getopt_x(int_f *KBIN_p, int_f *KOPT_p,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showfi_x(int_f *KBOUT_p, char *STRING_p, int_fl STRING_l)
|
void showfi_x(int_f *KBOUT_p,
|
||||||
|
char *STRING_p,
|
||||||
|
int_fl STRING_l)
|
||||||
/*
|
/*
|
||||||
* Display `STRING', the name of the current file(s).
|
* Display `STRING', the name of the current file(s).
|
||||||
*/
|
*/
|
||||||
|
@ -315,7 +380,10 @@ void showfi_x(int_f *KBOUT_p, char *STRING_p, int_fl STRING_l)
|
||||||
showfi(func);
|
showfi(func);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showfu_x(int_f *KBOUT_p, char *STRING_p, int_fl STRING_l)
|
|
||||||
|
void showfu_x(int_f *KBOUT_p,
|
||||||
|
char *STRING_p,
|
||||||
|
int_fl STRING_l)
|
||||||
/*
|
/*
|
||||||
* Display `STRING', the name of the current function.
|
* Display `STRING', the name of the current function.
|
||||||
*/
|
*/
|
||||||
|
@ -326,7 +394,9 @@ void showfu_x(int_f *KBOUT_p, char *STRING_p, int_fl STRING_l)
|
||||||
showfu(func);
|
showfu(func);
|
||||||
}
|
}
|
||||||
|
|
||||||
void errom_x(int_f *KBOUT_p, char *STRING_p, int_fl STRING_l)
|
void errom_x(int_f *KBOUT_p,
|
||||||
|
char *STRING_p,
|
||||||
|
int_fl STRING_l)
|
||||||
/*
|
/*
|
||||||
* Display the error message `STRING'.
|
* Display the error message `STRING'.
|
||||||
*/
|
*/
|
||||||
|
@ -351,8 +421,10 @@ void busy_x(int_f *KBOUT_p)
|
||||||
* 0 for ok
|
* 0 for ok
|
||||||
* -1 for cancel
|
* -1 for cancel
|
||||||
*/
|
*/
|
||||||
void bpause_x(int_f *KBIN_p, int_f *KBOUT_p, int_f *IOK_p)
|
void bpause_x(int_f *KBIN_p,
|
||||||
{
|
int_f *KBOUT_p,
|
||||||
|
int_f *IOK_p) {
|
||||||
|
|
||||||
*IOK_p = (int_f)bpause();
|
*IOK_p = (int_f)bpause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,7 @@ FFLAGS= -g
|
||||||
LD= gfortran
|
LD= gfortran
|
||||||
LDFLAGS= -g
|
LDFLAGS= -g
|
||||||
|
|
||||||
FLAGS = -lutil -lm
|
FLIBS= -lfor -lutil -lUfor -lots -lFutil -lm -lfor -lutil -lUfor -lots -lFutil
|
||||||
#FLIBS= -lfor -lutil -lUfor -lots -lFutil -lm -lfor -lutil -lUfor -lots -lFutil
|
|
||||||
XLIBS= -lXaw -lXt -lXmu -lXext -lX11
|
XLIBS= -lXaw -lXt -lXmu -lXext -lX11
|
||||||
#LFLAGS= $(FLIBS)
|
#LFLAGS= $(FLIBS)
|
||||||
XLFLAGS= $(FLIBS) $(XLIBS)
|
XLFLAGS= $(FLIBS) $(XLIBS)
|
||||||
|
@ -53,7 +52,7 @@ $(STADENBIN)/%.o : $(STADENSRC)/%.c
|
||||||
# Common objects, needed by every program
|
# Common objects, needed by every program
|
||||||
#
|
#
|
||||||
COMMONOBJS=\
|
COMMONOBJS=\
|
||||||
$(STADENBIN)/seeme-aix.o\
|
$(STADENBIN)/seeme-dec.o\
|
||||||
$(STADENBIN)/nxspec.o\
|
$(STADENBIN)/nxspec.o\
|
||||||
$(STADENBIN)/userface.o\
|
$(STADENBIN)/userface.o\
|
||||||
$(STADENBIN)/userfacecom.o\
|
$(STADENBIN)/userfacecom.o\
|
||||||
|
|
Loading…
Reference in a new issue