HuntnGather

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 45  →  ?path2? @ 46
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/HuntnGather/C/Gather
File deleted

Property changes:

Deleted: amiga:protection
-----rw-d ---- ----
\ No newline at end of property

/trunk/HuntnGather/Gather/StringStack.h
File deleted

Property changes:

Deleted: amiga:protection
-----rw-d ---- ----
\ No newline at end of property

/trunk/HuntnGather/Gather/StringStack.c
/trunk/HuntnGather/Gather/Gather.c
@@ -30,10 +30,10 @@
#include "/shared/getopt.h"
#endif
 
#include "StringStack.h"
#include "stack.h"
#include "/shared/utilities.h"
 
#define PROGRAM_VERSION "1.7.5"
#define PROGRAM_VERSION "1.7.6"
 
#if defined ___AmigaOS___
/*************************************************************************/
@@ -281,7 +281,7 @@
DIR *dir;
struct dirent *entry;
#endif
stringStack *stack;
stack *stack;
dbStats *stats = NULL;
int i;
char *path;
@@ -317,12 +317,13 @@
stats->size = 0;
 
// Push the first path onto the stack.
stack = stringStackCreate((unsigned int)paths->length);
stack = stackCreate((unsigned int)paths->length);
for(i = 0; PROGRAM_RUN && i < paths->length; ++i) {
stringStackPush(stack, paths->array[i]);
fprintf(stdout, "Pushing '%s'\n", (char *)paths->array[i]);
stackPush(stack, paths->array[i], (strlen(paths->array[i]) + 1) * sizeof(char));
}
 
while(PROGRAM_RUN && !stringStackIsEmpty(stack)) {
while(PROGRAM_RUN && !stackIsEmpty(stack)) {
#if defined ___AmigaOS___
// Check if CTRL+C was pressed and abort the program.
if(SetSignal(0L, SIGBREAKF_CTRL_C) & SIGBREAKF_CTRL_C) {
@@ -330,7 +331,7 @@
continue;
}
#endif
if((path = stringStackPop(stack)) == NULL) {
if((path = (char *)stackPop(stack)) == NULL) {
break;
}
 
@@ -393,11 +394,10 @@
#else
closedir(dir);
#endif
 
free(path);
path = NULL;
 
stringStackDestroy(stack);
stackDestroy(stack);
#if defined ___AsyncIO___
CloseAsync(fp);
#else
@@ -425,11 +425,10 @@
#else
closedir(dir);
#endif
 
free(path);
path = NULL;
 
stringStackDestroy(stack);
stackDestroy(stack);
#if defined ___AsyncIO___
CloseAsync(fp);
#else
@@ -461,7 +460,7 @@
}
break;
case DIRECTORY:
stringStackPush(stack, sub);
stackPush(stack, sub, (strlen(sub) + 1) * sizeof(char));
 
++stats->dirs;
 
@@ -531,7 +530,7 @@
fprintf(stdout, "\n");
}
 
stringStackDestroy(stack);
stackDestroy(stack);
 
#if defined ___AsyncIO___
CloseAsync(fp);