📄 gb_replace_temp.h
字号:
/*************************************************************************** replace_t.h Replace functions. (c) 2000-2004 Beno顃 Minisini <gambas@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.***************************************************************************/#include "gb_replace.h"#include <stdlib.h>#include <string.h>#ifndef HAVE_SETENVint setenv(const char *name, const char *value, int overwrite){ char *env; if (!name || *name == 0) return (-1); if (overwrite == 0) { if (getenv(name)) return 0; } env = malloc(strlen(name) + strlen(value) + 2); if (!env) return (-1); strcpy(env, name); strcat(env, "="); strcat(env, value); putenv(env); return 0;}#endif#ifndef HAVE_UNSETENVextern char **environ;void unsetenv(const char *name){ size_t len; char **ep; if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) return; len = strlen(name); ep = environ; while (*ep != NULL) { if (!strncmp (*ep, name, len) && (*ep)[len] == '=') { char **dp = ep; do dp[0] = dp[1]; while (*dp++); } else ++ep; }}#endif#ifndef HAVE_GETDOMAINNAMEint getdomainname(char *name, size_t len){#if defined(HAVE_SYSINFO) && defined(SI_SRPC_DOMAIN) sysinfo(SI_SRPC_DOMAIN, name, len);#else *name = 0; return 0;#endif}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -