Lines Matching refs:source

167    Append @p source at the end of @p target.
170 @param source Source string.
174 contain the @p target string and @p source string.
181 TRIO_ARGS2((target, source),
183 TRIO_CONST char *source)
186 assert(source);
188 return (strcat(target, source) != NULL);
194 Append at most @p max characters from @p source to @p target.
198 @param source Source string.
202 contain the @p target string and the @p source string (at most @p max
210 TRIO_ARGS3((target, max, source),
213 TRIO_CONST char *source)
218 assert(source);
224 strncat(target, source, max - length - 1);
255 Copy @p source to @p target.
258 @param source Source string.
262 contain the @p source string.
269 TRIO_ARGS2((target, source),
271 TRIO_CONST char *source)
274 assert(source);
276 (void)strcpy(target, source);
283 Copy at most @p max characters from @p source to @p target.
287 @param source Source string.
291 contain the @p source string (at most @p max characters).
298 TRIO_ARGS3((target, max, source),
301 TRIO_CONST char *source)
304 assert(source);
307 (void)strncpy(target, source, max - 1);
318 TRIO_ARGS2((source, size),
319 TRIO_CONST char *source,
324 assert(source);
331 trio_copy_max(target, size, source);
338 Duplicate @p source.
340 @param source Source string.
341 @return A copy of the @p source string.
347 TRIO_ARGS1((source),
348 TRIO_CONST char *source)
350 return TrioDuplicateMax(source, trio_length(source));
356 Duplicate at most @p max characters of @p source.
358 @param source Source string.
360 @return A copy of the @p source string.
365 trio_duplicate_max TRIO_ARGS2((source, max),
366 TRIO_CONST char *source,
371 assert(source);
374 length = trio_length(source);
379 return TrioDuplicateMax(source, length);
824 @param source Source string.
830 TRIO_ARGS3((target, source, Function),
832 TRIO_CONST char *source,
838 assert(source);
841 while (*source != NIL)
843 *target++ = Function(*source++);
941 @param source String to be converted.
962 TRIO_ARGS2((source, endp),
963 TRIO_CONST char *source,
967 return strtold(source, endp);
979 if ((source[0] == '0') && ((source[1] == 'x') || (source[1] == 'X')))
982 source += 2;
983 while (isxdigit((int)*source))
986 integer += (isdigit((int)*source)
987 ? (*source - '0')
988 : 10 + (trio_to_upper((int)*source) - 'A'));
989 source++;
991 if (*source == '.')
993 source++;
994 while (isxdigit((int)*source))
997 fraction += fracdiv * (isdigit((int)*source)
998 ? (*source - '0')
999 : 10 + (trio_to_upper((int)*source) - 'A'));
1000 source++;
1002 if ((*source == 'p') || (*source == 'P'))
1004 source++;
1005 if ((*source == '+') || (*source == '-'))
1007 isExponentNegative = (*source == '-');
1008 source++;
1010 while (isdigit((int)*source))
1013 exponent += (*source - '0');
1014 source++;
1024 isNegative = (*source == '-');
1026 if ((*source == '+') || (*source == '-'))
1027 source++;
1030 while (isdigit((int)*source))
1033 integer += (*source - '0');
1034 source++;
1037 if (*source == '.')
1039 source++; /* skip decimal point */
1040 while (isdigit((int)*source))
1043 fraction += (*source - '0') * fracdiv;
1044 source++;
1047 if ((*source == 'e')
1048 || (*source == 'E')
1050 || (*source == 'd')
1051 || (*source == 'D')
1055 source++; /* Skip exponential indicator */
1056 isExponentNegative = (*source == '-');
1057 if ((*source == '+') || (*source == '-'))
1058 source++;
1059 while (isdigit((int)*source))
1062 exponent += (*source - '0');
1063 source++;
1080 *endp = (char *)source;
1089 @param source String to be converted.
1097 TRIO_ARGS2((source, endp),
1098 TRIO_CONST char *source,
1102 return strtod(source, endp);
1104 return (double)trio_to_long_double(source, endp);
1112 @param source String to be converted.
1120 TRIO_ARGS2((source, endp),
1121 TRIO_CONST char *source,
1125 return strtof(source, endp);
1127 return (float)trio_to_long_double(source, endp);
1158 @param source The letter to be converted.
1163 TRIO_ARGS1((source),
1164 int source)
1168 return tolower(source);
1173 return ((source >= (int)'A') && (source <= (int)'Z'))
1174 ? source - 'A' + 'a'
1175 : source;
1207 @param source The letter to be converted.
1212 TRIO_ARGS1((source),
1213 int source)
1217 return toupper(source);
1222 return ((source >= (int)'a') && (source <= (int)'z'))
1223 ? source - 'a' + 'A'
1224 : source;