remove OSF1 support
[oweals/cde.git] / cde / programs / dtudcfonted / libfuty / getfname.c
index 21f92ddceebd57aede79a58f860d66f330cd65e3..0c1be5def284be6d4697897580211e042ab17973 100644 (file)
@@ -16,7 +16,7 @@
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * 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
  */
 #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 */
@@ -733,7 +727,7 @@ char        *name;
                                return  NULL;
                        }
                }
-               link_name[len] = '\0';
+               link_name[len-1] = 0;
                if ( link_name[0] == '/' ) {
                        /* strcpy( ret_name, link_name ) ; */
                        FreeString( ret_name ) ;
@@ -843,7 +837,7 @@ char                *fname ;
                        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",
@@ -1047,7 +1041,7 @@ char      **fontname ;
 {
        FILE    *fp ;
        pid_t   chld_pid = 0;
-#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED)
+#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(linux)
        int     chld_stat ;
 #else
        union   wait    chld_stat ;
@@ -1142,7 +1136,7 @@ char      **fontname ;
                    ep++ ;
                }
                *ep = '\0' ;
-               strcpy(fntbuf, sp) ;
+               snprintf(fntbuf, sizeof(fntbuf), "%s", sp) ;
                getstat |= 0x01 ;
                fclose( fp );
                if (head.snf_file != NULL) {