src/shname.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: shname.c,v 1.2 2006/08/17 19:28:17 mhender Exp $";
00018 
00021 extern char *shOutputName;
00022 
00025 #include <sh.h>
00026 #include <shInternal.h>
00027 #include <string.h>
00028 #include <stdlib.h>
00029 
00035 void shSetOutputFilename(char *name)
00036  {
00037   shOutputName=(char*)realloc(shOutputName,(strlen(name)+10)*sizeof(char));
00038   strcpy(shOutputName,name);
00039   if(!strcmp(shOutputFormat,"tiff"))
00040     strcat(shOutputName,".tiff");
00041    else
00042     strcat(shOutputName,".ps");
00043 
00044   return;
00045  }

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