...
 
Commits (1)
This diff is collapsed.
@echo off
wmake OS=DOS %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=DOSX %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=OS2 %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=NT %1 %2 %3 %4 %5
if errorlevel 1 goto end
:end
############################################
# Makefile for Synchronet ADDFILES Utility #
# For use with Watcom C/C++ #
############################################
!ifndef OS
OS = DOS
!endif
!ifeq OS DOS
CC = *wcc
!else
CC = *wcc386
!endif
LD = *wlink
INCLUDE = \watcom\h;\watcom\h\os2;..;..\smb;..\rio
!ifeq OS DOS
CFLAGS = -I$(INCLUDE) -s -fh=$*.pch -bt=$(OS) -fo=$(OS)\ -ml
!else
CFLAGS = -I$(INCLUDE) -s -fh=$*.pch -bt=$(OS) -fo=$(OS)\
!endif
!ifeq OS DOS
SYSTEM = DOS
!endif
!ifeq OS OS2
SYSTEM = OS2V2
!endif
!ifeq OS DOSX
SYSTEM = DOS4G
!endif
!ifeq OS NT
SYSTEM = NT
!endif
LFLAGS = option stack=16k system $(SYSTEM)
MAIN = $(OS)\addfiles.exe
OBJS = $(OS)\addfiles.obj $(OS)\scfgvars.obj $(OS)\scfglib1.obj &
$(OS)\ars.obj $(OS)\scfglib2.obj
HEADERS = ..\sbbs.h ..\sbbsdefs.h ..\gen_defs.h ..\scfgvars.c
# Implicit C Compile Rule
.c.obj:
@echo Compiling (I) $[@ to $^@ ...
$(CC) $(CFLAGS) $[@
# Main EXE Link Rule
$(MAIN): $(OBJS)
@echo Linking $< ...
$(LD) $(LFLAGS) file { $(OBJS) }
# Global Variables
$(OS)\scfgvars.obj: ..\scfgvars.c ..\sbbsdefs.h
@echo Compiling $[@ to $^@ ...
$(CC) $(CFLAGS) $[@
# ARS
$(OS)\ars.obj: ..\ars.c ..\ars_defs.h
@echo Compiling $[@ to $^@ ...
$(CC) $(CFLAGS) $[@
# Shared Functions
$(OS)\scfglib1.obj: ..\scfglib1.c ..\sbbs.h ..\sbbsdefs.h ..\scfgvars.c &
..\scfglib.h
@echo Compiling $[@ to $^@ ...
$(CC) $(CFLAGS) &
-DNO_MSGS_CFG &
-DNO_TEXT_CFG &
-DNO_XTRN_CFG &
-DNO_CMDS_CFG &
-DNO_CHAT_CFG &
$[@
# Shared Functions
$(OS)\scfglib2.obj: ..\scfglib2.c ..\sbbs.h ..\sbbsdefs.h ..\scfgvars.c &
..\scfglib.h
@echo Compiling $[@ to $^@ ...
$(CC) $(CFLAGS) &
-DNO_MSGS_CFG &
-DNO_TEXT_CFG &
-DNO_XTRN_CFG &
-DNO_CMDS_CFG &
-DNO_CHAT_CFG &
$[@
############################################
# Makefile for Synchronet ADDFILES Utility #
# For use with Borland C++ for DOS or OS/2 #
############################################
# Macros
CC = bcc
LD = tlink
!ifdef __OS2__
OS = OS2
INCLUDE = c:\bcos2\include;..;..\smb;..\rio
LIB = c:\bcos2\lib
CFLAGS = -N -d -C -I$(INCLUDE)
LFLAGS = -c
!else
OS = DOS
INCLUDE = \bc31\include;..;..\smb;..\rio
LIB = \bc31\lib
MODEL = l
CFLAGS = -N -d -C -m$(MODEL) -I$(INCLUDE)
LFLAGS = -n -c
!endif
MAIN = $(OS)\addfiles.exe
OBJS = $(OS)\addfiles.obj $(OS)\scfgvars.obj $(OS)\scfglib1.obj \
$(OS)\scfglib2.obj $(OS)\ars.obj
HEADERS = ..\sbbs.h ..\sbbsdefs.h ..\gen_defs.h ..\scfgvars.c
# Implicit C Compile Rule
{.}.c.obj:
@echo Compiling (I) $< to $@ ...
$(CC) $(CFLAGS) -n$(OS) -c $<
# Main EXE Link Rule
$(MAIN): $(OBJS)
@echo Linking $< ...
!ifdef __OS2__
$(LD) $(LFLAGS) @&&+
$(LIB)\c02.obj $(OBJS)
+, $*, $*, $(LIB)\os2.lib $(LIB)\c2.lib
!else
$(LD) $(LFLAGS) @&&+
$(LIB)\c0$(MODEL).obj $(OBJS)
+, $*, $*, $(LIB)\c$(MODEL).lib $(LIB)\math$(MODEL).lib $(LIB)\emu.lib
!endif
# Global Variables
$(OS)\scfgvars.obj: ..\scfgvars.c ..\sbbsdefs.h
@echo Compiling ..\$&.c to $< ...
$(CC) $(CFLAGS) -c -n$(OS) ..\$&.c
# ARS
$(OS)\ars.obj: ..\ars.c ..\ars_defs.h
@echo Compiling ..\$&.c to $< ...
$(CC) $(CFLAGS) -c -n$(OS) ..\$&.c
# Shared Functions
$(OS)\scfglib1.obj: ..\sbbs.h ..\sbbsdefs.h ..\scfglib1.c ..\scfgvars.c
@echo Compiling ..\$&.c to $< ...
$(CC) $(CFLAGS) -c -n$(OS) @&&!
-DNO_MSGS_CFG
-DNO_TEXT_CFG
-DNO_XTRN_CFG
-DNO_CMDS_CFG
-DNO_CHAT_CFG
! ..\$&.c
# Shared Functions
$(OS)\scfglib2.obj: ..\sbbs.h ..\sbbsdefs.h ..\scfglib2.c ..\scfgvars.c
@echo Compiling ..\$&.c to $< ...
$(CC) $(CFLAGS) -c -n$(OS) @&&!
-DNO_MSGS_CFG
-DNO_TEXT_CFG
-DNO_XTRN_CFG
-DNO_CMDS_CFG
-DNO_CHAT_CFG
! ..\$&.c
This diff is collapsed.
@echo off
bcc -I.. -w-pro allusers.c
/* ANS2MSG.C */
/* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
/* Convert ANSI messages to Synchronet .MSG (Ctrl-A code) format */
#include <stdio.h>
#include <conio.h>
int main(int argc, char **argv)
{
char esc,n[25],ni;
int i,ch;
FILE *in,*out;
if(argc<3) {
printf("\nANS2MSG v1.06\n");
printf("\nusage: ans2msg infile.ans outfile.msg\n");
exit(0); }
if((in=fopen(argv[1],"rb"))==NULL) {
printf("\nerror opening %s\n",argv[1]);
exit(1); }
if((out=fopen(argv[2],"wb"))==NULL) {
printf("\nerror opening %s\n",argv[2]);
exit(1); }
esc=0;
while((ch=fgetc(in))!=EOF) {
if(ch=='[' && esc) { /* ANSI escape sequence */
ni=0; /* zero number index */
while((ch=fgetc(in))!=EOF) {
if(isdigit(ch)) { /* 1 digit */
n[ni]=ch&0xf;
ch=fgetc(in);
if(ch==EOF)
break;
if(isdigit(ch)) { /* 2 digits */
n[ni]*=10;
n[ni]+=ch&0xf;
ch=fgetc(in);
if(ch==EOF)
break;
if(isdigit(ch)) { /* 3 digits */
n[ni]*=10;
n[ni]+=ch&0xf;
ch=fgetc(in); } }
ni++; }
if(ch==';')
continue;
switch(ch) {
case '=':
case '?':
ch=fgetc(in); /* First digit */
if(isdigit(ch)) ch=fgetc(in); /* l or h ? */
if(isdigit(ch)) ch=fgetc(in);
if(isdigit(ch)) fgetc(in);
break;
case 'J':
if(n[0]==2) /* clear screen */
fputs("\1l",out); /* ctrl-al */
break;
case 'K':
fputs("\1>",out); /* clear to eol */
break;
case 'm':
for(i=0;i<ni;i++) {
fputc(1,out); /* ctrl-ax */
switch(n[i]) {
default:
case 0:
case 2: /* no attribute */
fputc('n',out);
break;
case 1: /* high intensity */
fputc('h',out);
break;
case 3:
case 4:
case 5: /* blink */
case 6:
case 7:
fputc('i',out);
break;
case 8: /* concealed */
fputc('e',out);
break;
case 30:
fputc('k',out);
break;
case 31:
fputc('r',out);
break;
case 32:
fputc('g',out);
break;
case 33:
fputc('y',out);
break;
case 34:
fputc('b',out);
break;
case 35:
fputc('m',out);
break;
case 36:
fputc('c',out);
break;
case 37:
fputc('w',out);
break;
case 40:
fputc('0',out);
break;
case 41:
fputc('1',out);
break;
case 42:
fputc('2',out);
break;
case 43:
fputc('3',out);
break;
case 44:
fputc('4',out);
break;
case 45:
fputc('5',out);
break;
case 46:
fputc('6',out);
break;
case 47:
fputc('7',out);
break; } }
break;
case 'C':
fprintf(out,"\1%c",0x7f+n[0]);
break;
default:
printf("Unsupported ANSI code '%c'\r\n",ch);
break; }
break; } /* end of while */
esc=0;
continue; } /* end of ANSI expansion */
if(ch=='\x1b')
esc=1;
else {
esc=0;
fputc(ch,out); } }
fcloseall();
return(0);
}
This diff is collapsed.
/* ARS_DEFS.H */
/* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
#ifndef _ARS_DEFS_H
#define _ARS_DEFS_H
/************************************************************************/
/* Synchronet Access Requirement Strings fucntion prototypes and type */
/* definitions */
/************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "gen_defs.h"
char *arstr(ushort *count, char *str);
enum { /* Access requirement binaries */
AR_NULL
,AR_OR
,AR_NOT
,AR_EQUAL
,AR_BEGNEST
,AR_ENDNEST
,AR_LEVEL
,AR_AGE
,AR_BPS
,AR_NODE
,AR_TLEFT
,AR_TUSED
,AR_USER
,AR_TIME
,AR_PCR
,AR_FLAG1
,AR_FLAG2
,AR_FLAG3
,AR_FLAG4
,AR_EXEMPT
,AR_REST
,AR_SEX
,AR_UDR
,AR_UDFR
,AR_EXPIRE
,AR_CREDIT
,AR_DAY
,AR_ANSI
,AR_RIP
,AR_LOCAL
,AR_GROUP
,AR_SUB
,AR_LIB
,AR_DIR
,AR_EXPERT
,AR_SYSOP
,AR_QUIET
,AR_MAIN_CMDS
,AR_FILE_CMDS
,AR_RANDOM
,AR_LASTON
,AR_LOGONS
,AR_WIP
,AR_SUBCODE
,AR_DIRCODE
,AR_OS2
,AR_DOS
};
#endif /* Don't add anything after this line */
This diff is collapsed.
/* AUTONODE.C */
/* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
#include <io.h>
#include <dir.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <process.h>
#include <sys\stat.h>
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
#define LOOP_NODEDAB 100 /* Retries on NODE.DAB locking/unlocking */
typedef struct { /* Node information kept in NODE.DAB */
uchar status, /* Current Status of Node */
errors, /* Number of Critical Errors */
action; /* Action User is doing on Node */
uint useron, /* User on Node */
connection, /* Connection rate of Node */
misc, /* Miscellaneous bits for node */
aux; /* Auxillary word for node */
ulong extaux; /* Extended aux dword for node */
} node_t;
enum { /* Node Status */
NODE_WFC /* Waiting for Call */
,NODE_LOGON /* at logon prompt */
,NODE_NEWUSER /* New user applying */
,NODE_INUSE /* In Use */
,NODE_QUIET /* In Use - quiet mode */
,NODE_OFFLINE /* Offline */
,NODE_NETTING /* Networking */
,NODE_EVENT_WAITING /* Waiting for all nodes to be inactive */
,NODE_EVENT_RUNNING /* Running an external event */
,NODE_EVENT_LIMBO /* Allowing another node to run an event */
};
int nodefile;
void main();
void getnodedat(uchar number, node_t *node, char lockit);
void putnodedat(uchar number, node_t node);
void truncsp(char *str);
void main(int argc,char *argv[])
{
FILE *fp;
char str[256],nodepath[256],*p
,sbbs_ctrl[256],sbbs_node[256],path[MAXPATH]
,*arg[10]={NULL};
int file,num_nodes,autonode,disk,x,y;
node_t node;
printf("\nSynchronet AUTONODE v2.00\n");
if(!strcmp(argv[1],"/?")) {
printf("\nUsage: AUTONODE [file] [args,...]");
printf("\n\nWhere [file] is the name of the file to run and");
printf("\n [args,...] are the command line arguments to use");
printf("\n\nNOTE: The default command line is 'SBBS l q'\n");
return; }
p=getenv("SBBSCTRL");
if(!p) {
printf("\n\7You must set the SBBSCTRL environment variable first.");
printf("\n\nExample: SET SBBSCTRL=C:\\SBBS\\CTRL\n");
return; }
sprintf(sbbs_ctrl,"%.40s",p);
strupr(sbbs_ctrl);
if(sbbs_ctrl[strlen(sbbs_ctrl)-1]!='\\')
strcat(sbbs_ctrl,"\\");
p=getenv("SBBSNODE");
if(!p) {
printf("\n\7You must set the SBBSNODE environment variable first.");
printf("\n\nExample: SET SBBSNODE=C:\\SBBS\\NODE1\n");
return; }
sprintf(sbbs_node,"%.40s",p);
strupr(sbbs_node);
if(sbbs_node[strlen(sbbs_node)-1]!='\\')
strcat(sbbs_node,"\\");
sprintf(str,"%sNODE.DAB",sbbs_ctrl);
if((nodefile=open(str,O_RDWR|O_BINARY|O_DENYNONE))==-1) {
printf("Error opening %s",str); exit(1); }
sprintf(str,"%sMAIN.CNF",sbbs_ctrl);
if((file=open(str,O_RDONLY|O_DENYNONE|O_BINARY))==-1) {
printf("Error opening %s",str);
exit(1); }
lseek(file,227L,SEEK_SET);
read(file,&num_nodes,2);
printf("\nNumber of Available Nodes = %d",num_nodes);
lseek(file,64L*(long)num_nodes,SEEK_CUR);
lseek(file,328L,SEEK_CUR);
read(file,&autonode,2);
printf("\nNumber of First Autonode = %d",autonode);
for(x=autonode;x<=num_nodes;x++) {
printf("\nChecking Node #%d",x);
getnodedat(x,&node,1);
if(node.status==NODE_OFFLINE) {
printf("\nFOUND! Node #%d is OFFLINE\n",x);
node.status=NODE_WFC;
putnodedat(x,node);
lseek(file,(229L+((long)(x-1)*64L)),SEEK_SET);
read(file,nodepath,128);
truncsp(nodepath);
if(nodepath[strlen(nodepath)-1]=='\\')
nodepath[strlen(nodepath)-1]=0; /* remove '\' */
if(nodepath[0]=='.')
sprintf(path,"%s%s",sbbs_node,nodepath);
else strcpy(path,nodepath);
if(path[1]==':')
setdisk(path[0]-'A');
if(chdir(path)) {
printf("\nError changing into '%s'",path);
getnodedat(x,&node,1);
node.status=NODE_OFFLINE;
putnodedat(x,node);
exit(1); }
if(argc==1) {
execl(getenv("COMSPEC"),getenv("COMSPEC"),"/c","SBBS","l","q",
NULL); }
else {
arg[0]=argv[0];
strcpy(str,"/c"); arg[1]=str;
for(x=1;x<argc;x++) arg[1+x]=argv[x];
execv(getenv("COMSPEC"),arg); }
getnodedat(x,&node,1);
node.status=NODE_OFFLINE;
putnodedat(x,node);
return; } }
printf("\n\n\7All local nodes are in use!\n");
}
/****************************************************************************/
/* Reads the data for node number 'number' into the structure 'node' */
/* from NODE.DAB */
/* if lockit is non-zero, locks this node's record. putnodedat() unlocks it */
/****************************************************************************/
void getnodedat(uchar number, node_t *node, char lockit)
{
char str[256];
int count=0;
number--; /* make zero based */
while(count<LOOP_NODEDAB) {
lseek(nodefile,(long)number*sizeof(node_t),SEEK_SET);
if(lockit
&& lock(nodefile,(long)number*sizeof(node_t),sizeof(node_t))==-1) {
count++;
continue; }
if(read(nodefile,node,sizeof(node_t))==sizeof(node_t))
break;
count++; }
if(count==LOOP_NODEDAB)
printf("\7Error unlocking and reading NODE.DAB\n");
}
/****************************************************************************/
/* Write the data from the structure 'node' into NODE.DAB */
/* getnodedat(num,&node,1); must have been called before calling this func */
/* NOTE: ------^ the indicates the node record has been locked */
/****************************************************************************/
void putnodedat(uchar number, node_t node)
{
char str[256];
int count;
number--; /* make zero based */
lseek(nodefile,(long)number*sizeof(node_t),SEEK_SET);
if(write(nodefile,&node,sizeof(node_t))!=sizeof(node_t)) {
unlock(nodefile,(long)number*sizeof(node_t),sizeof(node_t));
printf("\7Error writing NODE.DAB for node %u\n",number+1);
return; }
unlock(nodefile,(long)number*sizeof(node_t),sizeof(node_t));
}
/****************************************************************************/
/* Truncates white-space chars off end of 'str' and terminates at first tab */
/****************************************************************************/
void truncsp(char *str)
{
char c;
str[strcspn(str,"\t")]=0;
c=strlen(str);
while(c && str[c-1]<=32) c--;
str[c]=0;
}
This diff is collapsed.
@echo off
bcc -ml -N -lm -I..;..\smb baja.c ..\ars.c
if errorlevel 1 goto end
bcc32 -WX -N -lm -I..;..\smb -ebaja32.exe baja.c ..\ars.c
:end
@echo off
bcc -N -I..;..\smb -eBAJA4OS2.EXE baja.c ..\ars.c
#line 1 "BULKMAIL.C"
/* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
#include "sbbs.h"
int bulkmailhdr(int usernum, smbmsg_t *msg, ushort msgattr, ulong offset
, ulong length, char *title)
{
char str[256];
int i,j;
node_t node;
memset(msg,0,sizeof(smbmsg_t));
memcpy(msg->hdr.id,"SHD\x1a",4);
msg->hdr.version=smb_ver();
msg->hdr.attr=msg->idx.attr=msgattr;
msg->hdr.when_written.time=msg->hdr.when_imported.time=time(NULL);
msg->hdr.when_written.zone=msg->hdr.when_imported.zone=sys_timezone;
msg->hdr.offset=msg->idx.offset=offset;
username(usernum,str);
smb_hfield(msg,RECIPIENT,strlen(str),str);
strlwr(str);
sprintf(str,"%u",usernum);
smb_hfield(msg,RECIPIENTEXT,strlen(str),str);
msg->idx.to=usernum;
strcpy(str,useron.alias);
smb_hfield(msg,SENDER,strlen(str),str);
strlwr(str);
sprintf(str,"%u",useron.number);
smb_hfield(msg,SENDEREXT,strlen(str),str);
msg->idx.from=useron.number;
strcpy(str,title);
smb_hfield(msg,SUBJECT,strlen(str),str);
strlwr(str);
msg->idx.subj=crc16(str);
smb_dfield(msg,TEXT_BODY,length);
j=smb_addmsghdr(&smb,msg,SMB_SELFPACK);
if(j)
return(j);
// smb_incdat(&smb,offset,length,1); Remove 04/15/96
lncntr=0;
bprintf("Bulk Mailed %s #%d\r\n",username(usernum,tmp),usernum);
sprintf(str,"Bulk Mailed %s #%d",username(usernum,tmp),usernum);
logline("E+",str);
useron.emails++;
logon_emails++;
useron.etoday++;
for(i=1;i<=sys_nodes;i++) { /* Tell user, if online */
getnodedat(i,&node,0);
if(node.useron==usernum && !(node.misc&NODE_POFF)
&& (node.status==NODE_INUSE || node.status==NODE_QUIET)) {
sprintf(str,text[EmailNodeMsg],node_num,useron.alias);
putnmsg(i,str);
break; } }
if(i>sys_nodes) { /* User wasn't online, so leave short msg */
sprintf(str,text[UserSentYouMail],useron.alias);
putsmsg(usernum,str); }
return(0);
}
void bulkmail(uchar *ar)
{
char str[256],str2[256],msgpath[256],title[LEN_TITLE+1],ch
,buf[SDT_BLOCK_LEN],found=0;
ushort xlat=XLAT_NONE,msgattr=0;
int i,j,k,x,file;
long l,msgs=0;
ulong length,offset;
FILE *instream;
user_t user;
smbmsg_t msg;
memset(&msg,0,sizeof(smbmsg_t));
title[0]=0;
action=NODE_SMAL;
nodesync();
if(sys_misc&SM_ANON_EM && (SYSOP || useron.exempt&FLAG('A'))
&& !noyes(text[AnonymousQ]))
msgattr|=MSG_ANONYMOUS;
sprintf(msgpath,"%sINPUT.MSG",node_dir);
sprintf(str2,"Bulk Mailing");
if(!writemsg(msgpath,nulstr,title,WM_EMAIL,0,str2)) {
bputs(text[Aborted]);
return; }
bputs(text[WritingIndx]);
CRLF;
if((i=smb_stack(&smb,SMB_STACK_PUSH))!=0) {
errormsg(WHERE,ERR_OPEN,"MAIL",i);
return; }
sprintf(smb.file,"%sMAIL",data_dir);
smb.retry_time=smb_retry_time;
if((i=smb_open(&smb))!=0) {
smb_stack(&smb,SMB_STACK_POP);
errormsg(WHERE,ERR_OPEN,smb.file,i);
return; }
if(filelength(fileno(smb.shd_fp))<1) { /* Create it if it doesn't exist */
smb.status.max_crcs=mail_maxcrcs;
smb.status.max_msgs=MAX_SYSMAIL;
smb.status.max_age=mail_maxage;
smb.status.attr=SMB_EMAIL;
if((i=smb_create(&smb))!=0) {
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
errormsg(WHERE,ERR_CREATE,smb.file,i);
return; } }
length=flength(msgpath)+2; /* +2 for translation string */
if(length&0xfff00000UL) {
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
errormsg(WHERE,ERR_LEN,smb.file,length);
return; }
if((i=smb_open_da(&smb))!=0) {
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
errormsg(WHERE,ERR_OPEN,smb.file,i);
return; }
if(sys_misc&SM_FASTMAIL)
offset=smb_fallocdat(&smb,length,1);
else
offset=smb_allocdat(&smb,length,1);
smb_close_da(&smb);
if((file=open(msgpath,O_RDONLY|O_BINARY))==-1
|| (instream=fdopen(file,"rb"))==NULL) {
smb_freemsgdat(&smb,offset,length,1);
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
errormsg(WHERE,ERR_OPEN,msgpath,O_RDONLY|O_BINARY);
return; }
setvbuf(instream,NULL,_IOFBF,2*1024);
fseek(smb.sdt_fp,offset,SEEK_SET);
xlat=XLAT_NONE;
fwrite(&xlat,2,1,smb.sdt_fp);
x=SDT_BLOCK_LEN-2; /* Don't read/write more than 255 */
while(!feof(instream)) {
memset(buf,0,x);
j=fread(buf,1,x,instream);
if((j!=x || feof(instream)) && buf[j-1]==LF && buf[j-2]==CR)
buf[j-1]=buf[j-2]=0;
fwrite(buf,j,1,smb.sdt_fp);
x=SDT_BLOCK_LEN; }
fflush(smb.sdt_fp);
fclose(instream);
j=lastuser();
x=0;
if(*ar)
for(i=1;i<=j;i++) {
user.number=i;
getuserdat(&user);
if(user.misc&(DELETED|INACTIVE))
continue;
if(chk_ar(ar,user)) {
if(found)
smb_freemsgmem(&msg);
x=bulkmailhdr(i,&msg,msgattr,offset,length,title);
if(x)
break;
msgs++;
found=1; } }
else
while(1) {
bputs(text[EnterAfterLastDestUser]);
if(!getstr(str,LEN_ALIAS,K_UPRLWR))
break;
if((i=finduser(str))!=0) {
if(found)
smb_freemsgmem(&msg);
x=bulkmailhdr(i,&msg,msgattr,offset,length,title);
if(x)
break;
msgs++; }
found=1; }
if((i=smb_open_da(&smb))!=0) {
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
errormsg(WHERE,ERR_OPEN,smb.file,i);
return; }
if(!msgs)
smb_freemsgdat(&smb,offset,length,1);
else if(msgs>1)
smb_incdat(&smb,offset,length,msgs-1);
smb_close_da(&smb);
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
smb_freemsgmem(&msg);
if(x) {
smb_freemsgdat(&smb,offset,length,1);
errormsg(WHERE,ERR_WRITE,smb.file,x);
return; }
putuserrec(useron.number,U_EMAILS,5,itoa(useron.emails,tmp,10));
putuserrec(useron.number,U_ETODAY,5,itoa(useron.etoday,tmp,10));
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@echo off
wmake OS=DOS %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=DOSX %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=OS2 %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=NT %1 %2 %3 %4 %5
if errorlevel 1 goto end
:end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@echo off
bcc -I.. -w-pro dstsedit.c
This diff is collapsed.
@echo off
wmake OS=DOS %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=DOSX %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=OS2 %1 %2 %3 %4 %5
if errorlevel 1 goto end
wmake OS=NT %1 %2 %3 %4 %5
if errorlevel 1 goto end
:end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@make -fechocfg %1 %2 %3 %4
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@echo off
bcc -w-pro -C -nos2 execsbbs.c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.