00001 // $Id: f_his_toupper.c 478 2009-10-29 12:26:09Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 /*****************+***********+****************************************/ 00015 /* */ 00016 /* GSI, Gesellschaft fuer Schwerionenforschung mbH */ 00017 /* Postfach 11 05 52 */ 00018 /* D-64220 Darmstadt */ 00019 /* */ 00020 /*1+ C Procedure *************+****************************************/ 00021 /* */ 00022 /*+ Module : f_his_toupper */ 00023 /* */ 00024 /*--------------------------------------------------------------------*/ 00025 /*+ CALLING : f_his_toupper(string,i_max) */ 00026 /*--------------------------------------------------------------------*/ 00027 /* */ 00028 /*+ PURPOSE : Convert string to upper case. */ 00029 /* */ 00030 /*+ ARGUMENTS : */ 00031 /* */ 00032 /*+ string : (char *) input/output */ 00033 /* pointer to character string */ 00034 /* */ 00035 /*+ i_max : int input */ 00036 /* maximum number of char to be converted. */ 00037 /* */ 00038 /*+ Return type : void */ 00039 /* */ 00040 /*2+Description***+***********+****************************************/ 00041 /* */ 00042 /*+ CALLING : f_his_tolower(string,i_max) */ 00043 /* */ 00044 /*+ FUNCTION : Converts string to upper case until '\0' or */ 00045 /* the specified maximum number of characters */ 00046 /* */ 00047 /*3+Function******+***********+****************************************/ 00048 /* */ 00049 /*2+Implementation************+****************************************/ 00050 /*+ Utility : f_his_toupper */ 00051 /*+ File name : f_his_toupper.c */ 00052 /*+ Home direct.: /sbs/prod/src */ 00053 /*+ Version : 1.01 */ 00054 /*+ Author : Ilya Kuznetsov */ 00055 /*+ Created : 20-Sep-1994 */ 00056 /*+ Object libr.: libxxx.a */ 00057 /*+ Updates : Date Purpose */ 00058 /*- 11-Oct-94 : changes/RSM */ 00059 /*1- C Procedure *************+****************************************/ 00060 00061 #include "f_his_toupper.h" 00062 00063 void f_his_toupper(CHARS* c, INTS4 i) 00064 /* +++ convert string to uppercase, max i char +++ */ 00065 { 00066 INTS4 i_j=0; 00067 while (!((c[i_j]=='\0') || (i_j==i))) 00068 { 00069 c[i_j]=(CHARS)toupper((INTS4)c[i_j]); 00070 i_j++; 00071 } 00072 c[i_j] = '\0'; 00073 }