<pre name="code" class="cpp"><span style="font-size:18px;">/*
* utils.em
*
* Created on: March 13, 2015
* Author: xtank.nie@gmail.com
*/
//szMyName = getenv(MYNAME)
/*
* 1. GetCurrentBuf(): 获取当前输入的句柄
* 2. GetCurSymbol(): 获取当前光标后的符号
* 3. GetBufLnCur(): 获取当前光标所在的行号
* 4. hwnd=GetCurrentWnd(), sel=GetWndSel(hwnd), col=sel.ichFirst+1 : 获取列号
* 5. InsBufLine(hbuf, ln, sz): 在ln行插入sz的字符内容
* 6. SetBufIns(hbuf, ln, n): 将光标转移到第ln行的第n在字符
* 7. sz = cat(sz, "abc"): 将abc添加到sz后面
*/
/******************************************************************************/
macro InsertHeader()
{
hbuf = GetCurrentBuf()
ln = GetBufLnCur(hbuf)
if (ln < 0)
{
ln = 0
}
sz = "/******************************************************************************/"
InsBufLine(hbuf, ln, sz)
SetBufIns(hbuf, ln+1, 0)
}
/******************************************************************************/
macro GetCurrentFileName(pathName)
{
name = ""
nlength = strlen(pathName)
i = nlength - 1
while (i + 1)
{
ch = pathName[i]
if ("\\" == "@ch@")
break
i = i - 1
}
i = i + 1
while (i < nlength)
{
name = cat(name, pathName[i])
i = i + 1
}
return name
}
macro MonthNumToName(Month)
{
if (Month == 1)
return "January"
if (Month == 2)
return "February"
if (Month == 3)
return "March"
if (Month == 4)
return "April"
if (Month == 5)
return "May"
if (Month == 6)
return "June"
if (Month == 7)
return "July"
if (Month == 8)
return "August"
if (Month == 9)
return "September"
if (Month == 10)
return "October"
if (Month
source insight 的base工程配置文件utils.em的修改
最新推荐文章于 2022-04-29 09:32:50 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)