Skip to content
Snippets Groups Projects
Commit c16a3d9b authored by rswindell's avatar rswindell
Browse files

Deuce's update for uifcd.

parent f17ec7b2
No related branches found
No related tags found
No related merge requests found
......@@ -56,8 +56,9 @@ OUTLIB = -o
CFLAGS := -I../../uifc -I/usr/local/include -I../
ifeq ($(os),freebsd) # FreeBSD
CFLAGS := $(CFLAGS)
LIBS := -L/usr/local/lib
CFLAGS := $(CFLAGS) -DUSE_DIALOG
LIBS := -L/usr/local/lib -ldialog
USE_DIALOG = YES
else # Linux / Other UNIX
LIBS := -L/usr/local/lib
endif
......@@ -93,10 +94,15 @@ $(LIBODIR)/%.o : %.c
$(LIBODIR)/%.o : %.cpp
$(CC) $(CFLAGS) -c $(SBBSDEFS) $< -o $@
# uifc Rule
# uifc Rules
../../uifc/uifcx.$(OFILE):
$(CC) $(CFLAGS) -c $(SBBSDEFS) ../../uifc/uifcx.c -o ../../uifc/uifcx.$(OFILE)
../../uifc/uifcd.c:
../../uifc/uifcd.$(OFILE):
$(CC) $(CFLAGS) -c $(SBBSDEFS) ../../uifc/uifcd.c -o ../../uifc/uifcd.$(OFILE)
# Create output directories
$(LIBODIR):
mkdir $(LIBODIR)
......
......@@ -17,7 +17,6 @@ OBJS = $(LIBODIR)$(SLASH)scfg.$(OFILE)\
$(LIBODIR)$(SLASH)scfgxfr1.$(OFILE)\
$(LIBODIR)$(SLASH)scfgxfr2.$(OFILE)\
$(LIBODIR)$(SLASH)scfgchat.$(OFILE)\
../../uifc/uifcx.$(OFILE)\
..$(SLASH)$(LIBODIR)$(SLASH)scfgsave.$(OFILE)\
..$(SLASH)$(LIBODIR)$(SLASH)scfglib1.$(OFILE)\
..$(SLASH)$(LIBODIR)$(SLASH)smblib.$(OFILE)\
......@@ -29,3 +28,9 @@ OBJS = $(LIBODIR)$(SLASH)scfg.$(OFILE)\
..$(SLASH)$(LIBODIR)$(SLASH)crc32.$(OFILE)\
..$(SLASH)$(LIBODIR)$(SLASH)userdat.$(OFILE)\
..$(SLASH)$(LIBODIR)$(SLASH)date_str.$(OFILE)
ifdef USE_DIALOG
OBJS := $(OBJS) ../../uifc/uifcd.$(OFILE)
else
OBJS := $(OBJS) ../../uifc/uifcx.$(OFILE)
endif
......@@ -159,19 +159,29 @@ int ulist(int mode, char left, int top, char width, int *cur, int *bar
if(width<strlen(title)+4) width=strlen(title)+4;
do {
dialog_clear_norefresh();
i=*cur;
if(i<0) i=0;
ret=dialog_menu(title, "SCFG Menu", 22, width, 15, cnt, it, str, &i, 0);
if(ret==1) ret = -1;
if(ret==0) {
ret = str[0];
ret -= 49;
if(ret==-16) ret = -2;
if(ret==15) ret = -3;
if(ret>10) ret -= 7;
}
if(strcmp(option[0],"Yes")==0 && strcmp(option[1],"No")==0 && cnt==2) {
ret=dialog_yesno("Yes/No",title,5,width);
if(ret) ret=1; else ret=0;
}
else if(strcmp(option[0],"No")==0 && strcmp(option[1],"Yes")==0 && cnt==2) {
ret=dialog_noyes("Yes/No",title,5,width);
if(ret) ret=0; else ret=1;
}
else {
dialog_clear_norefresh();
ret=dialog_menu(title, "SCFG Menu", 22, width, 15, cnt, it, str, &i, 0);
if(ret==1) ret = -1;
if(ret==0) {
ret = str[0];
ret -= 49;
if(ret==-16) ret = -2;
if(ret==15) ret = -3;
if(ret>10) ret -= 7;
}
}
if(ret==-2) {
dialog_clear_norefresh();
if(freecnt-4>0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment