navit  0.5.3-trunk
util.h
Go to the documentation of this file.
1 
20 #ifndef NAVIT_types_H
21 #define NAVIT_types_H
22 
23 #include <ctype.h>
24 #include <time.h>
25 #include "config.h"
26 
27 #define MAX_MISMATCH 100
28 
29 void strtoupper(char *dest, const char *src);
30 void strtolower(char *dest, const char *src);
31 unsigned int uint_sqrt(unsigned int n);
32 int navit_utf8_strcasecmp(const char *s1, const char *s2);
33 int compare_name_systematic(const char *s1, const char *s2);
34 GList * g_hash_to_list(GHashTable *h);
35 GList * g_hash_to_list_keys(GHashTable *h);
36 gchar * g_strconcat_printf(gchar *buffer, gchar *fmt, ...);
37 #if defined(_WIN32) || defined(__CEGCC__) || defined (__APPLE__) || defined(HAVE_API_ANDROID)
38 #if defined(_UNICODE)
39 wchar_t* newSysString(const char *toconvert);
40 #else
41 char * newSysString(const char *toconvert);
42 #endif
43 #endif
44 unsigned int iso8601_to_secs(char *iso8601);
45 time_t mkgmtime(struct tm * pt);
46 time_t iso8601_to_time(char * iso8601);
47 char * time_to_iso8601(time_t time);
48 char * current_to_iso8601(void);
49 
50 #if defined(_MSC_VER) || (!defined(HAVE_GETTIMEOFDAY) && defined(HAVE_API_WIN32_BASE))
51 
52 #include <winsock.h>
53 
54 int gettimeofday(struct timeval *time, void *);
55 
56 #endif
57 
58 struct spawn_process_info;
59 char * shell_escape(char *arg);
60 struct spawn_process_info* spawn_process(char **argv);
62 
64 void spawn_process_init(void);
65 
66 #endif
67 
68 void get_compass_direction(char *buffer, int angle, int mode);
void spawn_process_init(void)
Definition: util.c:1047
char * time_to_iso8601(time_t time)
Converts time to ISO8601 format.
Definition: util.c:696
static double s1
Definition: geod_for.c:27
GList * g_hash_to_list_keys(GHashTable *h)
Definition: util.c:352
char * shell_escape(char *arg)
Definition: util.c:745
char * current_to_iso8601(void)
Outputs local system time in ISO 8601 format.
Definition: util.c:714
gchar * g_strconcat_printf(gchar *buffer, gchar *fmt,...)
Definition: util.c:359
void strtoupper(char *dest, const char *src)
Definition: util.c:41
int navit_utf8_strcasecmp(const char *s1, const char *s2)
Definition: util.c:84
struct spawn_process_info * spawn_process(char **argv)
Definition: util.c:854
GList * g_hash_to_list(GHashTable *h)
Definition: util.c:340
dest
Definition: startup.py:4
Definition: mg.h:33
void strtolower(char *dest, const char *src)
Definition: util.c:47
time_t iso8601_to_time(char *iso8601)
Converts an ISO 8601-style time string into time_t.
Definition: util.c:634
Definition: maptool.h:168
static char * argv[]
Definition: graphics_qt_qpainter.cpp:513
int spawn_process_check_status(struct spawn_process_info *pi, int block)
Definition: util.c:942
Definition: util.c:729
void spawn_process_info_free(struct spawn_process_info *pi)
Definition: util.c:1010
unsigned int iso8601_to_secs(char *iso8601)
Converts an ISO 8601-style time string into epoch time.
Definition: util.c:553
int compare_name_systematic(const char *s1, const char *s2)
Compares two name_systematic strings.
Definition: util.c:249
void get_compass_direction(char *buffer, int angle, int mode)
Get printable compass direction from an angle.
Definition: util.c:1074
time_t mkgmtime(struct tm *pt)
Converts a tm structure to time_t
Definition: util.c:599
unsigned int uint_sqrt(unsigned int n)
Fast compute of square root for unsigned ints.
Definition: util.c:59