Update of /cvsroot/javanetsim/IceScan/icesockets
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7653/icesockets
Modified Files:
sock_name.h iceregex.h sock_types.h
Added Files:
sock_files.h
Log Message:
no message
Index: sock_types.h
===================================================================
RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_types.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** sock_types.h 21 Dec 2006 13:11:46 -0000 1.26
--- sock_types.h 21 Dec 2006 13:59:51 -0000 1.27
***************
*** 4,7 ****
--- 4,9 ----
#include "sock_win.h"
+ #define TRAILING_SLASH '/'
+
#ifdef WIN32
#include "../defwin.h"
***************
*** 14,20 ****
#endif
#include <vector>
#include <string>
! #include <iostream> //for std
#include <algorithm>
--- 16,25 ----
#endif
+ //STD::
#include <vector>
+ #include <map>
#include <string>
! #include <fstream>
! #include <iostream>
#include <algorithm>
***************
*** 33,36 ****
--- 38,43 ----
#ifdef WIN32
#define __WIN32__
+ #undef TRAILING_SLASH
+ #define TRAILING_SLASH '\'
#else
Index: iceregex.h
===================================================================
RCS file: /cvsroot/javanetsim/IceScan/icesockets/iceregex.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** iceregex.h 21 Dec 2006 13:11:46 -0000 1.12
--- iceregex.h 21 Dec 2006 13:59:51 -0000 1.13
***************
*** 11,15 ****
#include "sock_types.h"
! #ifdef HAVE_LIBPCRE
class IceRegex {
--- 11,15 ----
#include "sock_types.h"
! #ifndef HAVE_LIBPCRE
class IceRegex {
Index: sock_name.h
===================================================================
RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_name.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** sock_name.h 21 Dec 2006 10:13:53 -0000 1.14
--- sock_name.h 21 Dec 2006 13:59:51 -0000 1.15
***************
*** 143,147 ****
if ((ipi = i_lookup_ip_intf(ip, inet_addr(destip.c_str()))) == NULL) {
errno = EHOSTUNREACH;
- DBGOUTPUT("HOST UNREACH!!!");
return "";
}
--- 143,146 ----
--- NEW FILE: sock_files.h ---
/*
* File: sock_files.h
* Author: Key
*
* Created on 21 Dec 2006, 16:54
*/
#ifndef _sock_files_H
#define _sock_files_H
#include "sock_types.h"
bool file_exists(icestring &fname){
std::ifstream in;
in.open(fname.c_str());
bool result = in.is_open();
in.close();
return result;
}
icestring find_icefile_path(char *fname){
icestring ret;
// current dir
ret.assign(fname);
if(file_exists(ret)) return ret;
// datadir
ret.assign("");
ret.append(ICESCAN_DATADIR); ret.push_back(TRAILING_SLASH); ret.append(fname);
if(file_exists(ret)) return ret;
// --data_dir
// add some code here
// default
ret.assign("");
return ret;
}
#endif /* _sock_files_H */
|