+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these libraries and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
/* $XConsortium: getfname.c /main/9 1996/11/08 02:06:43 cde-fuj $ */
/*
* (c) Copyright 1995 FUJITSU LIMITED
#if !defined( SYSV )
#include <sys/resource.h>
#endif
-#ifdef __osf__
-#define _BSD
-#endif
#include <sys/wait.h>
-#ifdef __osf__
-#undef _BSD
-#endif
#else
#include <wait.h>
#endif /* SVR4 */
return NULL;
}
}
- link_name[len] = '\0';
+ link_name[len-1] = 0;
if ( link_name[0] == '/' ) {
/* strcpy( ret_name, link_name ) ; */
FreeString( ret_name ) ;
return(-2) ;
}
case _FAL_MALOC_ER :
- USAGE("System call error occured.\n" ) ;
+ USAGE("System call error occurred.\n" ) ;
return(-2) ;
default :
USAGE3("There is no font file correspond to specified font.\n(%s)\n fal_utyerror = %d fal_utyderror = %d\n",
{
FILE *fp ;
pid_t chld_pid = 0;
-#if defined( SVR4 ) || defined( SYSV )
+#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(linux)
int chld_stat ;
#else
union wait chld_stat ;
ep++ ;
}
*ep = '\0' ;
- strcpy(fntbuf, sp) ;
+ snprintf(fntbuf, sizeof(fntbuf), "%s", sp) ;
getstat |= 0x01 ;
fclose( fp );
if (head.snf_file != NULL) {