Update of /cvsroot/jsmooth/jsmooth/skeletons/util-net
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18230
Modified Files:
Makefile.win httpdownload.cpp
Log Message:
New uses the util-core/Thread class for threading
Index: httpdownload.cpp
===================================================================
RCS file: /cvsroot/jsmooth/jsmooth/skeletons/util-net/httpdownload.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** httpdownload.cpp 4 Mar 2007 23:21:44 -0000 1.2
--- httpdownload.cpp 28 Apr 2007 08:49:33 -0000 1.3
***************
*** 21,24 ****
--- 21,26 ----
#include "httpdownload.h"
+ #include "Thread.h"
+
#include <stdlib.h>
***************
*** 68,72 ****
// the requests.
//
! bool downloadHttpThread(void* param)
{
downloadThreadParams* dparam = (downloadThreadParams*)param;
--- 70,74 ----
// the requests.
//
! void downloadHttpThread(void* param)
{
downloadThreadParams* dparam = (downloadThreadParams*)param;
***************
*** 117,121 ****
params.downloadResult = false;
! downloadThread = _beginthread((void( __cdecl * )( void * ))downloadHttpThread, 0, (void*) ¶ms);
Fl::add_timeout(1.0, updateProgressBar);
Fl::run();
--- 119,125 ----
params.downloadResult = false;
! Thread th;
! th.start(downloadHttpThread, ¶ms);
!
Fl::add_timeout(1.0, updateProgressBar);
Fl::run();
Index: Makefile.win
===================================================================
RCS file: /cvsroot/jsmooth/jsmooth/skeletons/util-net/Makefile.win,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile.win 5 Mar 2007 07:00:54 -0000 1.2
--- Makefile.win 28 Apr 2007 08:49:33 -0000 1.3
***************
*** 26,30 ****
ar r $(BIN) $(OBJ)
ranlib $(BIN)
! $(CPP) -g $(OBJ) testmain.o -o test.exe $(LIBS) ../util-core/util-core.a
$(PROJECTNAME).a: $(OBJ) testmain.o
--- 26,30 ----
ar r $(BIN) $(OBJ)
ranlib $(BIN)
! $(CPP) -g $(OBJ) ../util-core/util-core.a testmain.o -o test.exe $(LIBS)
$(PROJECTNAME).a: $(OBJ) testmain.o
|