Subversion Repositories wimsdev

Rev

Rev 3808 | Rev 8161 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3808 Rev 3813
Line 287... Line 287...
287
    char *p1, *p2, *p3;
287
    char *p1, *p2, *p3;
288
    char buf[MAX_LINELEN+1];
288
    char buf[MAX_LINELEN+1];
289
    int l, ll, n, idx, start, end;
289
    int l, ll, n, idx, start, end;
290
    struct block *b;
290
    struct block *b;
291
 
291
 
292
    if(debug>=3) fprintf(stderr,"Cutline %ld/%d for %.15s.\n",
292
    if(debug>=3) fprintf(stderr,"Cutline %d/%d for %.15s.\n",
293
                         blk-blockbuf, nextblock, p);
293
                         (int)(blk-blockbuf), nextblock, p);
294
    for(p1=strstr(p,"[|]"); p1; p1=strstr(p1,"[|]")) memmove(p1," | ",3);
294
    for(p1=strstr(p,"[|]"); p1; p1=strstr(p1,"[|]")) memmove(p1," | ",3);
295
    macro_trans(p);
295
    macro_trans(p);
296
    singlespace(p);
296
    singlespace(p);
297
    p=find_word_start(p); strip_trailing_spaces(p);
297
    p=find_word_start(p); strip_trailing_spaces(p);
298
    l=0; p3=p; do {
298
    l=0; p3=p; do {
Line 316... Line 316...
316
        ll=p2-p1;
316
        ll=p2-p1;
317
        if(ll>0) {
317
        if(ll>0) {
318
            memmove(buf,p1,ll); buf[ll]=0;
318
            memmove(buf,p1,ll); buf[ll]=0;
319
            if(idx==start) b=blk; else b=blockbuf+idx-1;
319
            if(idx==start) b=blk; else b=blockbuf+idx-1;
320
            if(idx<end) n=idx; else n=next;
320
            if(idx<end) n=idx; else n=next;
321
            if(debug>=3) fprintf(stderr,"String block %ld/%d for %.15s.\n",
321
            if(debug>=3) fprintf(stderr,"String block %d/%d for %.15s.\n",
322
                         b-blockbuf, nextblock, buf);
322
                         (int)(b-blockbuf), nextblock, buf);
323
            cp_string(buf,b,n);
323
            cp_string(buf,b,n);
324
            idx++;
324
            idx++;
325
        }
325
        }
326
        if(*p2=='[') {
326
        if(*p2=='[') {
327
            p2++; p3=find_matching(p2,']');
327
            p2++; p3=find_matching(p2,']');
Line 685... Line 685...
685
        /* p must have MAX_LINELEN */
685
        /* p must have MAX_LINELEN */
686
void cp_oneblock(char *p, struct block *blk, int next)
686
void cp_oneblock(char *p, struct block *blk, int next)
687
{
687
{
688
    char *pp, *pe;
688
    char *pp, *pe;
689
    int i;
689
    int i;
690
    if(debug>=3) fprintf(stderr,"Oneblock %ld/%d for %.15s.\n",
690
    if(debug>=3) fprintf(stderr,"Oneblock %d/%d for %.15s.\n",
691
                         blk-blockbuf, nextblock, p);
691
                         (int)(blk-blockbuf), nextblock, p);
692
    if(myisupper(*p)) {
692
    if(myisupper(*p)) {
693
        for(pe=p; pe-p < MAX_BINAME && myisalpha(*pe); pe++);
693
        for(pe=p; pe-p < MAX_BINAME && myisalpha(*pe); pe++);
694
        if(*pe==':') {
694
        if(*pe==':') {
695
            *pe++=0;
695
            *pe++=0;
696
            i=search_list(builtin,builtincnt,sizeof(builtin[0]),p);
696
            i=search_list(builtin,builtincnt,sizeof(builtin[0]),p);