HuntnGather

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 46  →  ?path2? @ 45
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/stack.h
File deleted

Property changes:

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

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