~ubuntu-branches/ubuntu/raring/libnih/raring

« back to all changes in this revision

Viewing changes to nih/string.h

  • Committer: James Hunt
  • Date: 2013-03-14 10:27:34 UTC
  • mfrom: (1027.1.34 upstart-devel-libnih)
  • Revision ID: james.hunt@ubuntu.com-20130314102734-blit21ei3v9n0u2o
Tags: 1.0.3-4ubuntu16
Merge of important fixes from lp:~upstart-devel/libnih/nih
(LP: #776532, LP: #777097, LP: #834813, LP: #1123588).

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
NIH_BEGIN_EXTERN
36
36
 
37
37
char * nih_sprintf          (const void *parent, const char *format, ...)
38
 
        __attribute__ ((format (printf, 2, 3), warn_unused_result, malloc));
 
38
        __attribute__ ((format (printf, 2, 3), warn_unused_result));
39
39
 
40
40
char * nih_vsprintf         (const void *parent, const char *format,
41
41
                             va_list args)
42
 
        __attribute__ ((format (printf, 2, 0), warn_unused_result, malloc));
 
42
        __attribute__ ((format (printf, 2, 0), warn_unused_result));
43
43
 
44
44
char * nih_strdup           (const void *parent, const char *str)
45
 
        __attribute__ ((warn_unused_result, malloc));
 
45
        __attribute__ ((warn_unused_result));
46
46
 
47
47
char * nih_strndup          (const void *parent, const char *str, size_t len)
48
 
        __attribute__ ((warn_unused_result, malloc));
 
48
        __attribute__ ((warn_unused_result));
49
49
 
50
50
char * nih_strcat           (char **str, const void *parent, const char *src)
51
 
        __attribute__ ((warn_unused_result, malloc));
 
51
        __attribute__ ((warn_unused_result));
52
52
char * nih_strncat          (char **str, const void *parent, const char *src,
53
53
                             size_t len)
54
 
        __attribute__ ((warn_unused_result, malloc));
 
54
        __attribute__ ((warn_unused_result));
55
55
 
56
56
char * nih_strcat_sprintf   (char **str, const void *parent,
57
57
                             const char *format, ...)
58
 
        __attribute__ ((format (printf, 3, 4), warn_unused_result, malloc));
 
58
        __attribute__ ((format (printf, 3, 4), warn_unused_result));
59
59
char * nih_strcat_vsprintf  (char **str, const void *parent,
60
60
                             const char *format, va_list args)
61
 
        __attribute__ ((format (printf, 3, 0), warn_unused_result, malloc));
 
61
        __attribute__ ((format (printf, 3, 0), warn_unused_result));
62
62
 
63
63
char **nih_str_split        (const void *parent, const char *str,
64
64
                             const char *delim, int repeat)
65
 
        __attribute__ ((warn_unused_result, malloc));
 
65
        __attribute__ ((warn_unused_result));
66
66
 
67
67
char **nih_str_array_new    (const void *parent)
68
 
        __attribute__ ((warn_unused_result, malloc));
 
68
        __attribute__ ((warn_unused_result));
69
69
char **nih_str_array_add    (char ***array, const void *parent, size_t *len,
70
70
                             const char *str)
71
 
        __attribute__ ((warn_unused_result, malloc));
 
71
        __attribute__ ((warn_unused_result));
72
72
char **nih_str_array_addn   (char ***array, const void *parent, size_t *len,
73
73
                             const char *str, size_t strlen)
74
 
        __attribute__ ((warn_unused_result, malloc));
 
74
        __attribute__ ((warn_unused_result));
75
75
char **nih_str_array_addp   (char ***array, const void *parent, size_t *len,
76
76
                             void *ptr)
77
 
        __attribute__ ((warn_unused_result, malloc));
 
77
        __attribute__ ((warn_unused_result));
78
78
char **nih_str_array_copy   (const void *parent, size_t *len,
79
79
                             char * const *array)
80
 
        __attribute__ ((warn_unused_result, malloc));
 
80
        __attribute__ ((warn_unused_result));
81
81
char **nih_str_array_append (char ***array, const void *parent, size_t *len,
82
82
                             char * const *args)
83
 
        __attribute__ ((warn_unused_result, malloc));
 
83
        __attribute__ ((warn_unused_result));
84
84
 
85
85
char * nih_str_wrap         (const void *parent, const char *str, size_t len,
86
86
                             size_t first_indent, size_t indent)
87
 
        __attribute__ ((warn_unused_result, malloc));
 
87
        __attribute__ ((warn_unused_result));
88
88
size_t nih_str_screen_width (void);
89
89
char * nih_str_screen_wrap  (const void *parent, const char *str,
90
90
                             size_t first_indent, size_t indent)
91
 
        __attribute__ ((warn_unused_result, malloc));
 
91
        __attribute__ ((warn_unused_result));
92
92
 
93
93
NIH_END_EXTERN
94
94