version 1.27, 2009/03/13 04:45:15 |
version 1.32, 2015/03/15 19:31:30 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/file.c,v 1.26 2008/11/19 13:12:43 ohara Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/file.c,v 1.31 2014/05/12 02:27:49 ohara Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
|
|
#define R_OK 0x04 |
#define R_OK 0x04 |
#endif |
#endif |
|
|
|
void Psprintf(NODE,STRING *); |
|
|
void Pget_rootdir(); |
void Pget_rootdir(); |
void Paccess(),Premove_file(); |
void Paccess(),Premove_file(); |
void Pbsave_enc(), Pbload_enc(); |
void Pbsave_enc(), Pbload_enc(); |
Line 81 void Pput_word(), Pget_word(); |
|
Line 83 void Pput_word(), Pget_word(); |
|
void Ppurge_stdin(); |
void Ppurge_stdin(); |
void Pfprintf(); |
void Pfprintf(); |
void Pimport(); |
void Pimport(); |
|
void Pgetpid(); |
|
|
extern int des_encryption; |
extern int des_encryption; |
extern char *asir_libdir; |
extern char *asir_libdir; |
Line 114 struct ftab file_tab[] = { |
|
Line 117 struct ftab file_tab[] = { |
|
{"bload_compat",Pbload_compat,1}, |
{"bload_compat",Pbload_compat,1}, |
{"bsave_cmo",Pbsave_cmo,2}, |
{"bsave_cmo",Pbsave_cmo,2}, |
{"bload_cmo",Pbload_cmo,1}, |
{"bload_cmo",Pbload_cmo,1}, |
|
{"getpid",Pgetpid,0}, |
{0,0,0}, |
{0,0,0}, |
}; |
}; |
|
|
Line 516 void get_rootdir(char *name,int len) |
|
Line 520 void get_rootdir(char *name,int len) |
|
strcpy(name,rootdir.body); |
strcpy(name,rootdir.body); |
return; |
return; |
} |
} |
|
if ( GetModuleFileName(NULL,name,BUFSIZ) ) { |
if ( access("UseCurrentDir",0) >= 0 ) { |
|
GetCurrentDirectory(BUFSIZ,name); |
|
slash = strrchr(name,'\\'); |
slash = strrchr(name,'\\'); |
if ( slash ) |
*slash = 0; |
|
slash = strrchr(name,'\\'); |
|
if ( slash ) |
*slash = 0; |
*slash = 0; |
return; |
return; |
} |
} |
Line 581 void Pget_rootdir(STRING *rp) |
|
Line 585 void Pget_rootdir(STRING *rp) |
|
rootdir.body = DirName; |
rootdir.body = DirName; |
} |
} |
*rp = &rootdir; |
*rp = &rootdir; |
|
} |
|
|
|
void Pgetpid(Q *rp) |
|
{ |
|
int id; |
|
|
|
#if defined(VISUAL) |
|
id = GetCurrentProcessId(); |
|
#else |
|
id = getpid(); |
|
#endif |
|
STOQ(id,*rp); |
} |
} |
|
|
#if defined(DES_ENC) |
#if defined(DES_ENC) |