您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ spaceinline函数代码示例

51自学网 2021-06-03 08:08:38
  C++
这篇教程C++ spaceinline函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中spaceinline函数的典型用法代码示例。如果您正苦于以下问题:C++ spaceinline函数的具体用法?C++ spaceinline怎么用?C++ spaceinline使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了spaceinline函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: viputafter

intviputafter(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,


示例2: viputafter

voidviputafter(void){    Cutbuffer buf = &cutbuf;    startvichange(-1);    if (zmult < 0)	return;    if (gotvibufspec)	buf = &vibuf[vibufspec];    if (!buf->buf) {	feep();	return;    }    vilinerange = !!(buf->flags & CUTBUFFER_LINE);    if (vilinerange) {	cs = findeol();	spaceinline(buf->len + 1);	line[cs++] = '/n';	memcpy((char *)line + cs, buf->buf, buf->len);	vifirstnonblank();    } else {	if (cs != findeol())	    cs++;	while (zmult--) {	    spaceinline(buf->len);	    memcpy((char *)line + cs, buf->buf, buf->len);	    cs += buf->len;	}	if (cs)	    cs--;    }}
开发者ID:prabirshrestha,项目名称:winzsh,代码行数:34,


示例3: poundinsert

intpoundinsert(UNUSED(char **args)){    zlecs = 0;    vifirstnonblank(zlenoargs);    if (zleline[zlecs] != '#') {	spaceinline(1);	zleline[zlecs] = '#';	zlecs = findeol();	while(zlecs != zlell) {	    zlecs++;	    vifirstnonblank(zlenoargs);	    spaceinline(1);	    zleline[zlecs] = '#';	    zlecs = findeol();	}    } else {	foredel(1, 0);	zlecs = findeol();	while(zlecs != zlell) {	    zlecs++;	    vifirstnonblank(zlenoargs);	    if(zleline[zlecs] == '#')		foredel(1, 0);	    zlecs = findeol();	}    }    done = 1;    return 0;}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:30,


示例4: selfinsert

void selfinsert() /**/{int ncs = cs+mult;	if (mult < 0) { mult = -mult; ncs = cs; }	if (insmode || ll == cs)		spaceinline(mult);	else if (mult+cs > ll)		spaceinline(ll-(mult+cs));	while (mult--)		line[cs++] = c;	cs = ncs;}
开发者ID:jonathangray,项目名称:386bsd,代码行数:13,


示例5: viindent

intviindent(UNUSED(char **args)){    int oldcs = zlecs, c2;    /* get the range */    startvichange(1);    if ((c2 = getvirange(0)) == -1) {	vichgflag = 0;	return 1;    }    vichgflag = 0;    /* must be a line range */    if (!vilinerange) {	zlecs = oldcs;	return 1;    }    oldcs = zlecs;    /* add a tab to the beginning of each line within range */    while (zlecs < c2) {	spaceinline(1);	zleline[zlecs] = '/t';	zlecs = findeol() + 1;    }    /* go back to the first line of the range */    zlecs = oldcs;    vifirstnonblank(zlenoargs);    return 0;}
开发者ID:Osse,项目名称:zsh,代码行数:29,


示例6: viquotedinsert

intviquotedinsert(char **args){#ifndef HAS_TIO    struct sgttyb sob;#endif    spaceinline(1);    zleline[zlecs] = '^';    zrefresh();#ifndef HAS_TIO    sob = shttyinfo.sgttyb;    sob.sg_flags = (sob.sg_flags | RAW) & ~ECHO;    ioctl(SHTTY, TIOCSETN, &sob);#endif    getfullchar(0);#ifndef HAS_TIO    zsetterm();#endif    foredel(1, 0);    if(LASTFULLCHAR == ZLEEOF)	return 1;    else	return selfinsert(args);}
开发者ID:Osse,项目名称:zsh,代码行数:25,


示例7: yank

void yank() /**/{int cc;char *buf = cutbuf;	if (!cutbuf) {		feep();		return;	}	if (mult < 0) return;	if (vibufspec) {		vibufspec = tolower(vibufspec);		vibufspec += (idigit(vibufspec)) ? -'1'+26 : -'a';		if (!(buf = vibuf[vibufspec])) {			feep();			vibufspec = 0;			return;		}		vibufspec = 0;	}	yankb = cs;	while (mult--) {		kct = kringnum;		cc = strlen(buf);		spaceinline(cc);		strncpy((char *) line+cs,buf,cc);		cs += cc;		yanke = cs;	}}
开发者ID:jonathangray,项目名称:386bsd,代码行数:30,


示例8: vireplacechars

intvireplacechars(UNUSED(char **args)){    ZLE_INT_T ch;    int n = zmult, fail = 0, newchars = 0;    if (n > 0) {	int pos = zlecs;	while (n-- > 0) {	    if (pos == zlell || zleline[pos] == ZWC('/n')) {		fail = 1;		break;	    }	    newchars++;	    INCPOS(pos);	}	n = pos - zlecs;    }    startvichange(1);    /* check argument range */    if (n < 1 || fail) {	if(vichgrepeat)	    vigetkey();	if(vichgflag) {	    free(vichgbuf);	    vichgbuf = NULL;	    vichgflag = 0;	}	return 1;    }    /* get key */    if((ch = vigetkey()) == ZLEEOF) {	vichgflag = 0;	return 1;    }    /* do change */    if (ch == ZWC('/r') || ch == ZWC('/n')) {	/* <return> handled specially */	zlecs += n - 1;	backkill(n - 1, CUT_RAW);	zleline[zlecs++] = '/n';    } else {	/*	 * Make sure we delete displayed characters, including	 * attach combining characters. n includes this as a raw	 * buffer offset.	 * Use shiftchars so as not to adjust the cursor position;	 * we are overwriting anything that remains directly.	 */	if (n > newchars)	    shiftchars(zlecs, n - newchars);	else if (n < newchars)	    spaceinline(newchars - n);	while (newchars--)	    zleline[zlecs++] = ch;	zlecs--;    }    vichgflag = 0;    return 0;}
开发者ID:Osse,项目名称:zsh,代码行数:60,


示例9: viquotedinsert

voidviquotedinsert(void){#ifndef WINNT#ifndef HAS_TIO    struct sgttyb sob;#endif#endif /* WINNT */    spaceinline(1);    line[cs] = '^';    refresh();#ifndef WINNT#ifndef HAS_TIO    sob = shttyinfo.sgttyb;    sob.sg_flags = (sob.sg_flags | RAW) & ~ECHO;    ioctl(SHTTY, TIOCSETN, &sob);#endif#endif /* WINNT */    c = getkey(0);#ifndef WINNT#ifndef HAS_TIO    setterm();#endif#endif /* WINNT */    foredel(1);    if(c < 0)	feep();    else	selfinsert();}
开发者ID:prabirshrestha,项目名称:winzsh,代码行数:31,


示例10: copyprevshellword

intcopyprevshellword(UNUSED(char **args)){    LinkList l;    LinkNode n;    int i;    char *p = NULL;    if (zmult <= 0)	return 1;    if ((l = bufferwords(NULL, NULL, &i, LEXFLAGS_ZLE))) {	i -= (zmult-1);	if (i < 0)	    return 1;        for (n = firstnode(l); n; incnode(n))            if (!i--) {                p = getdata(n);                break;            }    }    if (p) {	int len;	ZLE_STRING_T lineadd = stringaszleline(p, 0, &len, NULL, NULL);	spaceinline(len);	ZS_memcpy(zleline + zlecs, lineadd, len);	zlecs += len;	free(lineadd);    }    return 0;}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:34,


示例11: quoteregion

intquoteregion(UNUSED(char **args)){    ZLE_STRING_T str;    size_t len;    int extra = invicmdmode();    if (mark > zlell)	mark = zlell;    if (region_active == 2) {	int a, b;	regionlines(&a, &b);	zlecs = a;	mark = b;	extra = 0;    } else if (mark < zlecs) {	int tmp = mark;	mark = zlecs;	zlecs = tmp;    }    if (extra)	INCPOS(mark);    str = (ZLE_STRING_T)hcalloc((len = mark - zlecs) *	ZLE_CHAR_SIZE);    ZS_memcpy(str, zleline + zlecs, len);    foredel(len, CUT_RAW);    str = makequote(str, &len);    spaceinline(len);    ZS_memcpy(zleline + zlecs, str, len);    mark = zlecs;    zlecs += len;    return 0;}
开发者ID:MPOWER4RU,项目名称:zsh,代码行数:33,


示例12: viindent

voidviindent(void){    int oldcs = cs, c2;    /* get the range */    startvichange(1);    if ((c2 = getvirange(0)) == -1) {	vichgflag = vilinerange = 0;	return;    }    vichgflag = 0;    /* must be a line range */    if (!vilinerange) {	feep();	cs = oldcs;	return;    }    vilinerange = 0;    oldcs = cs;    /* add a tab to the beginning of each line within range */    while (cs < c2) {	spaceinline(1);	line[cs] = '/t';	cs = findeol() + 1;    }    /* go back to the first line of the range */    cs = oldcs;    vifirstnonblank();}
开发者ID:prabirshrestha,项目名称:winzsh,代码行数:30,


示例13: vijoin

intvijoin(UNUSED(char **args)){    int x, pos;    startvichange(-1);    if ((x = findeol()) == zlell)	return 1;    zlecs = x + 1;    pos = zlecs;    for (; zlecs != zlell && ZC_iblank(zleline[zlecs]); INCPOS(zlecs))	;    x = 1 + (zlecs - pos);    backdel(x, CUT_RAW);    if (zlecs) {	int pos = zlecs;	DECPOS(pos);	if (ZC_iblank(zleline[pos])) {	    zlecs = pos;	    return 0;	}    }    spaceinline(1);    zleline[zlecs] = ZWC(' ');    return 0;}
开发者ID:Osse,项目名称:zsh,代码行数:26,


示例14: vipoundinsert

intvipoundinsert(UNUSED(char **args)){    int oldcs = zlecs;    startvichange(-1);    vifirstnonblank(zlenoargs);    if(zleline[zlecs] != '#') {	spaceinline(1);	zleline[zlecs] = '#';	if(zlecs <= viinsbegin)	    INCPOS(viinsbegin);	if (zlecs <= oldcs)	    INCPOS(oldcs);	zlecs = oldcs;    } else {	foredel(1, 0);	if (zlecs < viinsbegin)	    DECPOS(viinsbegin);	if (zlecs < oldcs)	    DECPOS(oldcs);	zlecs = oldcs;    }    return 0;}
开发者ID:Osse,项目名称:zsh,代码行数:25,


示例15: 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,


示例16: viopenlineabove

voidviopenlineabove(void){    cs = findbol();    spaceinline(1);    line[cs] = '/n';    startvitext(1);}
开发者ID:redwinner,项目名称:unxutils,代码行数:8,


示例17: viopenlinebelow

voidviopenlinebelow(void){    cs = findeol();    spaceinline(1);    line[cs++] = '/n';    startvitext(1);}
开发者ID:redwinner,项目名称:unxutils,代码行数:8,


示例18: yankpop

intyankpop(UNUSED(char **args)){    int cc, kctstart = kct;    Cutbuffer buf;    if (!(lastcmd & ZLE_YANK) || !kring || !kctbuf) {	kctbuf = NULL;	return 1;    }    do {	/*	 * This is supposed to make the yankpop loop	 *   original buffer -> kill ring in order -> original buffer -> ...	 * where the original buffer is -1 and the remainder are	 * indices into the kill ring, remember that we need to start	 * that at kringnum rather than zero.	 */	if (kct == -1)	    kct = kringnum;	else {	    int kctnew = (kct + kringsize - 1) % kringsize;	    if (kctnew == kringnum)		kct = -1;	    else		kct = kctnew;	}	if (kct == -1)	    buf = kctbuf;	/* Use original cutbuffer */	else	    buf = kring+kct;	/* Use somewhere in the kill ring */	/* Careful to prevent infinite looping */	if (kct == kctstart)	    return 1;	/*	 * Skip unset buffers instead of stopping as we used to do.	 * Also skip zero-length buffers.	 * There are two reasons for this:	 * 1. We now map the array $killring directly into the	 *    killring, instead of via some extra size-checking logic.	 *    When $killring has been set, a buffer will always have	 *    at least a zero-length string in it.	 * 2. The old logic was inconsistent; when the kill ring	 *    was full, we could loop round and round it, otherwise	 *    we just stopped when we hit the first empty buffer.	 */    } while (!buf->buf || *buf->buf == ZWC('/0'));    zlecs = yankb;    foredel(yanke - yankb, CUT_RAW);    cc = buf->len;    spaceinline(cc);    ZS_memcpy(zleline + zlecs, buf->buf, cc);    zlecs += cc;    yanke = zlecs;    return 0;}
开发者ID:Jaharmi,项目名称:zsh,代码行数:57,


示例19: insertlastword

voidinsertlastword(void){    int n;    char *s, *t;    int len;    Histent he;/* multiple calls will now search back through the history, pem */    static char *lastinsert;    static int lasthist, lastpos;    int evhist = curhist - 1, save;    if (lastinsert) {	int lastlen = ztrlen(lastinsert);	int pos = cs;	if (lastpos <= pos &&	    lastlen == pos - lastpos &&	    memcmp(lastinsert, (char *)&line[lastpos], lastlen) == 0) {	    evhist = --lasthist;	    cs = lastpos;	    foredel(pos - cs);	}	zsfree(lastinsert);	lastinsert = NULL;    }    if (!(he = quietgethist(evhist)) || !he->nwords) {	feep();	return;    }    if (zmult > 0) {	n = he->nwords - (zmult - 1);    } else {	n = 1 - zmult;    }    if (n < 1 || n > he->nwords) {	feep();	return;    }    s = he->text + he->words[2*n-2];    t = he->text + he->words[2*n-1];    save = *t;    *t = '/0';			/* ignore trailing whitespace */    lasthist = evhist;    lastpos = cs;    lastinsert = ztrdup(s);    spaceinline(len = ztrlen(s));    while (len--) {	line[cs++] = *s == Meta ? *++s ^ 32 : *s;	s++;    }    *t = save;}
开发者ID:prabirshrestha,项目名称:winzsh,代码行数:56,


示例20: viopenlinebelow

intviopenlinebelow(UNUSED(char **args)){    zlecs = findeol();    spaceinline(1);    zleline[zlecs++] = '/n';    startvitext(1);    clearlist = 1;    return 0;}
开发者ID:Osse,项目名称:zsh,代码行数:10,


示例21: viopenlineabove

intviopenlineabove(UNUSED(char **args)){    zlecs = findbol();    spaceinline(1);    zleline[zlecs] = '/n';    startvitext(1);    clearlist = 1;    return 0;}
开发者ID:Osse,项目名称:zsh,代码行数:10,


示例22: poundinsert

void poundinsert() /**/{	if (*line != '#') {		cs = 0;		spaceinline(1);		*line = '#';	} else {		cs = 0;		foredel(1);	}	done = 1;}
开发者ID:jonathangray,项目名称:386bsd,代码行数:12,


示例23: viputafter

void viputafter() /**/{int cc;char *buf = cutbuf;	if (!cutbuf) {		feep();		return;	}	if (mult < 0) return;	if (vibufspec) {		vibufspec = tolower(vibufspec);		vibufspec += (idigit(vibufspec)) ? -'1'+26 : -'a';		if (!(buf = vibuf[vibufspec])) {			feep();			vibufspec = 0;			return;		}		vibufspec = 0;	}	if (strchr(buf,'/n')) {		cs = findeol();		if (cs == ll) { spaceinline(1); line[cs] = '/n'; }	}	if (cs != ll) cs++;	yankb = cs;	while (mult--) {		kct = kringnum;		cc = strlen(buf);		spaceinline(cc);		strncpy((char *) line+cs,buf,cc);		cs += cc;		yanke = cs;	}	cs = yankb;}
开发者ID:jonathangray,项目名称:386bsd,代码行数:36,


示例24: copyprevword

void copyprevword() /**/{int len,t0;	for (t0 = cs-1; t0 >= 0; t0--)		if (iword(line[t0]))			break;	for (; t0 >= 0; t0--)		if (!iword(line[t0]))			break;	if (t0)		t0++;	len = cs-t0;	spaceinline(len);	strncpy((char *) line+cs,(char *) line+t0,len);	cs += len;}
开发者ID:jonathangray,项目名称:386bsd,代码行数:17,


示例25: yankpop

void yankpop() /**/{int cc;	if (!(lastcmd & ZLE_YANK) || !kring[kct]) {		feep();		return;	}	cs = yankb;	foredel(yanke-yankb);	cc = strlen(kring[kct]);	spaceinline(cc);	strncpy((char *) line+cs,kring[kct],cc);	cs += cc;	yanke = cs;	kct = (kct-1) & (KRINGCT-1);}
开发者ID:jonathangray,项目名称:386bsd,代码行数:17,


示例26: getline

voidgetline(void){    char *s = (char *)getlinknode(bufstack);    if (!s)	feep();    else {	int cc;	unmetafy(s, &cc);	spaceinline(cc);	memcpy((char *)line + cs, s, cc);	cs += cc;	free(s);	clearlist = 1;    }}
开发者ID:prabirshrestha,项目名称:winzsh,代码行数:18,


示例27: applychange

static intapplychange(struct change *ch){    if(ch->hist != histline) {	zle_setline(quietgethist(ch->hist));	zlecs = ch->old_cs;	return 0;    }    zlecs = ch->off;    if(ch->del)	foredel(ch->dell, CUT_RAW);    if(ch->ins) {	spaceinline(ch->insl);	ZS_memcpy(zleline + zlecs, ch->ins, ch->insl);	zlecs += ch->insl;    }    zlecs = ch->new_cs;    return 1;}
开发者ID:Lujaw,项目名称:zsh,代码行数:19,


示例28: vijoin

intvijoin(UNUSED(char **args)){    int x, pos;    int n = zmult;    int visual = region_active;    startvichange(-1);    if (n < 1)	return 1;    if (visual && zlecs > mark) {	exchangepointandmark(zlenoargs);	x = findeol();	if (x >= mark) {	    exchangepointandmark(zlenoargs);	    return 1;	}    } else if ((x = findeol()) == zlell || (visual && x >= mark))	return 1;    while (n) {	zlecs = x + 1;	pos = zlecs;	for (; zlecs != zlell && ZC_iblank(zleline[zlecs]); INCPOS(zlecs))	    ;	x = 1 + (zlecs - pos);	backdel(x, CUT_RAW);	if (zlecs) {	    int pos = zlecs;	    DECPOS(pos);	    if (ZC_iblank(zleline[pos])) {		zlecs = pos;		return 0;	    }	}	spaceinline(1);	zleline[zlecs] = ZWC(' ');	if ((!visual && --n < 2) || (x = findeol()) == zlell || (visual && x >= mark))	    return 0;    }    return 0;}
开发者ID:jackleaks,项目名称:zsh,代码行数:42,


示例29: vijoin

voidvijoin(void){    int x;    startvichange(-1);    if ((x = findeol()) == ll) {	feep();	return;    }    cs = x + 1;    for (x = 1; cs != ll && iblank(line[cs]); cs++, x++);    backdel(x);    if (cs && iblank(line[cs-1]))	cs--;    else {	spaceinline(1);	line[cs] = ' ';    }}
开发者ID:prabirshrestha,项目名称:winzsh,代码行数:20,


示例30: vipoundinsert

voidvipoundinsert(void){    int oldcs = cs;    startvichange(-1);    vifirstnonblank();    if(line[cs] != '#') {	spaceinline(1);	line[cs] = '#';	if(cs <= viinsbegin)	    viinsbegin++;	cs = oldcs + (cs <= oldcs);    } else {	foredel(1);	if (cs < viinsbegin)	    viinsbegin--;	cs = oldcs - (cs < oldcs);    }}
开发者ID:prabirshrestha,项目名称:winzsh,代码行数:20,



注:本文中的spaceinline函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ spaces函数代码示例
C++ spa_writeable函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。