📄 utility.cpp
字号:
/*
Robot Interface
(C) 2006 Jason Hunt
nulluser@gmail.com
File: utility.cpp
*/
#include <windows.h>
#include <stdio.h>
#include "display.h"
CRITICAL_SECTION debug_lock;
/* Add a byte to a buffer */
void append_byte(unsigned char *buffer, unsigned int &index, unsigned char data)
{
buffer[index++] = data;
}
/* End of append_byte */
void debug_start(void)
{
InitializeCriticalSection(&debug_lock);
}
void debug(char *s)
{
// return;
add_line(s);
EnterCriticalSection(&debug_lock);
FILE *f = fopen("debug.txt", "at");
fprintf(f, "%s\n", s);
fclose(f);
LeaveCriticalSection(&debug_lock);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -