repo.or.cz
/
opsoft_archive.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add very old versions (for history).
[opsoft_archive.git]
/
silentbob
/
silentbob-1.4
/
sblib
/
name2obj.cxx
blob
1786eeb60ac4003a98031c8ffccc23621dcfb480
1
/*
2
* (c) Oleg Puchinin 2007
3
* graycardinalster@gmail.com
4
*
5
*/
6
7
#include <string.h>
8
9
char
*
name2obj
(
char
*
name
)
10
{
11
char
*
S
;
12
char
m_buf
[
512
];
13
if
(!
name
)
14
return
NULL
;
15
strcpy
(
m_buf
,
name
);
16
S
=
rindex
(
m_buf
,
'.'
);
17
if
(!
S
)
18
return
NULL
;
19
strcpy
(
S
,
".o"
);
20
return
strdup
(
m_buf
);
21
}
22