home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
PRE412.ZIP
/
GOLDSYS4.MOD
< prev
next >
Wrap
Text File
|
1990-03-24
|
2KB
|
77 lines
Tony Godfrey #1 @18
Thu Mar 22 09:01:33 1990
void boardedit()
{
int i,i1,i2,i3,done,f;
char s[81],s1[81],s2[81],ch;
goldload();
if (!checkpw())
return;
showsubs();
done=0;
do {
nl();
prt(2,"Subs: D:elete, I:nsert, M:odify, Q:uit, ? : ");
ch=onek("QDIM?");
switch(ch) {
case '?':
showsubs();
break;
case 'Q':
done=1;
break;
case 'M':
nl();
prt(2,"Sub number? ");
input(s,2);
i=atoi(s);
if ((s[0]!=0) && (i>=0) && (i<num_subs))
modify_sub(i);
break;
case 'I':
if (num_subs<32) {
nl();
prt(2,"Insert before which sub? ");
input(s,2);
i=atoi(s);
if ((s[0]!=0) && (i>=0) && (i<=num_subs)) {
insert_sub(i);
i2 = rewardgold[i];
rewardgold[i] = 0;
for (i1=i+1; i1<num_subs; i1++) {
i3 = rewardgold[i1];
rewardgold[i1] = i2;
i2 = i3;
}
rewardgold[num_subs] = i2;
savegold();
}
}
break;
case 'D':
nl();
prt(2,"Delete which sub? ");
input(s,2);
i=atoi(s);
if ((s[0]!=0) && (i>=0) && (i<num_subs)) {
nl();
sprintf(s1,"Delete %s? ",subboards[i].name);
prt(5,s1);
if (yn()) {
delete_sub(i);
for (i1=i; i1<num_subs; i1++)
rewardgold[i1] = rewardgold[i1+1];
rewardgold[num_subs] = 0;
savegold();
}
}
break;
}
} while ((!done) && (!hangup));
strcpy(s,syscfg.datadir);
strcat(s,"SUBS.DAT");
f=open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
write(f,(void *)&subboards[0], num_subs * sizeof(subboardrec));
close(f);
}