4 * Various miscellaneous (and largely non-WIMP) utility routines
6 * © 1991-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Steel library.
13 * Steel is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * Steel is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with Steel. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36 * int utils_caselessCmp(const char *s1,const char *s2)
39 * Caseless comparison between string 1 and string 2
42 * const char *s1 == source string
43 * const char *s2 == target string
46 * 0 if the strings are equal, >0 if s1>s2, or <0 if s1<s2.
49 int utils_caselessCmp(const char *s1,const char *s2);
52 * char *utils_ctermToNterm(char *s)
55 * Changes a control-terminated string into a null-terminated string.
58 * char *s == the string to change
61 * A pointer to the string.
64 char *utils_ctermToNterm(char *s);
67 * char *utils_leafname(char *filename)
70 * Returns the leafname of the file whose full pathname is given in
74 * char *filename == pointer to full filename string
77 * Pointer to character after last '.' of string.
80 char *utils_leafname(char *filename);
83 * os_error *utils_complain(os error *e,char *string)
86 * If e is an error (i.e. not NULL) then the routine calls werr() with
87 * parameters (string,e->errmess). Ths string must contain a '%s' at some
91 * os_error *e == either NULL or a pointer to a standard system
93 * char *string == a string containing one %s, for which the error
94 * message from the structure passed above will be substituted.
100 os_error *utils_complain(os_error *e,char *string);
103 * char *utils_cvtSize(int size)
106 * Converts a size in bytes into a string suitable to display the size to
107 * a user. It uses OS_ConvertFileSize to do he translation, although this
108 * is not guaranteed for future versions.
111 * int size == the size in bytes
114 * A pointer to the result (read-only)
117 char *utils_cvtSize(int size);