src/shpause.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: shpause.c,v 1.2 2006/08/17 19:28:17 mhender Exp $";
00018 
00019 #include <shInternal.h>
00020 #include <stdlib.h>
00021 #include <string.h>
00022 
00025 char *shOutputName=(char*)NULL;
00026 
00033 void shpause()
00034  {
00035   char string[256]="";
00036   int n;
00037   char *basename;
00038 
00039   if(shOutputName==(char*)NULL)
00040    {
00041     sprintf(string,"%s%3.3i.ps",getenv("_"),sh_frame);
00042     sh_frame++;
00043   
00044     if((basename=strrchr(string,'/'))==(char*)NULL)basename=string;
00045      else basename++;
00046   
00047     n=strlen(basename);
00048     shsave(basename,&n,n);
00049    }else{
00050     n=strlen(shOutputName);
00051     shsave(shOutputName,&n,n);
00052    }
00053  }

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