add pos and unset_signals funcs
This commit is contained in:
parent
c3ff1bcebb
commit
b51098f521
@ -673,6 +673,20 @@ g_atoi(char* str)
|
||||
return atoi(str);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
g_pos(char* str, char* to_find)
|
||||
{
|
||||
char* pp;
|
||||
|
||||
pp = strstr(str, to_find);
|
||||
if (pp == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return (pp - str);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
long
|
||||
g_load_library(char* in)
|
||||
@ -779,6 +793,16 @@ g_signal_child_stop(void (*func)(int))
|
||||
#endif
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void
|
||||
g_unset_signals(void)
|
||||
{
|
||||
sigset_t mask;
|
||||
|
||||
sigemptyset(&mask);
|
||||
sigprocmask(SIG_SETMASK, &mask, NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int
|
||||
g_fork(void)
|
||||
|
@ -117,6 +117,8 @@ int
|
||||
g_strncmp(char* c1, char* c2, int len);
|
||||
int
|
||||
g_atoi(char* str);
|
||||
int
|
||||
g_pos(char* str, char* to_find);
|
||||
long
|
||||
g_load_library(char* in);
|
||||
int
|
||||
@ -136,6 +138,8 @@ void
|
||||
g_signal(int sig_num, void (*func)(int));
|
||||
void
|
||||
g_signal_child_stop(void (*func)(int));
|
||||
void
|
||||
g_unset_signals(void);
|
||||
int
|
||||
g_fork(void);
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user