home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / fingercl.zip / util.h < prev    next >
C/C++ Source or Header  |  1992-10-27  |  2KB  |  68 lines

  1. /* util.h -- Simple utility functions that everyone uses. */
  2.  
  3. /* Copyright (C) 1988, 1990, 1992 Free Software Foundation, Inc.
  4.  
  5.    This file is part of GNU Finger.
  6.  
  7.    This program is free software; you can redistribute it and/or modify
  8.    it under the terms of the GNU General Public License as published by
  9.    the Free Software Foundation; either version 2, or (at your option)
  10.    any later version.
  11.  
  12.    This program is distributed in the hope that it will be useful,
  13.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.    GNU General Public License for more details.
  16.  
  17.    You should have received a copy of the GNU General Public License
  18.    along with this program; if not, write to the Free Software
  19.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21. #if !defined (_UTIL_H_)
  22. #define _UTIL_H_
  23.  
  24. /* Return the length of the null terminated array of pointers. */
  25. int array_len ();
  26.  
  27. /* Free the contents of the null terminated array, and then
  28.    the array itself. */
  29. void free_array ();
  30.  
  31. /* Compare at most COUNT characters from string1 to string2.  Case
  32.    doesn't matter. */
  33. int xstrnicmp ();
  34.  
  35. /* strcmp (), but caseless. */
  36. int xstricmp ();
  37.  
  38. /* Determine if s2 occurs in s1.  If so, return a pointer to the
  39.    match in s1.  The compare is case insensitive. */
  40. char *strindex ();
  41.  
  42. /* Match pattern against username */
  43. int matches_username ();
  44.  
  45. /* Return a new string which is the concatenation of PATH and FILE. */
  46. char *path_concat ();
  47.  
  48. /* Return a  string which is the English representation of the
  49.    amount of idle time present in ITIME.  Note that ITIME is a long. */
  50. char *idle_time_string ();
  51.  
  52. /* Like malloc () and realloc (), but abort if out of memory. */
  53. void *xmalloc (), *xrealloc ();
  54.  
  55. /* Return the real person name of ENTRY. */
  56. char *pw_real_name ();
  57.  
  58. /* Return copy of string. */
  59. char *xstrdup ();
  60.  
  61. /* Strip off domain part of FQDN, if any. */
  62. char *sans_domain ();
  63.  
  64. /* Test if console */
  65. int is_console ();
  66.  
  67. #endif /* _UTIL_H_ */
  68.