Skip to content

Commit

Permalink
Improving content fetching capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankkumar committed Jul 10, 2011
1 parent 8df964e commit 7832c73
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 11 deletions.
Empty file modified CurlWrapper.cpp
100644 → 100755
Empty file.
Empty file modified FileHandle.cpp
100644 → 100755
Empty file.
Empty file modified FileHandle.h
100644 → 100755
Empty file.
Empty file modified Logs.cpp
100644 → 100755
Empty file.
Empty file modified Logs.h
100644 → 100755
Empty file.
Empty file modified Makefile
100644 → 100755
Empty file.
Empty file modified README
100644 → 100755
Empty file.
Empty file modified classProb.h
100644 → 100755
Empty file.
7 changes: 0 additions & 7 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,4 @@
#define FetchFileFromFTP true
#define LOGFILEPATH "./Logs/logs.txt"


void ToLogs(const char* log){
printf("%s\n",log);
// logFile = fopen("logs.txt", "a");
//fputs(log, logFile);
return;
}
#endif
9 changes: 5 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ [email protected]
****************************************************************************/
#include "includes.h"
#include "ContentParser.h"
#include "CurlWrapper.h"
#include "FileHandle.h"
#include "Logs.h"

s
int main()
{

Expand All @@ -40,7 +41,7 @@ int main()

// Processing begins
if (CurlVar->FetchContentFromWebpage(&strContent) == -1) {
delete C; //Clean up
delete CurlVar; //Clean up
Logs::WriteLine("Going to sleep for 5 seconds");
sleep(5);
continue;
Expand All @@ -59,7 +60,7 @@ int main()

if (content[ixE] == '\0')
break;

memcpy(FileInfo, content + ixS, ixE - ixS);
FileInfo[ixE - ixS] = '\0';
while (content[ixE] == '\n')
Expand All @@ -85,7 +86,7 @@ int main()
F->Action();
delete F;
}
delete C; //Clean up
delete CurlVar; //Clean up
Logs::WriteLine("Going to sleep for 5 seconds", true);
sleep(5);
}
Expand Down
Empty file modified man.txt
100644 → 100755
Empty file.

0 comments on commit 7832c73

Please sign in to comment.