mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-14 00:38:55 +00:00
c5303272d9
- r_cons_user_fgets() is a configurable function pointer - Simplify build * Initial import of r_sysproxy - Directly copied from r1 (no api or anything working yet) * R_APIze r_vm and r_print * Make r_core_seek more consistent * Move r_cons_progressbar() to r_print * Rename visual 'x' -> 'w' (oops) - 'a' and 'w' are now compatible with cursor mode * Implement r_sys_usleep() on w32 and fix r_sys_sleep()
52 lines
786 B
C
52 lines
786 B
C
/* radare - LGPL - Copyright 2009 pancake<nopcode.org> */
|
|
|
|
#include <r_types.h>
|
|
/* TODO: import stuff fron bininfo/p/bininfo_addr2line */
|
|
|
|
R_API char *r_sys_cmd_str(const char *cmd)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
R_API char *r_sys_cmd_strf(const char *cmd, ...)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
R_API int r_sys_sleep(int secs)
|
|
{
|
|
#if __UNIX__
|
|
return sleep(secs);
|
|
#else
|
|
Sleep(secs * 1000); // W32
|
|
return 0;
|
|
#endif
|
|
}
|
|
|
|
R_API int r_sys_usleep(int usecs)
|
|
{
|
|
#if __UNIX__
|
|
return usleep(usecs);
|
|
#else
|
|
Sleep(secs); // W32
|
|
#endif
|
|
}
|
|
|
|
R_API int r_sys_setenv(const char *key, const char *value, int ow)
|
|
{
|
|
#if __UNIX__
|
|
return setenv(key, value, ow);
|
|
#else
|
|
#warning TODO: r_sys_setenv
|
|
#endif
|
|
}
|
|
|
|
R_API const char *r_sys_getenv(const char *key)
|
|
{
|
|
#if __UNIX__
|
|
return getenv(key);
|
|
#else
|
|
#warning TODO: r_sys_getenv
|
|
#endif
|
|
}
|