source: buchla-68k/orig/GP/MAKEFNM.C@ 0170798

Last change on this file since 0170798 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Imported original source code.

  • Property mode set to 100755
File size: 1008 bytes
RevLine 
[3ae31e9]1/*
2 ============================================================================
3 makefnm.c -- create a file name
4 Version 1 -- 1988-07-13 -- D.N. Lynx Crowe
5 ============================================================================
6*/
7
8extern char *rindex();
9
10/*
11 ============================================================================
12 makefnm(dest, src, ext) -- create a file name
13
14 Where:
15
16 char *dest destination string pointer
17 char *src root name string pointer
18 char *ext extension string pointer (inc. '.')
19 ============================================================================
20*/
21
22makefnm(dest, src, ext)
23char *dest, *src, *ext;
24{
25 register char *cp;
26
27 strcpy(dest, src); /* copy the root name string */
28
29 cp = rindex(dest, '.'); /* search for '.' */
30
31 if (cp != (char *)0L) /* if it's got a '.' ... */
32 strcpy(cp, ext); /* ... copy ext string over the '.' */
33 else
34 strcat(dest, ext); /* ... otherwise, append ext string */
35}
Note: See TracBrowser for help on using the repository browser.