Lines Matching defs:source

163    Append @p source at the end of @p target.
166 @param source Source string.
170 contain the @p target string and @p source string.
177 TRIO_ARGS2((target, source),
179 TRIO_CONST char *source)
182 assert(source);
184 return (strcat(target, source) != NULL);
190 Append at most @p max characters from @p source to @p target.
194 @param source Source string.
198 contain the @p target string and the @p source string (at most @p max
206 TRIO_ARGS3((target, max, source),
209 TRIO_CONST char *source)
214 assert(source);
220 strncat(target, source, max - length - 1);
251 Copy @p source to @p target.
254 @param source Source string.
258 contain the @p source string.
265 TRIO_ARGS2((target, source),
267 TRIO_CONST char *source)
270 assert(source);
272 (void)strcpy(target, source);
279 Copy at most @p max characters from @p source to @p target.
283 @param source Source string.
287 contain the @p source string (at most @p max characters).
294 TRIO_ARGS3((target, max, source),
297 TRIO_CONST char *source)
300 assert(source);
303 (void)strncpy(target, source, max - 1);
314 TRIO_ARGS2((source, size),
315 TRIO_CONST char *source,
320 assert(source);
327 trio_copy_max(target, size, source);
334 Duplicate @p source.
336 @param source Source string.
337 @return A copy of the @p source string.
343 TRIO_ARGS1((source),
344 TRIO_CONST char *source)
346 return TrioDuplicateMax(source, trio_length(source));
352 Duplicate at most @p max characters of @p source.
354 @param source Source string.
356 @return A copy of the @p source string.
361 trio_duplicate_max TRIO_ARGS2((source, max),
362 TRIO_CONST char *source,
367 assert(source);
370 length = trio_length(source);
375 return TrioDuplicateMax(source, length);
820 @param source Source string.
826 TRIO_ARGS3((target, source, Function),
828 TRIO_CONST char *source,
834 assert(source);
837 while (*source != NIL)
839 *target++ = Function(*source++);
937 @param source String to be converted.
958 TRIO_ARGS2((source, endp),
959 TRIO_CONST char *source,
963 return strtold(source, endp);
975 if ((source[0] == '0') && ((source[1] == 'x') || (source[1] == 'X')))
978 source += 2;
979 while (isxdigit((int)*source))
982 integer += (isdigit((int)*source)
983 ? (*source - '0')
984 : 10 + (trio_to_upper((int)*source) - 'A'));
985 source++;
987 if (*source == '.')
989 source++;
990 while (isxdigit((int)*source))
993 fraction += fracdiv * (isdigit((int)*source)
994 ? (*source - '0')
995 : 10 + (trio_to_upper((int)*source) - 'A'));
996 source++;
998 if ((*source == 'p') || (*source == 'P'))
1000 source++;
1001 if ((*source == '+') || (*source == '-'))
1003 isExponentNegative = (*source == '-');
1004 source++;
1006 while (isdigit((int)*source))
1009 exponent += (*source - '0');
1010 source++;
1020 isNegative = (*source == '-');
1022 if ((*source == '+') || (*source == '-'))
1023 source++;
1026 while (isdigit((int)*source))
1029 integer += (*source - '0');
1030 source++;
1033 if (*source == '.')
1035 source++; /* skip decimal point */
1036 while (isdigit((int)*source))
1039 fraction += (*source - '0') * fracdiv;
1040 source++;
1043 if ((*source == 'e')
1044 || (*source == 'E')
1046 || (*source == 'd')
1047 || (*source == 'D')
1051 source++; /* Skip exponential indicator */
1052 isExponentNegative = (*source == '-');
1053 if ((*source == '+') || (*source == '-'))
1054 source++;
1055 while (isdigit((int)*source))
1058 exponent += (*source - '0');
1059 source++;
1076 *endp = (char *)source;
1085 @param source String to be converted.
1093 TRIO_ARGS2((source, endp),
1094 TRIO_CONST char *source,
1098 return strtod(source, endp);
1100 return (double)trio_to_long_double(source, endp);
1108 @param source String to be converted.
1116 TRIO_ARGS2((source, endp),
1117 TRIO_CONST char *source,
1121 return strtof(source, endp);
1123 return (float)trio_to_long_double(source, endp);
1154 @param source The letter to be converted.
1159 TRIO_ARGS1((source),
1160 int source)
1164 return tolower(source);
1169 return ((source >= (int)'A') && (source <= (int)'Z'))
1170 ? source - 'A' + 'a'
1171 : source;
1203 @param source The letter to be converted.
1208 TRIO_ARGS1((source),
1209 int source)
1213 return toupper(source);
1218 return ((source >= (int)'a') && (source <= (int)'z'))
1219 ? source - 'a' + 'A'
1220 : source;