Changeset 91
- Timestamp:
- Dec 2, 2005 10:28:52 PM (19 years ago)
- Location:
- pjproject/branches/pjproject-0.2/pjlib/src/pj
- Files:
-
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/pjproject-0.2/pjlib/src/pj/array.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/array.c 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/array.c,v 1.1 2005/12/02 20:02:28 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/array.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/array.h 3 5/05/05 11:34p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/array.h,v 1.1 2005/12/02 20:02:28 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/array_i.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/array_i.h 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/array_i.h,v 1.1 2005/12/02 20:02:28 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/compat.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/compat.h 6 8/24/05 10:27a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/compat.h,v 1.1 2005/12/02 20:02:28 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/config.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/config.c 3 5/28/05 7:12a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/config.c,v 1.1 2005/12/02 20:02:28 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 38 38 #if defined(PJ_WIN32) 39 39 PJ_LOG(3, (id, " PJ_WIN32 : %d", PJ_WIN32)); 40 #if defined(PJ_WIN32_WINNT) 40 41 PJ_LOG(3, (id, " PJ_WIN32_WINNT : %d", PJ_WIN32_WINNT)); 42 #endif 41 43 #endif 42 44 #if defined(PJ_LINUX) -
pjproject/branches/pjproject-0.2/pjlib/src/pj/config.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/config.h 7 5/28/05 11:00a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/config.h,v 1.1 2005/12/02 20:02:28 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 28 28 29 29 #ifndef PJ_HAS_SYS_TYPES_H 30 # define PJ_HAS_SYS_TYPES_H 130 # define PJ_HAS_SYS_TYPES_H 0 31 31 #endif 32 32 #ifndef PJ_HAS_STDDEF_H … … 74 74 #endif 75 75 76 #ifdef _WIN32_WCE 77 # undef PJ_WIN32 78 # define PJ_WIN32 2 79 # define PJ_WIN32_WINCE 1 80 # define PJ_GUID_TYPE 1 81 #endif 82 76 83 /* 77 84 * Linux … … 86 93 */ 87 94 #ifndef PJ_HAS_HIGH_RES_TIMER 88 # define PJ_HAS_HIGH_RES_TIMER 195 # define PJ_HAS_HIGH_RES_TIMER 0 89 96 #endif 90 97 … … 93 100 */ 94 101 #if !defined(PJ_HAS_PENTIUM) 95 # define PJ_HAS_PENTIUM 1102 # define PJ_HAS_PENTIUM 0 96 103 #endif 97 104 … … 121 128 * I/O Queue uses IOCP on WinNT, and fallback to select() on others 122 129 */ 123 #if defined(PJ_WIN32) && defined(PJ_WIN32_WINNT) && PJ_WIN32_WINNT >= 0x0400130 #if defined(PJ_WIN32) //&& defined(PJ_WIN32_WINNT) && PJ_WIN32_WINNT >= 0x0400 124 131 # define PJ_IOQUEUE_USE_WIN32_IOCP (0) 125 132 # define PJ_IOQUEUE_USE_SELECT (1) -
pjproject/branches/pjproject-0.2/pjlib/src/pj/except.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/except.c 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/except.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/except.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/except.h 5 6/14/05 2:15p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/except.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/fifobuf.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/fifobuf.c 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/fifobuf.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/fifobuf.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/fifobuf.h 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/fifobuf.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/fwd.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/fwd.h 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/fwd.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/guid.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/guid.c 9 6/14/05 2:15p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/guid.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 40 40 #ifndef PJ_GUID_TYPE 41 41 # define PJ_GUID_TYPE PJ_GUID_SIMPLE 42 #endif 43 44 #if defined(PJ_WIN32_WINCE) && PJ_GUID_TYPE==PJ_GUID_COCREATEGUID 45 #include <windows.h> 46 #include <winsock2.h> 47 #include <wincrypt.h> 42 48 #endif 43 49 … … 272 278 { 273 279 GUID guid; 280 #if !defined(PJ_WIN32_WINCE) 274 281 CoCreateGuid(&guid); 282 #else 283 char bits[16]; 284 HCRYPTPROV hCryptProv = 0; 285 286 if (!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { 287 return NULL; 288 } 289 290 if (!CryptGenRandom(hCryptProv, 16, bits)) { 291 return NULL; 292 } 293 294 // set the variant 295 bits[8] &= 0x3f; 296 bits[8] |= 2 << 6; 297 298 // set the version 299 bits[7] &= 0x0f; 300 bits[7] |= 4 << 4; 301 302 if (hCryptProv != 0) 303 CryptReleaseContext(hCryptProv, 0); 304 305 pj_memcpy(&guid, bits, 16); 306 #endif // WINCE 307 275 308 pj_guid_to_str( &guid, str ); 276 309 return str; -
pjproject/branches/pjproject-0.2/pjlib/src/pj/hash.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/hash.c 5 5/12/05 9:53p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/hash.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/hash.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/hash.h 4 5/05/05 11:34p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/hash.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/ioqueue.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/ioqueue.h 6 5/16/05 10:12p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/ioqueue.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/ioqueue_select.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/ioqueue_select.c 9 6/21/05 12:37a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/ioqueue_select.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/ioqueue_winnt.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/ioqueue_winnt.c 7 5/24/05 12:16a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/ioqueue_winnt.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/list.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/list.c 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/list.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/list.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/list.h 6 8/24/05 10:27a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/list.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/list_i.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/list_i.h 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/list_i.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/log.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/log.c 4 6/13/05 9:35p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/log.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/log.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/log.h 4 6/13/05 9:35p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/log.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/log_stdout.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/log_stdout.c 1 6/13/05 7:09p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/log_stdout.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 23 23 #include <pj/log.h> 24 24 #include <pj/os.h> 25 26 #if !defined(PJ_WIN32_WINCE) 25 27 26 28 #define CLR_FATAL (PJ_TERM_COLOR_BRIGHT | PJ_TERM_COLOR_R) … … 61 63 } 62 64 65 #else 66 67 static void term_set_color(int level) 68 { 69 } 70 71 PJ_DEF(void) pj_log_to_stdout(int level, const char *buffer, int len) 72 { 73 } 74 75 #endif 76 -
pjproject/branches/pjproject-0.2/pjlib/src/pj/md5.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/md5.c 2 4/17/05 11:59a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/md5.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 44 44 45 45 */ 46 /* $Id: md5.c,v 1. 6 2002/04/13 19:20:28 lpdExp $ */46 /* $Id: md5.c,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 47 47 /* 48 48 Independent implementation of MD5 (RFC 1321). -
pjproject/branches/pjproject-0.2/pjlib/src/pj/md5.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/md5.h 3 5/05/05 11:34p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/md5.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 44 44 45 45 */ 46 /* $Id: md5.h,v 1. 4 2002/04/13 19:20:28 lpdExp $ */46 /* $Id: md5.h,v 1.1 2005/12/02 20:02:29 nn Exp $ */ 47 47 /* 48 48 Independent implementation of MD5 (RFC 1321). -
pjproject/branches/pjproject-0.2/pjlib/src/pj/os.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/os.h 6 5/05/05 11:34p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/os.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/os_unix.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/os_unix.c 5 6/24/05 4:38p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/os_unix.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/os_win32.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/os_win32.c 7 6/21/05 12:37a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/os_win32.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 27 27 #include <pj/guid.h> 28 28 #include <stddef.h> 29 #include <sys/timeb.h> 29 #ifndef PJ_WIN32_WINCE 30 # include <sys/timeb.h> 31 #else 32 33 # include <windows.h> 34 35 struct timeb { 36 time_t time; 37 unsigned short millitm; 38 }; 39 40 static void ftime( struct timeb *tb ) 41 { 42 SYSTEMTIME st; 43 int days, years, leapyears; 44 45 if(tb == NULL) 46 { 47 //nlSetError(NL_NULL_POINTER); 48 assert(tb); 49 return; 50 } 51 GetSystemTime(&st); 52 leapyears = (st.wYear - 1970 + 1) / 4; 53 years = st.wYear - 1970 - leapyears; 54 55 days = years * 365 + leapyears * 366; 56 57 switch (st.wMonth) { 58 case 1: 59 case 3: 60 case 5: 61 case 7: 62 case 8: 63 case 10: 64 case 12: 65 days += 31; 66 break; 67 case 4: 68 case 6: 69 case 9: 70 case 11: 71 days += 30; 72 break; 73 case 2: 74 days += (st.wYear%4 == 0) ? 29 : 28; 75 break; 76 default: 77 break; 78 } 79 days += st.wDay; 80 tb->time = days * 86400 + st.wHour * 3600 + st.wMinute * 60 + st.wSecond; 81 tb->millitm = st.wMilliseconds; 82 } 83 84 time_t time(time_t *t) 85 { 86 struct timeb tb; 87 88 ftime(&tb); 89 *t = tb.time; 90 91 return *t; 92 } 93 #endif 94 30 95 #include <time.h> 31 96 #include <stdlib.h> … … 321 386 #if defined(PJ_WIN32_WINNT) && PJ_WIN32_WINNT >= 0x0400 322 387 return InterlockedIncrement(&atomic_var->value); 388 #elif defined(PJ_WIN32_WINCE) 389 return InterlockedIncrement(&atomic_var->value); 323 390 #else 324 391 # error Fix Me … … 332 399 #if defined(PJ_WIN32_WINNT) && PJ_WIN32_WINNT >= 0x0400 333 400 return InterlockedDecrement(&atomic_var->value); 401 #elif defined(PJ_WIN32_WINCE) 402 return InterlockedIncrement(&atomic_var->value); 334 403 #else 335 404 # error Fix me … … 664 733 PJ_DEF(pj_status_t) pj_time_decode(const pj_time_val *tv, pj_parsed_time *pt) 665 734 { 735 #if defined(PJ_WIN32_WINCE) 736 SYSTEMTIME local_time; 737 GetLocalTime(&local_time); 738 739 pt->year = local_time.wYear; 740 pt->mon = local_time.wMonth; 741 pt->day = local_time.wDay; 742 pt->hour = local_time.wHour; 743 pt->min = local_time.wMinute; 744 pt->sec = local_time.wSecond; 745 pt->wday = local_time.wDayOfWeek; 746 pt->yday = 0; //note this 747 pt->msec = local_time.wMilliseconds; 748 #else 666 749 struct tm *local_time; 667 668 750 local_time = localtime((time_t*)&tv->sec); 669 751 … … 677 759 pt->yday = local_time->tm_yday; 678 760 pt->msec = tv->msec; 761 #endif 762 679 763 680 764 return PJ_OK; … … 701 785 * Terminal 702 786 */ 787 #if !defined(PJ_WIN32_WINCE) 703 788 704 789 static WORD pj_color_to_os_attr(pj_color_t color) … … 758 843 } 759 844 845 #else 846 847 static short pj_color_to_os_attr(pj_color_t color) 848 { 849 return 0; 850 } 851 852 static pj_color_t os_attr_to_pj_color(short attr) 853 { 854 return 0; 855 } 856 857 858 /** 859 * Set terminal color. 860 */ 861 PJ_DEF(pj_status_t) pj_term_set_color(pj_color_t color) 862 { 863 return PJ_OK; 864 } 865 866 /** 867 * Get current terminal foreground color. 868 */ 869 PJ_DEF(pj_color_t) pj_term_get_color(void) 870 { 871 return 0; 872 } 873 874 875 #endif 876 -
pjproject/branches/pjproject-0.2/pjlib/src/pj/pool.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/pool.c 5 5/24/05 10:29p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/pool.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/pool.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/pool.h 8 6/14/05 2:15p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/pool.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/pool_caching.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/pool_caching.c 3 6/14/05 2:15p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/pool_caching.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/pool_dbg_win32.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/pool_dbg_win32.c 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/pool_dbg_win32.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/pool_i.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/pool_i.h 3 5/12/05 9:53p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/pool_i.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/pool_policy.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/pool_policy.c 1 5/12/05 9:53p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/pool_policy.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/rbtree.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/rbtree.c 3 4/17/05 11:59a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/rbtree.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/rbtree.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/rbtree.h 3 4/17/05 11:59a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/rbtree.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/scanner.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/scanner.c 5 6/04/05 4:29p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/scanner.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 495 495 return -1; 496 496 } 497 return strnicmp(scanner->current, s, len); 497 //return strnicmp(scanner->current, s, len); 498 return strncasecmp(scanner->current, s, len); 498 499 } 499 500 -
pjproject/branches/pjproject-0.2/pjlib/src/pj/scanner.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/scanner.h 7 6/04/05 4:29p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/scanner.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/scanner_i.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/scanner_i.h 4 6/04/05 4:29p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/scanner_i.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/sock.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/sock.c 5 5/28/05 9:59a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/sock.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 23 23 #include <pj/sock.h> 24 24 #include <pj/pool.h> 25 #if !PJ_WIN32_WINCE 25 26 #include <errno.h> 27 #endif 26 28 27 29 #if !PJ_FUNCTIONS_ARE_INLINED … … 125 127 PJ_DEF(pj_status_t) pj_sock_getlasterror(void) 126 128 { 127 #if defined(PJ_WIN32) && PJ_WIN32==1129 #if defined(PJ_WIN32) && (PJ_WIN32==1 || PJ_WIN32==2) 128 130 return WSAGetLastError(); 129 131 #else -
pjproject/branches/pjproject-0.2/pjlib/src/pj/sock.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/sock.h 7 5/28/05 9:59a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/sock.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 37 37 # define WIN32_LEAN_AND_MEAN 38 38 # include <winsock2.h> 39 #elif defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE==1 40 # include <winsock.h> 39 41 #else 40 42 # include <sys/types.h> -
pjproject/branches/pjproject-0.2/pjlib/src/pj/sock_i.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/sock_i.h 3 5/24/05 12:14a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/sock_i.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 150 150 pj_uint32_t *val) 151 151 { 152 #if defined(PJ_WIN32) && PJ_WIN32==1152 #if defined(PJ_WIN32) && (PJ_WIN32==1 || PJ_WIN32==2) 153 153 return ioctlsocket(sock, cmd, (unsigned long*)val); 154 154 #else -
pjproject/branches/pjproject-0.2/pjlib/src/pj/string.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/string.c 6 6/14/05 2:15p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/string.c,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 25 25 #include <ctype.h> /* isspace() */ 26 26 #include <stdlib.h> /* rand() */ 27 28 #if defined(PJ_WIN32_WINCE) 29 30 int strncasecmp( const char *s1, const char *s2, size_t count ) { 31 int i; 32 char *r1 = s1; 33 char *r2 = s2; 34 35 for (i=0; i<count; i++) { 36 if (*r1=='\0' && *r2=='\0') 37 break; 38 if (*r1=='\0' || *r2=='\0') 39 return -1; 40 if (tolower(*r1)!=tolower(*r2)) { 41 return -1; 42 } 43 r1++; 44 r2++; 45 } 46 47 return 0; 48 } 49 50 int strcasecmp( const char *s1, const char *s2 ) 51 { 52 int i = 0; 53 char *r1 = s1; 54 char *r2 = s2; 55 56 while (1) { 57 if (*r1=='\0' && *r2=='\0') 58 break; 59 if (*r1=='\0' || *r2=='\0') 60 return -1; 61 if (tolower(*r1)!=tolower(*r2)) { 62 return -1; 63 } 64 r1++; 65 r2++; 66 i++; 67 if (i>1024) return -1; 68 } 69 70 return 0; 71 } 72 73 #endif 27 74 28 75 #if PJ_FUNCTIONS_ARE_INLINED==0 -
pjproject/branches/pjproject-0.2/pjlib/src/pj/string.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/string.h 5 6/14/05 2:15p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/string.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 33 33 #include <string.h> 34 34 35 PJ_BEGIN_DECL36 37 /**38 * @defgroup PJ_PSTR String Operations39 * @ingroup PJ_DS40 * @{41 */42 43 35 #if defined(PJ_WIN32) && PJ_WIN32==1 44 36 # define strcasecmp stricmp 45 37 # define strncasecmp strnicmp 38 # define snprintf _snprintf 39 # define vsnprintf _vsnprintf 40 #elif defined(PJ_WIN32_WINCE) 41 //# define strcasecmp stricmp 42 //# define strncasecmp strnicmp 46 43 # define snprintf _snprintf 47 44 # define vsnprintf _vsnprintf … … 51 48 #endif 52 49 50 51 PJ_BEGIN_DECL 52 53 /** 54 * @defgroup PJ_PSTR String Operations 55 * @ingroup PJ_DS 56 * @{ 57 */ 58 53 59 /** 54 60 * Create string initializer from a normal C string. … … 387 393 * @return the number of characters printed. 388 394 */ 389 #ifdef PJ_WIN32 395 #if defined(PJ_WIN32) && !defined(PJ_WIN32_WINCE) 396 # define pj_vsnprintf _vsnprintf 390 397 # define pj_snprintf _snprintf 391 398 #else 399 # define pj_vsnprintf vsnprintf 392 400 # define pj_snprintf snprintf 393 401 #endif -
pjproject/branches/pjproject-0.2/pjlib/src/pj/string_i.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/string_i.h 5 8/31/05 9:05p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/string_i.h,v 1.1 2005/12/02 20:02:30 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library … … 201 201 return (int)diff; 202 202 } else { 203 return strn icmp(str1->ptr, str2->ptr, str1->slen);203 return strncasecmp(str1->ptr, str2->ptr, str1->slen);//return strnicmp(str1->ptr, str2->ptr, str1->slen); 204 204 } 205 205 } … … 207 207 PJ_IDEF(int) pj_stricmp2( const pj_str_t *str1, const char *str2) 208 208 { 209 return (str1->ptr && str2) ? strn icmp(str1->ptr, str2, str1->slen) :210 (str1->ptr==str2 ? 0 : 1);209 return (str1->ptr && str2) ? strncasecmp(str1->ptr, str2, str1->slen) ://return (str1->ptr && str2) ? strnicmp(str1->ptr, str2, str1->slen) : 210 (str1->ptr==str2 ? 0 : 1); 211 211 } 212 212 … … 214 214 pj_size_t len) 215 215 { 216 return (str1->ptr && str2->ptr) ? strn icmp(str1->ptr, str2->ptr, len) :217 (str1->ptr == str2->ptr ? 0 : 1);216 return (str1->ptr && str2->ptr) ? strncasecmp(str1->ptr, str2->ptr, len) ://return (str1->ptr && str2->ptr) ? strnicmp(str1->ptr, str2->ptr, len) : 217 (str1->ptr == str2->ptr ? 0 : 1); 218 218 } 219 219 … … 221 221 pj_size_t len) 222 222 { 223 return (str1->ptr && str2) ? strn icmp(str1->ptr, str2, len) :223 return (str1->ptr && str2) ? strncasecmp(str1->ptr, str2, len) ://return (str1->ptr && str2) ? strnicmp(str1->ptr, str2, len) : 224 224 (str1->ptr == str2 ? 0 : 1); 225 225 } -
pjproject/branches/pjproject-0.2/pjlib/src/pj/timer.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/timer.c 4 5/03/05 9:07a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/timer.c,v 1.1 2005/12/02 20:02:31 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/timer.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/timer.h 5 5/03/05 9:07a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/timer.h,v 1.1 2005/12/02 20:02:31 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/timer_i.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/timer_i.h 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/timer_i.h,v 1.1 2005/12/02 20:02:31 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/types.c
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/types.c 2 2/24/05 10:34a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/types.c,v 1.1 2005/12/02 20:02:31 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/types.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/types.h 7 5/12/05 9:53p Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/types.h,v 1.1 2005/12/02 20:02:31 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library -
pjproject/branches/pjproject-0.2/pjlib/src/pj/xml.h
r88 r91 1 /* $Header: / pjproject/pjlib/src/pj/xml.h 2 6/17/05 12:27a Bennylp $ */1 /* $Header: /cvs/pjproject-0.2.9.3/pjlib/src/pj/xml.h,v 1.1 2005/12/02 20:02:31 nn Exp $ */ 2 2 /* 3 3 * PJLIB - PJ Foundation Library
Note: See TracChangeset
for help on using the changeset viewer.