/* * utils * * Various miscellaneous (and largely non-WIMP) utility routines * * © 1991-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Steel library. * * Steel is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * Steel is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Steel. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __utils_h #define __utils_h #ifndef __os_h #include "os.h" #endif /* * int utils_caselessCmp(const char *s1,const char *s2) * * Use * Caseless comparison between string 1 and string 2 * * Parameters * const char *s1 == source string * const char *s2 == target string * * Returns * 0 if the strings are equal, >0 if s1>s2, or <0 if s1errmess). Ths string must contain a '%s' at some * point. * * Parameters * os_error *e == either NULL or a pointer to a standard system * error structure. * char *string == a string containing one %s, for which the error * message from the structure passed above will be substituted. * * Returns * The error pointer. */ os_error *utils_complain(os_error *e,char *string); /* * char *utils_cvtSize(int size) * * Use * Converts a size in bytes into a string suitable to display the size to * a user. It uses OS_ConvertFileSize to do he translation, although this * is not guaranteed for future versions. * * Parameters * int size == the size in bytes * * Returns * A pointer to the result (read-only) */ char *utils_cvtSize(int size); #endif