开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (1)
标签 (5202)
master
v8.0.0106
v8.0.0105
v8.0.0104
v8.0.0103
v8.0.0102
v8.0.0101
v8.0.0100
v8.0.0099
v8.0.0098
v8.0.0097
v8.0.0096
v8.0.0095
v8.0.0094
v8.0.0093
v8.0.0092
v8.0.0091
v8.0.0090
v8.0.0089
v8.0.0088
v8.0.0087
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
项目仓库所选许可证以仓库主分支所使用许可证为准
master
分支 (1)
标签 (5202)
master
v8.0.0106
v8.0.0105
v8.0.0104
v8.0.0103
v8.0.0102
v8.0.0101
v8.0.0100
v8.0.0099
v8.0.0098
v8.0.0097
v8.0.0096
v8.0.0095
v8.0.0094
v8.0.0093
v8.0.0092
v8.0.0091
v8.0.0090
v8.0.0089
v8.0.0088
v8.0.0087
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1)
标签 (5202)
master
v8.0.0106
v8.0.0105
v8.0.0104
v8.0.0103
v8.0.0102
v8.0.0101
v8.0.0100
v8.0.0099
v8.0.0098
v8.0.0097
v8.0.0096
v8.0.0095
v8.0.0094
v8.0.0093
v8.0.0092
v8.0.0091
v8.0.0090
v8.0.0089
v8.0.0088
v8.0.0087
vim-src-code
/
src
/
wsdebug.c
vim-src-code
/
src
/
wsdebug.c
wsdebug.c 4.40 KB
一键复制 编辑 原始数据 按行查看 历史
Bram Moolenaar 提交于 2016年09月26日 03:45 +08:00 . patch 8.0.0012
/* vi:set ts=8 sw=8 noet:
*
* VIM - Vi IMproved by Bram Moolenaar
* Visual Workshop integration by Gordon Prieur
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/*
* WorkShop Debugging Tools. What are these tools and why are they important?
* There are two main tools here. The first tool is a tool for delaying or
* stopping gvim during startup. The second tool is a protocol log tool.
*
* The startup delay tool is called wsdebug_wait(). This is very important for
* debugging startup problems because gvim will be started automatically from
* workshop and cannot be run directly from a debugger. The only way to debug
* a gvim started by workshop is by attaching a debugger to it. Without this
* tool all starup code will have completed before you can get the pid and
* attach.
*
* The second tool is a protocol log tool. The workshop editor server and gvim
* pass information back and forth during a workshop session. Sometimes it is
* very important to peruse this conversation in order to understand what is
* happening. The wsdebug_log_init() call sets up this protocol log tool and
* wsdebug() and wstrace() calls output the information to the log.
*
* This code must have WSDEBUG defined for it to be compiled into vim/gvim.
*/
#ifdef WSDEBUG
#include "vim.h"
FILE *ws_debug = NULL;
u_int ws_dlevel = 0; /* ws_debug verbosity level */
void wsdebug(char *, ...);
void wstrace(char *, ...);
static int lookup(char *);
#ifdef USE_WS_ERRORHANDLER
static int errorHandler(Display *, XErrorEvent *);
#endif
/*
* wsdebug_wait - This function can be used to delay or stop execution of vim.
* It's normally used to delay startup while attaching a
* debugger to a running process. Since workshop starts gvim
* from a background process this is the only way to debug
* startup problems.
*/
void wsdebug_wait(
u_int wait_flags, /* tells what to do */
char *wait_var, /* wait environment variable */
u_int wait_secs) /* how many seconds to wait */
{
init_homedir(); /* not inited yet */
#ifdef USE_WDDUMP
WDDump(0, 0, 0);
#endif
/* for debugging purposes only */
if (wait_flags & WT_ENV && wait_var && getenv(wait_var) != NULL) {
sleep(atoi(getenv(wait_var)));
} else if (wait_flags & WT_WAIT && lookup("~/.gvimwait")) {
sleep(wait_secs > 0 && wait_secs < 120 ? wait_secs : 20);
} else if (wait_flags & WT_STOP && lookup("~/.gvimstop")) {
int w = 1;
while (w) {
;
}
}
} /* end wsdebug_wait */
void
wsdebug_log_init(
char *log_var, /* env var with log file */
char *level_var) /* env var with ws_debug level */
{
char *file; /* possible ws_debug output file */
char *cp; /* ws_dlevel pointer */
if (log_var && (file = getenv(log_var)) != NULL)
{
char buf[BUFSIZ];
vim_snprintf(buf, sizeof(buf), "date > %s", file);
system(buf);
ws_debug = fopen(file, "a");
if (level_var && (cp = getenv(level_var)) != NULL) {
ws_dlevel = strtoul(cp, NULL, 0);
} else {
ws_dlevel = WS_TRACE; /* default level */
}
#ifdef USE_WS_ERRORHANDLER
XSetErrorHandler(errorHandler);
#endif
}
} /* end wsdebug_log_init */
void
wstrace(
char *fmt,
...)
{
va_list ap;
if (ws_debug!= NULL && (ws_dlevel & (WS_TRACE | WS_TRACE_VERBOSE))) {
va_start(ap, fmt);
vfprintf(ws_debug, fmt, ap);
va_end(ap);
fflush(ws_debug);
}
} /* end wstrace */
void
wsdebug(
char *fmt,
...)
{
va_list ap;
if (ws_debug != NULL) {
va_start(ap, fmt);
vfprintf(ws_debug, fmt, ap);
va_end(ap);
fflush(ws_debug);
}
} /* end wsdebug */
static int
lookup(
char *file)
{
char buf[BUFSIZ];
expand_env((char_u *) file, (char_u *) buf, BUFSIZ);
return (access(buf, F_OK) == 0);
} /* end lookup */
#ifdef USE_WS_ERRORHANDLER
static int
errorHandler(
Display *dpy,
XErrorEvent *err)
{
char msg[256];
char buf[256];
XGetErrorText(dpy, err->error_code, msg, sizeof(msg));
wsdebug("\n\nWSDEBUG Vim: X Error of failed request: %s\n", msg);
sprintf(buf, "%d", err->request_code);
XGetErrorDatabaseText(dpy,
"XRequest", buf, "Unknown", msg, sizeof(msg));
wsdebug("\tMajor opcode of failed request: %d (%s)\n",
err->request_code, msg);
if (err->request_code > 128) {
wsdebug("\tMinor opcode of failed request: %d\n",
err->minor_code);
}
return 0;
}
#endif
#endif /* WSDEBUG */
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bearxup/vim-src-code.git
git@gitee.com:bearxup/vim-src-code.git
bearxup
vim-src-code
vim src code
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /