home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / utility / tolower.c < prev    next >
Encoding:
C/C++ Source or Header  |  1978-03-06  |  1.4 KB  |  74 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: tolower.c,v 1.5 1996/10/24 15:51:38 aros Exp $
  4.     $Log: tolower.c,v $
  5.     Revision 1.5  1996/10/24 15:51:38  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/09/13 17:14:47  digulla
  9.     Removed the TOLOWER() macros. Use the library function instead
  10.  
  11.     Revision 1.3  1996/08/13 14:10:31  digulla
  12.     Replaced AROS_LA by AROS_LHA
  13.  
  14.     Revision 1.2  1996/08/01 17:41:42  digulla
  15.     Added standard header for all files
  16.  
  17.     Desc:
  18.     Lang: english
  19. */
  20. #include <exec/types.h>
  21. #include <aros/libcall.h>
  22. #include "utility_intern.h"
  23.  
  24. /*****************************************************************************
  25.  
  26.     NAME */
  27.     #include <clib/utility_protos.h>
  28.  
  29.     AROS_LH1I(UBYTE, ToLower,
  30.  
  31. /*  SYNOPSIS */
  32.     AROS_LHA(ULONG, character, D0),
  33.  
  34. /*  LOCATION */
  35.     struct UtilityBase *, UtilityBase, 30, Utility)
  36.  
  37. /*  FUNCTION
  38.     Convert a character to lower case.
  39.  
  40.     INPUTS
  41.     character - The character to convert.
  42.  
  43.     RESULT
  44.     Equivalent lower case character.
  45.  
  46.     NOTES
  47.  
  48.     EXAMPLE
  49.  
  50.     BUGS
  51.  
  52.     SEE ALSO
  53.  
  54.     INTERNALS
  55.  
  56.     HISTORY
  57.  
  58. *****************************************************************************/
  59. {
  60.     AROS_LIBFUNC_INIT
  61.  
  62.     return
  63.     (
  64.     (character >= 'A' && character <= 'Z')
  65.     || (character >= 0xC0
  66.         && character <= 0xDE
  67.         && character != 0xD7)
  68.     ? character + 0x20
  69.     : character
  70.     );
  71.  
  72.     AROS_LIBFUNC_EXIT
  73. } /* ToLower */
  74.