OSDN Git Service
(root)
/
lib1stclass
/
main.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
265e7d85bfa65473702c51530fa776f64d398735
[lib1stclass/main.git]
/
shmf.c
1
#include <string.h>
2
3
char *shmf(const char *file, char *shmfile){
4
char tmp_file[1024]="";
5
int i;
6
safe_strcat(tmp_file, file);
7
for(i=0;i<1024;i++){
8
if(tmp_file[i] == '/'){
9
tmp_file[i]='_';
10
}
11
else if(tmp_file[i] == '\0'){
12
break;
13
}
14
}
15
safe_strcat(shmfile, "/dev/shm/");
16
safe_strcat(shmfile, tmp_file);
17
return tmp_file;
18
}