src/shstrs.c

00001 
00006 /*
00007  *  PROGRAM NAME:  sh
00008  *
00009  *  (c) COPYRIGHT INTERNATIONAL BUSINESS MACHINES
00010  *  CORPORATION 12/1/2001.  ALL RIGHTS RESERVED.
00011  *
00012  *  Please refer to the LICENSE file in the top directory
00013  *
00014  *      author: Mike Henderson mhender@watson.ibm.com
00015  */
00016 
00017 static char *id="@(#) $Id: shstrs.c,v 1.2 2006/08/17 19:28:17 mhender Exp $";
00018 
00019 #include <shInternal.h>
00020 
00021 extern int SHnstr;
00022 extern char **SHstr;
00023 extern int *SHxstr;
00024 extern int *SHystr;
00025 extern double *SHzstr;
00026 
00034 void shstrs(int xx,int yy,char *str)
00035  {
00036   SHstr=(char**)realloc(SHstr,(SHnstr+1)*sizeof(char*));
00037   SHxstr=(int*)realloc(SHxstr,(SHnstr+1)*sizeof(int));
00038   SHystr=(int*)realloc(SHystr,(SHnstr+1)*sizeof(int));
00039   SHzstr=(double*)realloc(SHzstr,(SHnstr+1)*sizeof(double));
00040 
00041   SHxstr[SHnstr]=xx;
00042   SHystr[SHnstr]=yy;
00043   SHzstr[SHnstr]=-1.;
00044   SHstr[SHnstr]=(char*)malloc((strlen(str)+1)*sizeof(char));
00045   strcpy(SHstr[SHnstr],str);
00046   SHnstr++;
00047 
00048   return;
00049  }

Generated on Thu Aug 17 15:29:43 2006 for sh by  doxygen 1.4.6