Changeset 09ab91d in git


Ignore:
Timestamp:
Aug 16, 1999, 2:39:58 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
9f18501ca0cfcfef1e9dd96f9104154c78199b96
Parents:
7a0c5ceef47d847eb03135121dd3d928dc12a8f4
Message:
* hannes: fixed: example p; if p does not have one


git-svn-id: file:///usr/local/Singular/svn/trunk@3448 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/iplib.cc

    r7a0c5c r09ab91d  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iplib.cc,v 1.59 1999-08-03 16:33:42 obachman Exp $ */
     4/* $Id: iplib.cc,v 1.60 1999-08-16 12:39:57 Singular Exp $ */
    55/*
    66* ABSTRACT: interpreter: LIB and help
     
    162162    long head = pi->data.s.def_end - pi->data.s.proc_start;
    163163    procbuflen = pi->data.s.help_end - pi->data.s.help_start;
     164    if (procbuflen<5)
     165      return NULL; // help part does not exist
    164166    //Print("Help=%ld-%ld=%d\n", pi->data.s.body_start,
    165167    //    pi->data.s.proc_start, procbuflen);
     
    184186    return(s);
    185187  }
    186   if(part==1)
    187   { // load proc part
     188  else if(part==1)
     189  { // load proc part - must exist
    188190    procbuflen = pi->data.s.def_end - pi->data.s.proc_start;
    189191    //fgets(buf, sizeof(buf), fp);
     
    218220    return NULL;
    219221  }
    220   if(part==2)
    221   { // load example
     222  else if(part==2)
     223  { // example
     224    if ( pi->data.s.example_lineno == 0)
     225      return NULL; // example part does not exist
     226    // load example
    222227    fseek(fp, pi->data.s.example_start, SEEK_SET);
    223     fgets(buf, sizeof(buf), fp);
     228    fgets(buf, sizeof(buf), fp); // skip line with "example"
    224229    procbuflen = pi->data.s.proc_end - pi->data.s.example_start - strlen(buf);
    225230    //Print("Example=%ld-%ld=%d\n", pi->data.s.proc_end,
  • Singular/misc.cc

    r7a0c5c r09ab91d  
    244244    }
    245245  }
    246   Werror("%s not found",s);
     246  Werror("%s not found",str);
    247247}
    248248
Note: See TracChangeset for help on using the changeset viewer.