Subversion Repositories HelenOS-historic

Rev

Rev 1273 | Rev 1604 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1273 Rev 1288
Line 37... Line 37...
37
};
37
};
38
 
38
 
39
int vsnprintf_write(const char *str, size_t count, struct vsnprintf_data *data);
39
int vsnprintf_write(const char *str, size_t count, struct vsnprintf_data *data);
40
 
40
 
41
/** Write string to given buffer.
41
/** Write string to given buffer.
42
 * Write at most data->size characters including trailing zero. According to C99 has snprintf to return number
42
 * Write at most data->size characters including trailing zero. According to C99, snprintf() has to return number
43
 * of characters that would have been written if enough space had been available. Hence the return value is not
43
 * of characters that would have been written if enough space had been available. Hence the return value is not
44
 * number of really printed characters but size of input string. Number of really used characters
44
 * number of really printed characters but size of the input string. Number of really used characters
45
 * is stored in data->len.
45
 * is stored in data->len.
46
 * @param str source string to print
46
 * @param str source string to print
47
 * @param count size of source string
47
 * @param count size of source string
48
 * @param data structure with destination string, counter of used space and total string size.
48
 * @param data structure with destination string, counter of used space and total string size.
49
 * @return number of characters to print (not characters really printed!)
49
 * @return number of characters to print (not characters really printed!)
Line 88... Line 88...
88
        str[0] = 0;
88
        str[0] = 0;
89
   
89
   
90
    /* vsnprintf_write ensures that str will be terminated by zero. */
90
    /* vsnprintf_write ensures that str will be terminated by zero. */
91
    return printf_core(fmt, &ps, ap);
91
    return printf_core(fmt, &ps, ap);
92
}
92
}
93
 
-
 
94
 
-