home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / ListSERV2_3.lha / ListSERV / source / string.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-17  |  2.0 KB  |  56 lines

  1. /*
  2.  *      $Filename: string.c $
  3.  *      $Revision: 2.1 $
  4.  *      $Date: 1994/01/17 13:01:29 $
  5.  *
  6.  *      Copyright (C) 1993 by Peter Simons <simons@peti.GUN.de>
  7.  *
  8.  *      This program is free software; you can redistribute it and/or
  9.  *      modify it under the terms of the GNU General Public License as
  10.  *      published by the Free Software Foundation; either version 2 of
  11.  *      the License, or (at your option) any later version.
  12.  *
  13.  *      This program is distributed in the hope that it will be useful,
  14.  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  *      General Public License for more details.
  17.  *
  18.  *      You should have received a copy of the GNU General Public License
  19.  *      along with this program; if not, write to the Free Software
  20.  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  *      $Id: string.c,v 2.1 1994/01/17 13:01:29 simons Exp simons $
  23.  *
  24.  */
  25.  
  26.  
  27. /************************************* includes ***********/
  28. #include <string.h>
  29.  
  30. /************************************* global variables ***/
  31. const char RCSId[] = "$Id: string.c,v 2.1 1994/01/17 13:01:29 simons Exp simons $";
  32.  
  33. const char FATALERROR_MSG[] = \
  34. "Sorry, but fatal error #%d occured while processing your request. The\n"  \
  35. "problem has been reported to the listserv-manager and will be fixed as\n" \
  36. "soon as possible. Please try again later.\n";
  37.  
  38. const char DELETED_MSG[] = \
  39. "Although you have been deleted from the list some mail sent previous\n" \
  40. "to your deletion may be queued in the system. Please don't panic if\n"  \
  41. "you receive a few last pieces of mail.\n";
  42.  
  43.  
  44. /************************************* program ************/
  45. char *stristr(char *line, char *string)
  46. {
  47.         int i, cmplen = strlen(string), end = strlen(line)-cmplen;
  48.  
  49.         for (i = 0; i <= end; i++)
  50.                 if (strnicmp(&line[i], string, cmplen) == NULL)
  51.                         return &line[i];
  52.         return NULL;
  53. }
  54.  
  55.  
  56.