diff options
Diffstat (limited to 'projs/CodeBlocks/Win32Extra')
19 files changed, 0 insertions, 1437 deletions
diff --git a/projs/CodeBlocks/Win32Extra/LiberationSans-Regular.ttf b/projs/CodeBlocks/Win32Extra/LiberationSans-Regular.ttf Binary files differdeleted file mode 100644 index a788fbdd..00000000 --- a/projs/CodeBlocks/Win32Extra/LiberationSans-Regular.ttf +++ /dev/null diff --git a/projs/CodeBlocks/Win32Extra/X11/XF86keysym.h b/projs/CodeBlocks/Win32Extra/X11/XF86keysym.h deleted file mode 100644 index ee783c2f..00000000 --- a/projs/CodeBlocks/Win32Extra/X11/XF86keysym.h +++ /dev/null @@ -1,189 +0,0 @@ -/* $XFree86: xc/include/XF86keysym.h,v 1.16 2003/02/11 02:51:10 dawes Exp $ */ - -/* - * XFree86 vendor specific keysyms. - * - * The XFree86 keysym range is 0x10080001 - 0x1008FFFF. - * - * When adding new entries, the xc/lib/XKeysymDB file should also be - * updated to make the new entries visible to Xlib. - */ - -/* - * ModeLock - * - * This one is old, and not really used any more since XKB offers this - * functionality. - */ - -#define XF86XK_ModeLock 0x1008FF01 /* Mode Switch Lock */ - -/* - * Note, 0x1008FF02 - 0x1008FF0F are free and should be used for misc new - * keysyms that don't fit into any of the groups below. - * - * 0x1008FF64, 0x1008FF6F, 0x1008FF71, 0x1008FF83 are no longer used, - * and should be used first for new keysyms. - * - * Check in keysymdef.h for generic symbols before adding new XFree86-specific - * symbols here. - */ - - -/* - * Keys found on some "Internet" keyboards. - */ -#define XF86XK_Standby 0x1008FF10 -#define XF86XK_AudioLowerVolume 0x1008FF11 -#define XF86XK_AudioMute 0x1008FF12 -#define XF86XK_AudioRaiseVolume 0x1008FF13 -#define XF86XK_AudioPlay 0x1008FF14 -#define XF86XK_AudioStop 0x1008FF15 -#define XF86XK_AudioPrev 0x1008FF16 -#define XF86XK_AudioNext 0x1008FF17 -#define XF86XK_HomePage 0x1008FF18 -#define XF86XK_Mail 0x1008FF19 -#define XF86XK_Start 0x1008FF1A -#define XF86XK_Search 0x1008FF1B -#define XF86XK_AudioRecord 0x1008FF1C - -/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */ -#define XF86XK_Calculator 0x1008FF1D -#define XF86XK_Memo 0x1008FF1E -#define XF86XK_ToDoList 0x1008FF1F -#define XF86XK_Calendar 0x1008FF20 -#define XF86XK_PowerDown 0x1008FF21 -#define XF86XK_ContrastAdjust 0x1008FF22 -#define XF86XK_RockerUp 0x1008FF23 -#define XF86XK_RockerDown 0x1008FF24 -#define XF86XK_RockerEnter 0x1008FF25 - -/* Some more "Internet" keyboard symbols */ -#define XF86XK_Back 0x1008FF26 -#define XF86XK_Forward 0x1008FF27 -#define XF86XK_Stop 0x1008FF28 -#define XF86XK_Refresh 0x1008FF29 -#define XF86XK_PowerOff 0x1008FF2A -#define XF86XK_WakeUp 0x1008FF2B -#define XF86XK_Eject 0x1008FF2C -#define XF86XK_ScreenSaver 0x1008FF2D -#define XF86XK_WWW 0x1008FF2E -#define XF86XK_Sleep 0x1008FF2F -#define XF86XK_Favorites 0x1008FF30 -#define XF86XK_AudioPause 0x1008FF31 -#define XF86XK_AudioMedia 0x1008FF32 -#define XF86XK_MyComputer 0x1008FF33 -#define XF86XK_VendorHome 0x1008FF34 -#define XF86XK_LightBulb 0x1008FF35 -#define XF86XK_Shop 0x1008FF36 -#define XF86XK_History 0x1008FF37 -#define XF86XK_OpenURL 0x1008FF38 -#define XF86XK_AddFavorite 0x1008FF39 -#define XF86XK_HotLinks 0x1008FF3A -#define XF86XK_BrightnessAdjust 0x1008FF3B -#define XF86XK_Finance 0x1008FF3C -#define XF86XK_Community 0x1008FF3D -#define XF86XK_AudioRewind 0x1008FF3E -#define XF86XK_XF86BackForward 0x1008FF3F -#define XF86XK_Launch0 0x1008FF40 -#define XF86XK_Launch1 0x1008FF41 -#define XF86XK_Launch2 0x1008FF42 -#define XF86XK_Launch3 0x1008FF43 -#define XF86XK_Launch4 0x1008FF44 -#define XF86XK_Launch5 0x1008FF45 -#define XF86XK_Launch6 0x1008FF46 -#define XF86XK_Launch7 0x1008FF47 -#define XF86XK_Launch8 0x1008FF48 -#define XF86XK_Launch9 0x1008FF49 -#define XF86XK_LaunchA 0x1008FF4A -#define XF86XK_LaunchB 0x1008FF4B -#define XF86XK_LaunchC 0x1008FF4C -#define XF86XK_LaunchD 0x1008FF4D -#define XF86XK_LaunchE 0x1008FF4E -#define XF86XK_LaunchF 0x1008FF4F - -#define XF86XK_ApplicationLeft 0x1008FF50 -#define XF86XK_ApplicationRight 0x1008FF51 -#define XF86XK_Book 0x1008FF52 -#define XF86XK_CD 0x1008FF53 -#define XF86XK_Calculater 0x1008FF54 -#define XF86XK_Clear 0x1008FF55 -#define XF86XK_Close 0x1008FF56 -#define XF86XK_Copy 0x1008FF57 -#define XF86XK_Cut 0x1008FF58 -#define XF86XK_Display 0x1008FF59 -#define XF86XK_DOS 0x1008FF5A -#define XF86XK_Documents 0x1008FF5B -#define XF86XK_Excel 0x1008FF5C -#define XF86XK_Explorer 0x1008FF5D -#define XF86XK_Game 0x1008FF5E -#define XF86XK_Go 0x1008FF5F -#define XF86XK_iTouch 0x1008FF60 -#define XF86XK_LogOff 0x1008FF61 -#define XF86XK_Market 0x1008FF62 -#define XF86XK_Meeting 0x1008FF63 -#define XF86XK_MenuKB 0x1008FF65 -#define XF86XK_MenuPB 0x1008FF66 -#define XF86XK_MySites 0x1008FF67 -#define XF86XK_New 0x1008FF68 -#define XF86XK_News 0x1008FF69 -#define XF86XK_OfficeHome 0x1008FF6A -#define XF86XK_Open 0x1008FF6B -#define XF86XK_Option 0x1008FF6C -#define XF86XK_Paste 0x1008FF6D -#define XF86XK_Phone 0x1008FF6E -#define XF86XK_Q 0x1008FF70 -#define XF86XK_Reply 0x1008FF72 -#define XF86XK_Reload 0x1008FF73 -#define XF86XK_RotateWindows 0x1008FF74 -#define XF86XK_RotationPB 0x1008FF75 -#define XF86XK_RotationKB 0x1008FF76 -#define XF86XK_Save 0x1008FF77 -#define XF86XK_ScrollUp 0x1008FF78 -#define XF86XK_ScrollDown 0x1008FF79 -#define XF86XK_ScrollClick 0x1008FF7A -#define XF86XK_Send 0x1008FF7B -#define XF86XK_Spell 0x1008FF7C -#define XF86XK_SplitScreen 0x1008FF7D -#define XF86XK_Support 0x1008FF7E -#define XF86XK_TaskPane 0x1008FF7F -#define XF86XK_Terminal 0x1008FF80 -#define XF86XK_Tools 0x1008FF81 -#define XF86XK_Travel 0x1008FF82 -#define XF86XK_UserPB 0x1008FF84 -#define XF86XK_User1KB 0x1008FF85 -#define XF86XK_User2KB 0x1008FF86 -#define XF86XK_Video 0x1008FF87 -#define XF86XK_WheelButton 0x1008FF88 -#define XF86XK_Word 0x1008FF89 -#define XF86XK_Xfer 0x1008FF8A -#define XF86XK_ZoomIn 0x1008FF8B -#define XF86XK_ZoomOut 0x1008FF8C - -#define XF86XK_Away 0x1008FF8D -#define XF86XK_Messenger 0x1008FF8E -#define XF86XK_WebCam 0x1008FF8F -#define XF86XK_MailForward 0x1008FF90 -#define XF86XK_Pictures 0x1008FF91 -#define XF86XK_Music 0x1008FF92 - -/* Keys for special action keys (hot keys) */ -#define XF86XK_Switch_VT_1 0x1008FE01 -#define XF86XK_Switch_VT_2 0x1008FE02 -#define XF86XK_Switch_VT_3 0x1008FE03 -#define XF86XK_Switch_VT_4 0x1008FE04 -#define XF86XK_Switch_VT_5 0x1008FE05 -#define XF86XK_Switch_VT_6 0x1008FE06 -#define XF86XK_Switch_VT_7 0x1008FE07 -#define XF86XK_Switch_VT_8 0x1008FE08 -#define XF86XK_Switch_VT_9 0x1008FE09 -#define XF86XK_Switch_VT_10 0x1008FE0A -#define XF86XK_Switch_VT_11 0x1008FE0B -#define XF86XK_Switch_VT_12 0x1008FE0C - -#define XF86XK_Ungrab 0x1008FE20 -#define XF86XK_ClearGrab 0x1008FE21 -#define XF86XK_Next_VMode 0x1008FE22 -#define XF86XK_Prev_VMode 0x1008FE23 - - diff --git a/projs/CodeBlocks/Win32Extra/builtin.c b/projs/CodeBlocks/Win32Extra/builtin.c deleted file mode 100644 index f2883c7b..00000000 --- a/projs/CodeBlocks/Win32Extra/builtin.c +++ /dev/null @@ -1,25 +0,0 @@ -extern void module_data_textfile_init(void); -extern void module_data_binfile_init(void); -extern void module_data_mg_init(void); -extern void module_data_garmin_init(void); -extern void module_data_poi_geodownload_init(void); -extern void module_gtk_graphics_init(void); -extern void module_gtk_gui_init(void); -extern void module_vehicle_demo_init(void); -extern void module_vehicle_file_init(void); -extern void module_win32_gui_init(void); -extern void module_speech_speech_dispatcher_init(void); -extern void builtin_init(void); -void builtin_init(void) { - module_data_textfile_init(); - module_data_binfile_init(); - module_data_mg_init(); - module_win32_gui_init(); - module_data_garmin_init(); - module_data_poi_geodownload_init(); - module_gtk_graphics_init(); - module_gtk_gui_init(); - module_vehicle_demo_init(); - module_vehicle_file_init(); - module_speech_speech_dispatcher_init(); -} diff --git a/projs/CodeBlocks/Win32Extra/byteswap.h b/projs/CodeBlocks/Win32Extra/byteswap.h deleted file mode 100644 index a227dde5..00000000 --- a/projs/CodeBlocks/Win32Extra/byteswap.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _BYTESWAP_H -#define _BYTESWAP_H - -static inline unsigned short bswap_16(unsigned short x) { - return (x>>8) | (x<<8); -} - -static inline unsigned int bswap_32(unsigned int x) { - return (bswap_16(x&0xffff)<<16) | (bswap_16(x>>16)); -} - -static inline unsigned long long bswap_64(unsigned long long x) { - return (((unsigned long long)bswap_32(x&0xffffffffull))<<32) | (bswap_32(x>>32)); -} - -#endif - diff --git a/projs/CodeBlocks/Win32Extra/config.h b/projs/CodeBlocks/Win32Extra/config.h deleted file mode 100644 index 019925b2..00000000 --- a/projs/CodeBlocks/Win32Extra/config.h +++ /dev/null @@ -1,417 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define to avoid floating point */ -/* #undef AVOID_FLOAT */ - -/* Define to avoid unaligned access */ -/* #undef AVOID_UNALIGNED */ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the `argz_count' function. */ -#define HAVE_ARGZ_COUNT 1 - -/* Define to 1 if you have the <argz.h> header file. */ -#define HAVE_ARGZ_H 1 - -/* Define to 1 if you have the `argz_next' function. */ -#define HAVE_ARGZ_NEXT 1 - -/* Define to 1 if you have the `argz_stringify' function. */ -#define HAVE_ARGZ_STRINGIFY 1 - -/* Define to 1 if you have the `asprintf' function. */ -#define HAVE_ASPRINTF 1 - -/* Define to 1 if the compiler understands __builtin_expect. */ -#define HAVE_BUILTIN_EXPECT 1 - -/* Define to 1 if you have the [CEGUI/CEGUI.h] header file. */ -/* #undef HAVE_CEGUI */ - -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYCURRENT */ - -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -#define HAVE_DCGETTEXT 1 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 0 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 0 - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have imlib2 */ -#define HAVE_FREETYPE2 1 - -/* Define to 1 if you have the `fwprintf' function. */ -/* #undef HAVE_FWPRINTF */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getegid' function. */ -#define HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `getgid' function. */ -#define HAVE_GETGID 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#define HAVE_GETTEXT 1 - -/* Define to 1 if you have the `getuid' function. */ -#define HAVE_GETUID 1 - -/* Define to 1 if you have the <GL/glc.h> header file. */ -/* #undef HAVE_GLC */ - -/* Define to 1 if you have the <GL/glut.h> header file. */ -#define HAVE_GLUT - -/* Define to 1 if you have imlib2 */ -#define HAVE_GTK2 1 - -/* Define if you have the iconv() function. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have imlib2 */ -/* #undef HAVE_IMLIB2 */ - -/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */ -#define HAVE_INTMAX_T 1 - -/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */ -#define HAVE_INTTYPES_H 1 - -/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ -#define HAVE_LANGINFO_CODESET 1 - -/* Define if your <locale.h> file defines LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 - -/* Define to 1 if you have the `CEGUIBase' library (-lCEGUIBase). */ -/* #undef HAVE_LIBCEGUIBASE */ - -/* Define to 1 if you have the `CEGUIFalagardWRBase' library - (-lCEGUIFalagardWRBase). */ -/* #undef HAVE_LIBCEGUIFALAGARDWRBASE */ - -/* Define to 1 if you have the `CEGUIOpenGLRenderer' library - (-lCEGUIOpenGLRenderer). */ -/* #undef HAVE_LIBCEGUIOPENGLRENDERER */ - -/* Define to 1 if you have the <gps.h> header file. */ -/* #undef HAVE_LIBGPS */ - -/* Define to 1 if you have the <SDL/SDL.h> header file. */ -/* #undef HAVE_LIBSDL */ - -/* Define to 1 if you have the <libspeechd.h> header file. */ -/* #undef HAVE_LIBSPEECHD */ - -/* Define to 1 if you have the <limits.h> header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the 'long double' type. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define if you have the 'long long' type. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the <memory.h> header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -#define HAVE_MEMPCPY 1 - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `munmap' function. */ -#define HAVE_MUNMAP 1 - -/* Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if - _GNU_SOURCE is defined. */ -/* #undef HAVE_NL_LOCALE_NAME */ - -/* Define to 1 if you have the <GL/gl.h> header file. */ -#define HAVE_OPENGL - -/* Define if your printf() function supports format strings with positions. */ -#define HAVE_POSIX_PRINTF 1 - -/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */ -#define HAVE_PTHREAD_MUTEX_RECURSIVE 1 - -/* Define if the POSIX multithreading library has read/write locks. */ -#define HAVE_PTHREAD_RWLOCK 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have python */ -#define HAVE_PYTHON 1 - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the <stddef.h> header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the <stdint.h> header file. */ -#define HAVE_STDINT_H 1 - -/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the <stdlib.h> header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the <strings.h> header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the <string.h> header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the <sys/param.h> header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the <sys/types.h> header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `tsearch' function. */ -#define HAVE_TSEARCH 1 - -/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the <unistd.h> header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if you have the 'unsigned long long' type. */ -#define HAVE_UNSIGNED_LONG_LONG 1 - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if you have the <zlib.h> header file. */ -#define HAVE_ZLIB - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 1 - -/* Name of package */ -#define PACKAGE "navit" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "navit" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "navit 0.0.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "navit" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.0.3" - -/* Define if <inttypes.h> exists and defines unusable PRI* macros. */ -/* #undef PRI_MACROS_BROKEN */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -/* #undef SIZE_MAX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if the POSIX multithreading library can be used. */ -#define USE_POSIX_THREADS 1 - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Define if the GNU Pth multithreading library can be used. */ -/* #undef USE_PTH_THREADS */ - -/* Define if references to the GNU Pth multithreading library should be made - weak. */ -/* #undef USE_PTH_THREADS_WEAK */ - -/* Define if the old Solaris multithreading library can be used. */ -/* #undef USE_SOLARIS_THREADS */ - -/* Define if references to the old Solaris multithreading library should be - made weak. */ -/* #undef USE_SOLARIS_THREADS_WEAK */ - -/* Define if the Win32 multithreading API can be used. */ -/* #undef USE_WIN32_THREADS */ - -/* Version number of package */ -#define VERSION "0.0.3" - -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to empty if the C compiler doesn't support this keyword. */ -/* #undef signed */ - -/* Define to `unsigned int' if <sys/types.h> does not define. */ -/* #undef size_t */ - -/* Define to unsigned long or unsigned long long if <stdint.h> and - <inttypes.h> don't define. */ -/* #undef uintmax_t */ - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init libintl_lock_init -#define glthread_lock_lock libintl_lock_lock -#define glthread_lock_unlock libintl_lock_unlock -#define glthread_lock_destroy libintl_lock_destroy -#define glthread_rwlock_init libintl_rwlock_init -#define glthread_rwlock_rdlock libintl_rwlock_rdlock -#define glthread_rwlock_wrlock libintl_rwlock_wrlock -#define glthread_rwlock_unlock libintl_rwlock_unlock -#define glthread_rwlock_destroy libintl_rwlock_destroy -#define glthread_recursive_lock_init libintl_recursive_lock_init -#define glthread_recursive_lock_lock libintl_recursive_lock_lock -#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock -#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy -#define glthread_once libintl_once -#define glthread_once_call libintl_once_call -#define glthread_once_singlethreaded libintl_once_singlethreaded - -#define index(a,b) strchr(a,b) -#define strtok_r(s,d,p) strtok(s,d) - -#define alarm( a ) diff --git a/projs/CodeBlocks/Win32Extra/endian.h b/projs/CodeBlocks/Win32Extra/endian.h deleted file mode 100644 index cabb6963..00000000 --- a/projs/CodeBlocks/Win32Extra/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef ENDIAN_H_INCLUDED -#define ENDIAN_H_INCLUDED - -#endif - diff --git a/projs/CodeBlocks/Win32Extra/libgarmin/libgarmin.a b/projs/CodeBlocks/Win32Extra/libgarmin/libgarmin.a Binary files differdeleted file mode 100644 index 7d49bcb9..00000000 --- a/projs/CodeBlocks/Win32Extra/libgarmin/libgarmin.a +++ /dev/null diff --git a/projs/CodeBlocks/Win32Extra/libgarmin/libgarmin.h b/projs/CodeBlocks/Win32Extra/libgarmin/libgarmin.h deleted file mode 100644 index 8374fce9..00000000 --- a/projs/CodeBlocks/Win32Extra/libgarmin/libgarmin.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - Copyright (C) 2007 Alexander Atanasov <aatanasov@gmail.com> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -*/ - -#include <sys/types.h> - -#ifdef _WIN32 -#define u_int8_t unsigned char -#define int8_t char -#define int16_t short -#define u_int16_t unsigned short -#define int32_t int -#define u_int32_t unsigned int -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - L_LBL, - L_NET, - L_POI, -}; - -struct gcoord { - int x; - int y; -}; - -#define GS_COUNTRY 1 -#define GS_REGION 2 -#define GS_CITY 3 -#define GS_ZIP 4 -#define GS_ROAD 5 -#define GS_INTERSECT 6 -#define GS_HOUSENUMBER 7 -#define GS_POI 8 - -#define GM_EXACT 0 -#define GM_START 1 -#define GM_ANY 2 - -struct gar_search { - unsigned char type; - unsigned char match; - char *needle; - struct gobject *fromobj; -}; - -#define GO_POINT 1 -#define GO_POI 2 -#define GO_POLYLINE 3 -#define GO_POLYGON 4 -#define GO_ROAD 5 - -struct gar_subfile; -struct gar_objdraworder; - -struct gmap { - struct gar_objdraworder *draworder; - int subfiles; - int lastsub; - struct gar_subfile **subs; - int zoomlevels; - int basebits; - int minlevel; - int maxlevel; -}; - -struct gobject { - int type; - void *gptr; - void *priv_data; - struct gobject *next; -}; - -struct gar_rect { - double lulat; - double lulong; - double rllat; - double rllong; -}; - - -/* Walk and parse all data */ -#define OPM_PARSE (1<<0) -/* Call a callback w/ every object */ -#define OPM_DUMP (1<<1) -/* Work as a map backend */ -#define OPM_GPS (1<<2) - -typedef void (*dump_fn)(struct gobject *obj); - -#define DBGM_LBLS (1<<0) -#define DBGM_OBJSRC (1<<1) - - -struct gar_config { - int opm; - int maxsubdivs; /* Load max N subdivs for OPM_GPS */ - dump_fn cb; /* Callback function for OPM_DUMP */ - unsigned debugmask; /* Debuging aid */ - int debuglevel; /* Debug level */ -}; - -struct gimg; -struct gar; - -typedef void (*log_fn)(char *file, int line, int level, char *fmt, ...) - __attribute__ ((format(printf,4,5))); -/* Default init w/ config, keep for the latest navit release */ -struct gar *gar_init(char *tbd, log_fn l); -struct gar *gar_init_cfg(char *tbd, log_fn l, struct gar_config *cfg); -void gar_free(struct gar *g); -int gar_img_load(struct gar *gar, char *file, int data); -struct gmap *gar_find_subfiles(struct gar *gar, void *select, int flags); -void gar_free_gmap(struct gmap *g); -int gar_get_zoomlevels(struct gar_subfile *sub); - -#define GO_GET_SORTED (1<<0) -#define GO_GET_ROUTABLE (1<<1) -#define GO_GET_SEARCH (1<<2) - -struct gobject *gar_get_object(struct gar *gar, void *ptr); -int gar_get_objects(struct gmap *gm, int level, void *select, - struct gobject **ret, int flags); -void gar_free_objects(struct gobject *g); -u_int8_t gar_obj_type(struct gobject *o); -int gar_get_object_position(struct gobject *o, struct gcoord *ret); -int gar_object_subtype(struct gobject *o); -int gar_get_object_dcoord(struct gmap *gm, struct gobject *o, int ndelta, struct gcoord *ret); -int gar_get_object_coord(struct gmap *gm, struct gobject *o, struct gcoord *ret); - -int gar_is_object_dcoord_node(struct gmap *gm, struct gobject *o, int ndelta); - -int gar_get_object_deltas(struct gobject *o); -/* Get lbl as strdup'ed string */ -char *gar_get_object_lbl(struct gobject *o); -int gar_get_object_intlbl(struct gobject *o); -int gar_object_get_draw_order(struct gobject *o); -char *gar_object_debug_str(struct gobject *o); -/* Object index is (subdividx << 16) | (idx << 8) | otype */ -int gar_object_index(struct gobject *o); -/* Object mapid is the id of the file containing the object */ -int gar_object_mapid(struct gobject *o); -struct gobject *gar_get_object_by_id(struct gar *gar, unsigned int mapid, - unsigned int objid); - -int gar_fat_file2fd(struct gimg *g, char *name, int fd); -/* Get ptr to a dskimg file */ -struct gimg *gar_get_dskimg(struct gar *gar, char *file); - -#define F_ONEWAY (1<<0) -#define F_SEGMENTED (1<<1) - -int gar_object_flags(struct gobject *o); - - -#define GARDEG(x) ((x) < 0x800000 ? (double)(x) * 360.0 / 16777216.0 : -(double)((x) - 0x100000) * 360.0 / 16777216.0) -#define GARRAD(x) ((x) < 0x800000 ? (double)(x) * TWOPI / 16777216.0 : -(double)((x) - 0x100000) * TWOPI / 16777216.0) -#define DEGGAR(x) ((x) * (1/(360.0/(1<<24)))) -#define FEET2METER(x) ((x)/3.28084) - -#define POI_STREET_NUM (1<<0) -#define POI_STREET (1<<1) -#define POI_CITY (1<<2) -#define POI_ZIP (1<<3) -#define POI_PHONE (1<<4) -#define POI_EXIT (1<<5) -#define POI_TIDE_PREDICT (1<<6) -#define POI_UNKNOW (1<<7) - - -#ifdef __cplusplus -} -#endif diff --git a/projs/CodeBlocks/Win32Extra/navit_gtk.c b/projs/CodeBlocks/Win32Extra/navit_gtk.c deleted file mode 100644 index c2aa0957..00000000 --- a/projs/CodeBlocks/Win32Extra/navit_gtk.c +++ /dev/null @@ -1,23 +0,0 @@ -extern void module_data_textfile_init(void); -extern void module_data_binfile_init(void); -extern void module_data_mg_init(void); -extern void module_data_garmin_init(void); -extern void module_data_poi_geodownload_init(void); -extern void module_gtk_graphics_init(void); -extern void module_gtk_gui_init(void); -extern void module_vehicle_demo_init(void); -extern void module_vehicle_file_init(void); -extern void module_speech_speech_dispatcher_init(void); -extern void builtin_init(void); -void builtin_init(void) { - module_data_textfile_init(); - module_data_binfile_init(); - module_data_mg_init(); - module_data_garmin_init(); - module_data_poi_geodownload_init(); - module_gtk_graphics_init(); - module_gtk_gui_init(); - module_vehicle_demo_init(); - module_vehicle_file_init(); - module_speech_speech_dispatcher_init(); -} diff --git a/projs/CodeBlocks/Win32Extra/navit_win32.c b/projs/CodeBlocks/Win32Extra/navit_win32.c deleted file mode 100644 index 4493ec5c..00000000 --- a/projs/CodeBlocks/Win32Extra/navit_win32.c +++ /dev/null @@ -1,25 +0,0 @@ - - -extern void module_data_textfile_init(void); -extern void module_data_binfile_init(void); -extern void module_data_mg_init(void); -extern void module_win32_gui_init(void); -extern void module_data_garmin_init(void); -extern void module_data_poi_geodownload_init(void); -extern void module_vehicle_demo_init(void); -extern void module_vehicle_file_init(void); -extern void module_speech_speech_dispatcher_init(void); - -void builtin_init(void) { - module_data_textfile_init(); - module_data_binfile_init(); - module_data_mg_init(); - module_win32_gui_init(); - module_data_poi_geodownload_init(); - module_vehicle_demo_init(); - module_vehicle_file_init(); -#if !defined(__CEGCC__) - module_data_garmin_init(); - module_speech_speech_dispatcher_init(); -#endif -} diff --git a/projs/CodeBlocks/Win32Extra/serial_io.c b/projs/CodeBlocks/Win32Extra/serial_io.c deleted file mode 100644 index 07b8fa36..00000000 --- a/projs/CodeBlocks/Win32Extra/serial_io.c +++ /dev/null @@ -1,122 +0,0 @@ -#include <stdio.h> -#include <windows.h> -#include "serial_io.h" -#include "util.h" - -int serial_io_init( const char* port, const char* strsettings ) -{ - HANDLE hCom = NULL; - - TCHAR strport[16]; - _sntprintf( strport, sizeof( strport ), "\\\\.\\%s", port ); - - hCom = CreateFile( - strport, - GENERIC_WRITE | GENERIC_READ, - 0, - 0, - OPEN_EXISTING, - 0, - NULL); - - if (hCom == INVALID_HANDLE_VALUE) - { - LPVOID lpMsgBuf; - - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) &lpMsgBuf, - 0, - NULL - ); - // g_strSerialError = strPort + wxT(": ") + (LPTSTR) lpMsgBuf; - - // Free the buffer. - LocalFree( lpMsgBuf ); - return -1; - } - - DCB dcb; - - ZeroMemory(&dcb, sizeof(DCB)); - - GetCommState(hCom, &dcb); - -// char strsettings[255]; -// snprintf( strsettings, sizeof( strsettings ), "baud=%d parity=N data=8 stop=1", baudrate ); -#if !defined(__CEGCC__) - BuildCommDCB( strsettings, &dcb); -#else -// TODO -#endif - SetupComm(hCom, 4096, 4096); - - SetCommState(hCom, &dcb); - - COMMTIMEOUTS sCT; - - memset(&sCT, 0, sizeof(sCT)); - sCT.ReadTotalTimeoutConstant = 10; - - SetCommTimeouts(hCom, &sCT); - - return (int)hCom; -} - -int serial_io_read( int fd, char * buffer, int buffer_size ) -{ - DWORD dwBytesIn = 0; - - if (fd <= 0) - { - // Sleep(1000); - *buffer = 0; - return 0; - } - - ReadFile( (HANDLE)fd, buffer, buffer_size - 1, &dwBytesIn, NULL); - - if (dwBytesIn > 0) - { - printf( "GPS < %s\n",buffer ); - } - if (dwBytesIn >= 0) - { - buffer[dwBytesIn] = 0; - } - else{ - buffer[0] = 0; - } - buffer[buffer_size - 1] = 0; - - - if (dwBytesIn <= 0) - { - Sleep(50); - dwBytesIn = 0; - } - - return dwBytesIn; -} - -int serial_io_write(int fd, const char * buffer) -{ - DWORD dwBytesOut = 0; - - WriteFile((HANDLE)fd, buffer, strlen(buffer), &dwBytesOut, NULL); - - return dwBytesOut; -} - -void serial_io_shutdown(int fd ) -{ - if (fd > 0) - { - CloseHandle((HANDLE)fd); - } -} diff --git a/projs/CodeBlocks/Win32Extra/serial_io.h b/projs/CodeBlocks/Win32Extra/serial_io.h deleted file mode 100644 index 4c7b8a31..00000000 --- a/projs/CodeBlocks/Win32Extra/serial_io.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SERIAL_IO_H_INCLUDED -#define SERIAL_IO_H_INCLUDED - -int serial_io_init( const char* port, const char* strsettings ); -int serial_io_read(int fd, char * buffer, int buffer_size ); -int WriteSerial(int fd, const char * buffer); -void serial_io_shutdown(int fd ); - -#endif diff --git a/projs/CodeBlocks/Win32Extra/setenv.c b/projs/CodeBlocks/Win32Extra/setenv.c deleted file mode 100644 index b1316935..00000000 --- a/projs/CodeBlocks/Win32Extra/setenv.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - - -#if !defined(__CEGCC__) -int setenv(const char *name, const char *value, int overwrite) -{ - char strPutEnv[512]; - - char * hasKey = getenv ( name ); - - if ( ( overwrite != 0 ) || ( hasKey == NULL ) ) - { - snprintf( strPutEnv, sizeof( strPutEnv ), "%s=%s", name, value ); - strPutEnv[ sizeof( strPutEnv ) - 1 ] = '\0'; - _putenv( strPutEnv ); - } - return 0; -} -#endif - diff --git a/projs/CodeBlocks/Win32Extra/setenv.h b/projs/CodeBlocks/Win32Extra/setenv.h deleted file mode 100644 index 0d542a8f..00000000 --- a/projs/CodeBlocks/Win32Extra/setenv.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _SETENV_H_INCLUDED -#define _SETENV_H_INCLUDED - - -int setenv(const char *name, const char *value, int overwrite); - - -#endif /* !_SETENV_H_INCLUDED */ - diff --git a/projs/CodeBlocks/Win32Extra/speech_dispatcher_win32.c b/projs/CodeBlocks/Win32Extra/speech_dispatcher_win32.c deleted file mode 100644 index 1542ac85..00000000 --- a/projs/CodeBlocks/Win32Extra/speech_dispatcher_win32.c +++ /dev/null @@ -1,96 +0,0 @@ -#include <sys/types.h> -#include <unistd.h> -#include <stdio.h> -#include <stdlib.h> -#include <glib.h> -#include <stdarg.h> -#include "config.h" -#include "plugin.h" -#include "speech.h" -#include <windows.h> -#define COBJMACROS -#include <sapi.h> -#include <objbase.h> -#include <glib.h> - -const IID UUID_OF_ISPVOICE; // = {6C44DF74-72B9-4992-A1EC-EF996E0422D4}; - - -struct speech_priv { - ISpVoice* pIspVoice; -}; - -static int -speechd_say(struct speech_priv *this_, const char *text) { - int err = 1; - - if ( this_->pIspVoice ) - { - WCHAR* pWideString = g_utf8_to_utf16( text, -1, NULL, NULL, NULL ); - ISpVoice_Speak( this_->pIspVoice, pWideString, 0, NULL); - g_free( pWideString ); - err = 0; - } - return err; -} - -static void -speechd_destroy(struct speech_priv *this) { - g_free(this); -} - -static struct speech_methods speechd_meth = { - speechd_destroy, - speechd_say, -}; - -static struct speech_priv * -speechd_new(char *data, struct speech_methods *meth) { - struct speech_priv *this_; - - this_=g_new(struct speech_priv,1); - - this_->pIspVoice = NULL; - - - CLSID clsid_sape; - CLSID* pw = &clsid_sape; - - CoInitialize(NULL); - - HRESULT hr = CLSIDFromProgID(L"SAPI.SpVoice", &clsid_sape); - - if ( 0 == hr ) - { - IID UUID_OF_ISPVOICE; // = {6C44DF74-72B9-4992-A1EC-EF996E0422D4}; - UUID_OF_ISPVOICE.Data1 = 0x6C44DF74; - UUID_OF_ISPVOICE.Data2 = 0x72B9; - UUID_OF_ISPVOICE.Data3 = 0x4992; - UUID_OF_ISPVOICE.Data4[0] = 161; - UUID_OF_ISPVOICE.Data4[1] = 236; - UUID_OF_ISPVOICE.Data4[2] = 239; - UUID_OF_ISPVOICE.Data4[3] = 153; - UUID_OF_ISPVOICE.Data4[4] = 110; - UUID_OF_ISPVOICE.Data4[5] = 4; - UUID_OF_ISPVOICE.Data4[6] = 34; - UUID_OF_ISPVOICE.Data4[7] = 212; - - ISpVoice* pIspVoice; - hr = CoCreateInstance( &clsid_sape, NULL, CLSCTX_ALL, &UUID_OF_ISPVOICE, &pIspVoice ); - - if ( ( 0 == hr ) && ( this_ != NULL ) ) - { - this_->pIspVoice = pIspVoice; - } - } - - // ISpVoice_Speak( pIspVoice, L"If you can hear this, SAPI is working", 0, NULL); - *meth=speechd_meth; - return this_; -} - - -void plugin_init(void) -{ - plugin_register_speech_type("speech_dispatcher", speechd_new); -} diff --git a/projs/CodeBlocks/Win32Extra/sys/mman.c b/projs/CodeBlocks/Win32Extra/sys/mman.c deleted file mode 100644 index d215dc5a..00000000 --- a/projs/CodeBlocks/Win32Extra/sys/mman.c +++ /dev/null @@ -1,184 +0,0 @@ -#include <windows.h> -#include <stdio.h> -#include <wchar.h> -#include <ctype.h> -#include "mman.h" - -void * mmap_readonly_win32( const char* name, long* map_handle_ptr, long* map_file_ptr ) -{ - void * mapped_ptr = NULL; -#if defined(__CEGCC__) - - wchar_t filename[MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, strlen(name), 0, 0)]; - MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, strlen(name), filename, wcslen(filename)) ; - - HANDLE hFile = CreateFile (filename, GENERIC_READ, FILE_SHARE_READ,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0); -#else - HANDLE hFile = CreateFile (name, GENERIC_READ, FILE_SHARE_READ,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0); -#endif - *map_file_ptr = (long)hFile; - *map_handle_ptr = 0; - - if ( hFile != INVALID_HANDLE_VALUE ) - { - HANDLE hMapping = CreateFileMapping( (HANDLE)hFile, NULL, PAGE_READONLY, 0, 0, NULL); - mapped_ptr = MapViewOfFile(hMapping, FILE_MAP_READ, 0 , 0, 0 ); - *map_handle_ptr = (long)hMapping; - } - - return mapped_ptr; -} - -void mmap_unmap_win32( void* mem_ptr, long map_handle, long map_file ) -{ - if ( mem_ptr != NULL ) - { - UnmapViewOfFile( mem_ptr ); - } - if ( map_handle != 0) - { - CloseHandle( (HANDLE)map_handle ); - } - if ( map_file != 0 ) - { - CloseHandle( (HANDLE)map_file ); - } -} - -char *stristr(const char *String, const char *Pattern) -{ - char *pptr, *sptr, *start; - - for (start = (char *)String; *start != (int)NULL; start++) - { - /* find start of pattern in string */ - for ( ; ((*start!=(int)NULL) && (toupper(*start) != toupper(*Pattern))); start++) - ; - if ((int)NULL == *start) - return NULL; - - pptr = (char *)Pattern; - sptr = (char *)start; - - while (toupper(*sptr) == toupper(*pptr)) - { - sptr++; - pptr++; - - /* if end of pattern then pattern was found */ - - if ((int)NULL == *pptr) - return (start); - } - } - return NULL; -} - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif -#if !HAVE_FLOCKFILE -# undef flockfile -# define flockfile(x) ((void) 0) -#endif -#if !HAVE_FUNLOCKFILE -# undef funlockfile -# define funlockfile(x) ((void) 0) -#endif - -/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */ -#ifndef EOVERFLOW -# define EOVERFLOW E2BIG -#endif - -/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and - NUL-terminate it). *LINEPTR is a pointer returned from malloc (or - NULL), pointing to *N characters of space. It is realloc'ed as - necessary. Returns the number of characters read (not including - the null terminator), or -1 on error or EOF. */ - -ssize_t -getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) -{ - ssize_t result; - size_t cur_len = 0; - - if (lineptr == NULL || n == NULL || fp == NULL) - { - return -1; - } - - flockfile (fp); - - if (*lineptr == NULL || *n == 0) - { - *n = 120; - *lineptr = (char *) realloc (*lineptr, *n); - if (*lineptr == NULL) - { - result = -1; - goto unlock_return; - } - } - - for (;;) - { - int i; - - i = getc (fp); - if (i == EOF) - { - result = -1; - break; - } - - /* Make enough space for len+1 (for final NUL) bytes. */ - if (cur_len + 1 >= *n) - { - size_t needed_max = - SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; - size_t needed = 2 * *n + 1; /* Be generous. */ - char *new_lineptr; - - if (needed_max < needed) - needed = needed_max; - if (cur_len + 1 >= needed) - { - result = -1; - goto unlock_return; - } - - new_lineptr = (char *) realloc (*lineptr, needed); - if (new_lineptr == NULL) - { - result = -1; - goto unlock_return; - } - - *lineptr = new_lineptr; - *n = needed; - } - - (*lineptr)[cur_len] = i; - cur_len++; - - if (i == delimiter) - break; - } - (*lineptr)[cur_len] = '\0'; - result = cur_len ? cur_len : result; - - unlock_return: - funlockfile (fp); /* doesn't set errno */ - - return result; -} - -ssize_t -getline (char **lineptr, size_t *n, FILE *stream) -{ - return getdelim (lineptr, n, '\n', stream); -} diff --git a/projs/CodeBlocks/Win32Extra/sys/mman.h b/projs/CodeBlocks/Win32Extra/sys/mman.h deleted file mode 100644 index 37e59b9e..00000000 --- a/projs/CodeBlocks/Win32Extra/sys/mman.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _WIN32_MMAN_H_INCLUDED -#define _WIN32_MMAN_H_INCLUDED - -void * mmap_readonly_win32( const char* name, long* map_handle_ptr, long* map_file_ptr ); -void mmap_unmap_win32( void* mem_ptr, long map_handle, long map_file ); - -#endif /* !_WIN32_MMAN_H_INCLUDED */ - diff --git a/projs/CodeBlocks/Win32Extra/wordexp.c b/projs/CodeBlocks/Win32Extra/wordexp.c deleted file mode 100644 index faa2d656..00000000 --- a/projs/CodeBlocks/Win32Extra/wordexp.c +++ /dev/null @@ -1,53 +0,0 @@ -#include <sys/types.h> -#include <assert.h> -#include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include "wordexp.h" - -int wordexp(const char * words, wordexp_t * we, int flags) -{ - int error=0; - - assert(we != NULL); - assert(words != NULL); - - we->we_wordc = 1; - we->we_wordv = NULL; - we->we_strings = NULL; - we->we_nbytes = 0; - - we->we_wordv = malloc( we->we_wordc * sizeof( char* ) ); - - we->we_nbytes = strlen( words ) + 1; - we->we_strings = malloc( we->we_nbytes ); - - we->we_wordv[0] = &we->we_strings[0]; - - // copy string & terminate - memcpy( we->we_strings, words, we->we_nbytes -1 ); - we->we_strings[ we->we_nbytes -1 ] = '\0'; - - return error; -} - -void wordfree(wordexp_t *we) -{ - assert(we != NULL); - - if ( we->we_wordv ) - { - free(we->we_wordv); - } - if ( we->we_strings ) - { - free(we->we_strings); - } - - we->we_wordv = NULL; - we->we_strings = NULL; - we->we_nbytes = 0; - we->we_wordc = 0; -} diff --git a/projs/CodeBlocks/Win32Extra/wordexp.h b/projs/CodeBlocks/Win32Extra/wordexp.h deleted file mode 100644 index ad18c785..00000000 --- a/projs/CodeBlocks/Win32Extra/wordexp.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _WORDEXP_H_ -#define _WORDEXP_H_ - - -typedef struct { - size_t we_wordc; /* count of words matched */ - char **we_wordv; /* pointer to list of words */ - size_t we_offs; /* slots to reserve in we_wordv */ - /* following are internals */ - char *we_strings; /* storage for wordv strings */ - size_t we_nbytes; /* size of we_strings */ -} wordexp_t; - -/* - * Flags for wordexp(). - */ -#define WRDE_APPEND 0x1 /* append to previously generated */ -#define WRDE_DOOFFS 0x2 /* we_offs member is valid */ -#define WRDE_NOCMD 0x4 /* disallow command substitution */ -#define WRDE_REUSE 0x8 /* reuse wordexp_t */ -#define WRDE_SHOWERR 0x10 /* don't redirect stderr to /dev/null */ -#define WRDE_UNDEF 0x20 /* disallow undefined shell vars */ - -/* - * Return values from wordexp(). - */ -#define WRDE_BADCHAR 1 /* unquoted special character */ -#define WRDE_BADVAL 2 /* undefined variable */ -#define WRDE_CMDSUB 3 /* command substitution not allowed */ -#define WRDE_NOSPACE 4 /* no memory for result */ -#if (_XOPEN_SOURCE - 0) >= 4 || defined(_NETBSD_SOURCE) -#define WRDE_NOSYS 5 /* obsolete, reserved */ -#endif -#define WRDE_SYNTAX 6 /* shell syntax error */ -#define WRDE_ERRNO 7 /* other errors see errno */ - -void wordfree(wordexp_t *); -int wordexp(const char * words, wordexp_t * we, int flags); - - -#endif /* !_WORDEXP_H_ */ - |