Lines Matching defs:outs

546  * @outs:	on return contains the (allocated) output multibyte string
547 * @outs_len: length of output buffer in bytes (ignored if *@outs is NULL)
552 char **outs, int outs_len)
556 char *original_outs_value = *outs;
566 if (!*outs) {
580 if (!*outs) {
582 *outs = ntfs_malloc(outs_len);
583 if (!*outs)
587 t = *outs;
655 if(nfconvert_utf8 && (t - *outs) > 0) {
657 int new_outs_len = ntfs_macosx_normalize_utf8(*outs, &new_outs, 0); // Normalize to decomposed form
659 if(original_outs_value != *outs) {
660 // We have allocated outs ourselves.
661 free(*outs);
662 *outs = new_outs;
663 t = *outs + new_outs_len;
666 // We need to copy new_outs into the fixed outs buffer.
667 memset(*outs, 0, original_outs_len);
668 strncpy(*outs, new_outs, original_outs_len-1);
669 t = *outs + original_outs_len;
674 ntfs_log_error("Failed to normalize NTFS string to UTF-8 NFD: %s\n", *outs);
682 ret = t - *outs;
806 * @outs: on return contains the (allocated) output utf16 string
811 static int ntfs_utf8_to_utf16(const char *ins, ntfschar **outs)
837 if (!*outs) {
838 *outs = ntfs_malloc((shorts + 1) * sizeof(ntfschar));
839 if (!*outs)
844 outpos = *outs;
852 free(*outs);
853 *outs = (ntfschar*)NULL;
870 ret = --outpos - *outs;
885 * @outs: on return contains the (allocated) output multibyte string
886 * @outs_len: length of output buffer in bytes (ignored if *@outs is NULL)
891 * If *@outs is NULL, the function allocates the string and the caller is
892 * responsible for calling free(*@outs); when finished with it.
895 * string *@outs (>= 0), not counting the terminating NULL byte. If the output
896 * string buffer was allocated, *@outs is set to it.
900 * EINVAL Invalid arguments (e.g. @ins or @outs is NULL).
906 int ntfs_ucstombs(const ntfschar *ins, const int ins_len, char **outs,
920 if (!ins || !outs) {
924 mbs = *outs;
931 return ntfs_utf16_to_utf8(ins, ins_len, outs, outs_len);
948 if (mbs == *outs) {
989 if (*outs != mbs)
990 *outs = mbs;
993 if (mbs != *outs) {
1007 * @outs: on return contains the (allocated) output Unicode string
1013 * free(*@outs); when finished with it.
1016 * the output string *@outs (>= 0), not counting the terminating Unicode NULL
1021 * EINVAL Invalid arguments (e.g. @ins or @outs is NULL).
1027 int ntfs_mbstoucs(const char *ins, ntfschar **outs)
1039 if (!ins || !outs) {
1045 return ntfs_utf8_to_utf16(ins, outs);
1133 *outs = ucs;