home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The AGA Experience 2
/
agavol2.iso
/
software
/
utilities
/
comms
/
metamail-2.3a
/
elm113diffs.lha
/
f2.diff
< prev
next >
Wrap
Text File
|
1992-05-02
|
4KB
|
154 lines
*** Elm113/f2.c Thu Mar 26 02:40:18 1992
--- new/f2.c Thu Apr 30 16:03:34 1992
***************
*** 8,13 ****
--- 8,15 ----
#include <proto/exec.h>
#endif
#ifdef DICE
+ #include <clib/dos_protos.h>
+ #include <clib/exec_protos.h>
#include <errno.h>
#endif
***************
*** 44,50 ****
long pos;
FILE *in,*keep,*store;
struct MailItem *I;
! char Name[MAX_LINELENGTH];
char Text[MAX_LINELENGTH]; /* large enough for a single line? */
BOOL flags_written,folder_has_changed;
BOOL tmp_AlwaysKeep,tmp_AlwaysDelete;
--- 46,52 ----
long pos;
FILE *in,*keep,*store;
struct MailItem *I;
! char *Name;
char Text[MAX_LINELENGTH]; /* large enough for a single line? */
BOOL flags_written,folder_has_changed;
BOOL tmp_AlwaysKeep,tmp_AlwaysDelete;
***************
*** 52,59 ****
int to_delete,to_store,to_keep;
int save_num=1;
char buffer[80];
! char TitleString[1024];
tmp_AlwaysKeep = AlwaysKeep;
tmp_AlwaysDelete = AlwaysDelete;
--- 54,66 ----
int to_delete,to_store,to_keep;
int save_num=1;
char buffer[80];
! char *TitleString;
+ if (((Name = malloc(MAX_LINELENGTH)) == NULL) ||
+ ((TitleString = malloc(MAX_LINELENGTH)) == NULL)) {
+ status_msg("Unable to allocate memory.",200L);
+ clean_exit(5);
+ }
tmp_AlwaysKeep = AlwaysKeep;
tmp_AlwaysDelete = AlwaysDelete;
***************
*** 194,199 ****
--- 201,208 ----
status_msg(buffer,0L);
else {
status_msg("Folder unchanged.",100L);
+ free(Name);
+ free(TitleString);
return;
}
***************
*** 206,211 ****
--- 215,222 ----
fprintf(stderr,"elm: cannot rename folder to backup\n");
UnLockFile(FolderName);
UnLockFile(Name);
+ free(Name);
+ free(TitleString);
return;
}
***************
*** 226,231 ****
--- 237,244 ----
Execute(exec,0L,0L);
UnLockFile(FolderName);
UnLockFile(Name);
+ free(Name);
+ free(TitleString);
return;
}
***************
*** 292,297 ****
--- 305,311 ----
fwrite(FileBuffer,1L,len,out);
}
}
+ #if 0
/*
while(getline(in,Text,&pos) && (pos<=I->ArtikelEnd)) {
if (pos<I->ArtikelEnd) {
***************
*** 330,335 ****
--- 344,350 ----
}
}
*/
+ #endif
/* -------------------------------------------------------------------------- */
}
***************
*** 342,347 ****
--- 357,364 ----
UnLockFile(Name);
if (!KeepBackup) remove(Name);
+ free(Name);
+ free(TitleString);
}
***************
*** 489,494 ****
--- 506,512 ----
long try = 0L;
while(stat(FolderName,&s)) {
char msg[80];
+ #ifdef EBUSY
if (errno!=EBUSY) { /* resource is busy? */
fprintf(stderr,"elm: error scanning folder, code %d\n",errno);
*laenge=0L;
***************
*** 495,500 ****
--- 513,519 ----
*datum=0L;
return;
}
+ #endif
sprintf(msg,"Folder is busy. Stand by. Resynchronizing... try #%ld",++try);
status_msg(msg,0L);
Delay(100L);
***************
*** 511,520 ****
--- 530,541 ----
long try = 0L;
while(stat(FolderName,&s)) {
char msg[80];
+ #ifdef EBUSY
if (errno!=EBUSY) { /* resource is busy? */
fprintf(stderr,"elm: error scanning folder, code %d\n",errno);
return(TRUE);
}
+ #endif
sprintf(msg,"Folder is busy. Stand by. Resynchronizing... try #%ld",++try);
status_msg(msg,0L);
Delay(100L);