本文整理汇总了C++中INCCS函数的典型用法代码示例。如果您正苦于以下问题:C++ INCCS函数的具体用法?C++ INCCS怎么用?C++ INCCS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了INCCS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: capitalizeword
int
capitalizeword(UNUSED(char **args))
{
int first, n = zmult;
int neg = n < 0, ocs = zlecs;
if (neg)
n = -n;
while (n--) {
first = 1;
while (zlecs != zlell && !ZC_iword(zleline[zlecs]))
INCCS();
while (zlecs != zlell && ZC_iword(zleline[zlecs]) && !ZC_ialpha(zleline[zlecs]))
INCCS();
while (zlecs != zlell && ZC_iword(zleline[zlecs])) {
zleline[zlecs] = (first) ? ZC_toupper(zleline[zlecs]) :
ZC_tolower(zleline[zlecs]);
first = 0;
INCCS();
}
}
if (neg)
zlecs = ocs;
return 0;
}
开发者ID:zsh-users,项目名称:zsh,代码行数:25,代码来源:zle_word.c
示例2: viforwardword
int
viforwardword(char **args)
{
int n = zmult;
if (n < 0) {
int ret;
zmult = -n;
ret = vibackwardword(args);
zmult = n;
return ret;
}
while (n--) {
int nl;
int cc = wordclass(zleline[zlecs]);
while (zlecs != zlell && wordclass(zleline[zlecs]) == cc) {
INCCS();
}
if (wordflag && !n)
return 0;
nl = (zleline[zlecs] == ZWC('\n'));
while (zlecs != zlell && nl < 2 && ZC_inblank(zleline[zlecs])) {
INCCS();
nl += (zleline[zlecs] == ZWC('\n'));
}
}
return 0;
}
开发者ID:zsh-users,项目名称:zsh,代码行数:28,代码来源:zle_word.c
示例3: viforwardword
int
viforwardword(char **args)
{
int n = zmult;
if (n < 0) {
int ret;
zmult = -n;
ret = backwardword(args);
zmult = n;
return ret;
}
while (n--) {
int nl;
if (Z_vialnum(zleline[zlecs]))
while (zlecs != zlell && Z_vialnum(zleline[zlecs]))
INCCS();
else
while (zlecs != zlell && !Z_vialnum(zleline[zlecs]) &&
!ZC_inblank(zleline[zlecs]))
INCCS();
if (wordflag && !n)
return 0;
nl = (zleline[zlecs] == ZWC('\n'));
while (zlecs != zlell && nl < 2 && ZC_inblank(zleline[zlecs])) {
INCCS();
nl += (zleline[zlecs] == ZWC('\n'));
}
}
return 0;
}
开发者ID:AMDmi3,项目名称:zsh,代码行数:31,代码来源:zle_word.c
示例4: transposechars
int
transposechars(UNUSED(char **args))
{
int ct;
int n = zmult;
int neg = n < 0;
if (neg)
n = -n;
while (n--) {
if (!(ct = zlecs) || zleline[zlecs - 1] == '\n') {
if (zlell == zlecs || zleline[zlecs] == '\n')
return 1;
if (!neg)
INCCS();
INCPOS(ct);
}
if (neg) {
if (zlecs && zleline[zlecs - 1] != '\n') {
DECCS();
if (ct > 1 && zleline[ct - 2] != '\n') {
DECPOS(ct);
}
}
} else {
if (zlecs != zlell && zleline[zlecs] != '\n')
INCCS();
}
if (ct == zlell || zleline[ct] == '\n') {
DECPOS(ct);
}
if (ct < 1 || zleline[ct - 1] == '\n')
return 1;
#ifdef MULTIBYTE_SUPPORT
{
/*
* We should keep any accents etc. on their original characters.
*/
int start = ct, end = ct;
DECPOS(start);
INCPOS(end);
transpose_swap(start, ct, end);
}
#else
{
ZLE_CHAR_T cc = zleline[ct - 1];
zleline[ct - 1] = zleline[ct];
zleline[ct] = cc;
}
#endif
}
return 0;
}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:54,代码来源:zle_misc.c
示例5: vioperswapcase
int
vioperswapcase(UNUSED(char **args))
{
int oldcs, c2, ret = 1;
/* get the range */
startvichange(1);
if ((c2 = getvirange(0)) != -1) {
oldcs = zlecs;
/* swap the case of all letters within range */
while (zlecs < c2) {
if (ZC_ilower(zleline[zlecs]))
zleline[zlecs] = ZC_toupper(zleline[zlecs]);
else if (ZC_iupper(zleline[zlecs]))
zleline[zlecs] = ZC_tolower(zleline[zlecs]);
INCCS();
}
/* go back to the first line of the range */
zlecs = oldcs;
ret = 0;
#if 0
vifirstnonblank();
#endif
}
vichgflag = 0;
return ret;
}
开发者ID:Osse,项目名称:zsh,代码行数:27,代码来源:zle_vi.c
示例6: killregion
int
killregion(UNUSED(char **args))
{
if (mark > zlell)
mark = zlell;
if (region_active == 2) {
int a, b;
regionlines(&a, &b);
zlecs = a;
region_active = 0;
cut(zlecs, b - zlecs, CUT_RAW);
shiftchars(zlecs, b - zlecs);
if (zlell) {
if (zlecs == zlell)
DECCS();
foredel(1, 0);
vifirstnonblank(zlenoargs);
}
} else if (mark > zlecs) {
if (invicmdmode())
INCPOS(mark);
forekill(mark - zlecs, CUT_RAW);
} else {
if (invicmdmode())
INCCS();
backkill(zlecs - mark, CUT_FRONT|CUT_RAW);
}
return 0;
}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:29,代码来源:zle_misc.c
示例7: viforwardblankwordend
int
viforwardblankwordend(char **args)
{
int n = zmult;
if (n < 0) {
int ret;
zmult = -n;
ret = vibackwardblankwordend(args);
zmult = n;
return ret;
}
while (n--) {
while (zlecs != zlell) {
int pos = zlecs;
INCPOS(pos);
if (!ZC_inblank(zleline[pos]))
break;
zlecs = pos;
}
while (zlecs != zlell) {
int pos = zlecs;
INCPOS(pos);
if (ZC_inblank(zleline[pos]))
break;
zlecs = pos;
}
}
if (zlecs != zlell && virangeflag)
INCCS();
return 0;
}
开发者ID:zsh-users,项目名称:zsh,代码行数:32,代码来源:zle_word.c
示例8: viputafter
int
viputafter(UNUSED(char **args))
{
Cutbuffer buf = &cutbuf;
int n = zmult;
startvichange(-1);
if (n < 0)
return 1;
if (zmod.flags & MOD_VIBUF)
buf = &vibuf[zmod.vibuf];
if (!buf->buf)
return 1;
if(buf->flags & CUTBUFFER_LINE) {
zlecs = findeol();
spaceinline(buf->len + 1);
zleline[zlecs++] = ZWC('\n');
ZS_memcpy(zleline + zlecs, buf->buf, buf->len);
vifirstnonblank(zlenoargs);
} else {
if (zlecs != findeol())
INCCS();
while (n--) {
spaceinline(buf->len);
ZS_memcpy(zleline + zlecs, buf->buf, buf->len);
zlecs += buf->len;
}
if (zlecs)
DECCS();
}
return 0;
}
开发者ID:Osse,项目名称:zsh,代码行数:32,代码来源:zle_vi.c
示例9: dovilinerange
static int
dovilinerange(void)
{
int pos = zlecs, n = zmult;
/* A number of lines is taken as the range. The current line *
* is included. If the repeat count is positive the lines go *
* downward, otherwise upward. The repeat count gives the *
* number of lines. */
vilinerange = 1;
if (!n)
return 1;
if (n > 0) {
while(n-- && zlecs <= zlell)
zlecs = findeol() + 1;
if (n != -1) {
zlecs = pos;
return 1;
}
DECCS();
} else {
while(n++ && zlecs >= 0)
zlecs = findbol() - 1;
if (n != 1) {
zlecs = pos;
return 1;
}
INCCS();
}
virangeflag = 2;
return 0;
}
开发者ID:Osse,项目名称:zsh,代码行数:32,代码来源:zle_vi.c
示例10: viaddnext
int
viaddnext(UNUSED(char **args))
{
if (zlecs != findeol())
INCCS();
startvitext(1);
return 0;
}
开发者ID:Osse,项目名称:zsh,代码行数:8,代码来源:zle_vi.c
示例11: downcaseword
int
downcaseword(UNUSED(char **args))
{
int n = zmult;
int neg = n < 0, ocs = zlecs;
if (neg)
n = -n;
while (n--) {
while (zlecs != zlell && !ZC_iword(zleline[zlecs]))
INCCS();
while (zlecs != zlell && ZC_iword(zleline[zlecs])) {
zleline[zlecs] = ZC_tolower(zleline[zlecs]);
INCCS();
}
}
if (neg)
zlecs = ocs;
return 0;
}
开发者ID:zsh-users,项目名称:zsh,代码行数:20,代码来源:zle_word.c
示例12: forwardword
int
forwardword(char **args)
{
int n = zmult;
if (n < 0) {
int ret;
zmult = -n;
ret = backwardword(args);
zmult = n;
return ret;
}
while (n--) {
while (zlecs != zlell && ZC_iword(zleline[zlecs]))
INCCS();
if (wordflag && !n)
return 0;
while (zlecs != zlell && !ZC_iword(zleline[zlecs]))
INCCS();
}
return 0;
}
开发者ID:zsh-users,项目名称:zsh,代码行数:22,代码来源:zle_word.c
示例13: gosmacstransposechars
int
gosmacstransposechars(UNUSED(char **args))
{
if (zlecs < 2 || zleline[zlecs - 1] == '\n' || zleline[zlecs - 2] == '\n') {
int twice = (zlecs == 0 || zleline[zlecs - 1] == '\n');
if (zlecs == zlell || zleline[zlecs] == '\n')
return 1;
INCCS();
if (twice) {
if (zlecs == zlell || zleline[zlecs] == '\n')
return 1;
INCCS();
}
}
#ifdef MULTIBYTE_SUPPORT
{
int start, middle;
middle = zlecs;
DECPOS(middle);
start = middle;
DECPOS(start);
transpose_swap(start, middle, zlecs);
}
#else
{
ZLE_CHAR_T cc = zleline[zlecs - 2];
zleline[zlecs - 2] = zleline[zlecs - 1];
zleline[zlecs - 1] = cc;
}
#endif
return 0;
}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:37,代码来源:zle_misc.c
示例14: viforwardwordend
int
viforwardwordend(char **args)
{
int n = zmult;
if (n < 0) {
int ret;
zmult = -n;
ret = vibackwardwordend(args);
zmult = n;
return ret;
}
while (n--) {
int pos;
while (zlecs != zlell) {
pos = zlecs;
INCPOS(pos);
if (!ZC_inblank(zleline[pos]))
break;
zlecs = pos;
}
if (zlecs != zlell) {
pos = zlecs;
INCPOS(pos);
if (Z_vialnum(zleline[pos])) {
for (;;) {
zlecs = pos;
if (zlecs == zlell)
break;
INCPOS(pos);
if (!Z_vialnum(zleline[pos]))
break;
}
} else {
for (;;) {
zlecs = pos;
if (zlecs == zlell)
break;
INCPOS(pos);
if (Z_vialnum(zleline[pos]) || ZC_inblank(zleline[pos]))
break;
}
}
}
}
if (zlecs != zlell && virangeflag)
INCCS();
return 0;
}
开发者ID:AMDmi3,项目名称:zsh,代码行数:49,代码来源:zle_word.c
示例15: vibackwardword
int
vibackwardword(char **args)
{
int n = zmult;
if (n < 0) {
int ret;
zmult = -n;
ret = backwardword(args);
zmult = n;
return ret;
}
while (n--) {
int nl = 0;
while (zlecs) {
DECCS();
if (!ZC_inblank(zleline[zlecs]))
break;
nl += (zleline[zlecs] == ZWC('\n'));
if (nl == 2) {
INCCS();
break;
}
}
if (zlecs) {
int pos = zlecs;
if (Z_vialnum(zleline[pos])) {
for (;;) {
zlecs = pos;
if (zlecs == 0)
break;
DECPOS(pos);
if (!Z_vialnum(zleline[pos]))
break;
}
} else {
for (;;) {
zlecs = pos;
if (zlecs == 0)
break;
DECPOS(pos);
if (Z_vialnum(zleline[pos]) || ZC_inblank(zleline[pos]))
break;
}
}
}
}
return 0;
}
开发者ID:AMDmi3,项目名称:zsh,代码行数:49,代码来源:zle_word.c
示例16: pastebuf
/* position: 0 is before, 1 after, 2 split the line */
static void pastebuf(Cutbuffer buf, int mult, int position)
{
int cc;
if (buf->flags & CUTBUFFER_LINE) {
if (position == 2) {
if (!zlecs)
position = 0;
else if (zlecs == zlell)
position = 1;
}
if (position == 2) {
yankb = zlecs;
spaceinline(buf->len + 2);
zleline[zlecs++] = ZWC('\n');
ZS_memcpy(zleline + zlecs, buf->buf, buf->len);
zlecs += buf->len;
zleline[zlecs] = ZWC('\n');
yanke = zlecs + 1;
} else if (position != 0) {
yankb = zlecs = findeol();
spaceinline(buf->len + 1);
zleline[zlecs++] = ZWC('\n');
yanke = zlecs + buf->len;
ZS_memcpy(zleline + zlecs, buf->buf, buf->len);
} else {
yankb = zlecs = findbol();
spaceinline(buf->len + 1);
ZS_memcpy(zleline + zlecs, buf->buf, buf->len);
yanke = zlecs + buf->len + 1;
zleline[zlecs + buf->len] = ZWC('\n');
}
vifirstnonblank(zlenoargs);
} else {
if (position == 1 && zlecs != findeol())
INCCS();
yankb = zlecs;
cc = buf->len;
while (mult--) {
spaceinline(cc);
ZS_memcpy(zleline + zlecs, buf->buf, cc);
zlecs += cc;
}
yanke = zlecs;
if (zlecs && invicmdmode())
DECCS();
}
}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:48,代码来源:zle_misc.c
示例17: forekill
mod_export void
forekill(int ct, int flags)
{
int i = zlecs;
UNMETACHECK();
if (!(flags & CUT_RAW)) {
int n = ct;
while (n--)
INCCS();
ct = zlecs - i;
zlecs = i;
}
cut(i, ct, flags);
shiftchars(i, ct);
CCRIGHT();
}
开发者ID:Lujaw,项目名称:zsh,代码行数:18,代码来源:zle_utils.c
示例18: viswapcase
int
viswapcase(UNUSED(char **args))
{
int eol, n = zmult;
startvichange(-1);
if (n < 1)
return 1;
eol = findeol();
while (zlecs < eol && n--) {
if (ZC_ilower(zleline[zlecs]))
zleline[zlecs] = ZC_toupper(zleline[zlecs]);
else if (ZC_iupper(zleline[zlecs]))
zleline[zlecs] = ZC_tolower(zleline[zlecs]);
INCCS();
}
if (zlecs && zlecs == eol)
DECCS();
return 0;
}
开发者ID:Osse,项目名称:zsh,代码行数:20,代码来源:zle_vi.c
示例19: vidowncase
int
vidowncase(UNUSED(char **args))
{
int oldcs, c2, ret = 1;
/* get the range */
startvichange(1);
if ((c2 = getvirange(0)) != -1) {
oldcs = zlecs;
/* convert the case of all letters within range */
while (zlecs < c2) {
zleline[zlecs] = ZC_tolower(zleline[zlecs]);
INCCS();
}
/* go back to the first line of the range */
zlecs = oldcs;
ret = 0;
}
vichgflag = 0;
return ret;
}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:21,代码来源:zle_vi.c
示例20: deletechar
int
deletechar(char **args)
{
int n;
if (zmult < 0) {
int ret;
zmult = -zmult;
ret = backwarddeletechar(args);
zmult = -zmult;
return ret;
}
n = zmult;
while (n--) {
if (zlecs == zlell)
return 1;
INCCS();
}
backdel(zmult, 0);
return 0;
}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:21,代码来源:zle_misc.c
注:本文中的INCCS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论