/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/utils.h

  • Committer: Gustav Hartvigsson
  • Date: 2015-07-12 19:04:18 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150712190418-yi9rfito5ovnf6dy
* Made the code more easy to read.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 *
41
41
 * The restulting string must be freed by caller.
42
42
 */
43
 
char * s_string_new (const char * s);
 
43
char *
 
44
s_string_new (const char * s);
44
45
 
45
46
/**
46
47
 * Creats a new C string with the correct length using standard fprint style
48
49
 *
49
50
 * The restulting string must be freed by caller.
50
51
 */
51
 
char * s_string_new_fmt (const char * format, ...);
 
52
char *
 
53
s_string_new_fmt (const char * format, ...);
52
54
 
53
55
/**
54
56
 * Same as s_string_new, but with a set length.
55
57
 *
56
58
 * The restulting string must be freed by caller
57
59
 */
58
 
char * s_string_new_with_len (const char * s, size_t len);
 
60
char *
 
61
s_string_new_with_len (const char * s, size_t len);
59
62
 
60
63
/**
61
64
 * Returns a C string with the current time (as run).
62
65
 *
63
66
 * The restulting string must be freed by caller.
64
67
 */
65
 
char * s_current_time (void);
 
68
char *
 
69
s_current_time (void);
66
70
 
67
71
#ifndef strdup
68
72
/* strdup is not ISO C, so we have to declare it somewhare, this should work
70
74
 *
71
75
 * This just to supress a compiler warning.
72
76
 */
73
 
char * strdup(const char *str);
 
77
char *
 
78
strdup(const char *str);
74
79
#endif
75
80
 
76
81
/** Just a standard print function. */