Changeset 6be769 in git for Singular/iplib.cc


Ignore:
Timestamp:
May 9, 1998, 4:34:33 PM (26 years ago)
Author:
Kai Krüger <krueger@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
7cdf52894508b5af568db20ad09389a32ccca531
Parents:
4d6a4d8ac279c490518dc0c8d688532d047ca93a
Message:
Changes for help-section of procedures


git-svn-id: file:///usr/local/Singular/svn/trunk@1672 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iplib.cc

    r4d6a4d r6be769  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iplib.cc,v 1.23 1998-05-05 13:46:37 krueger Exp $ */
     4/* $Id: iplib.cc,v 1.24 1998-05-09 14:34:29 krueger Exp $ */
    55/*
    66* ABSTRACT: interpreter: LIB and help
     
    140140  if(part==0)
    141141  { // load help string
    142     procbuflen = pi->data.s.body_start - pi->data.s.proc_start;
     142    long head = pi->data.s.def_end - pi->data.s.proc_start;
     143    procbuflen = pi->data.s.help_end - pi->data.s.help_start;
    143144    //Print("Help=%ld-%ld=%d\n", pi->data.s.body_start,
    144145    //    pi->data.s.proc_start, procbuflen);
    145     s = (char *)AllocL(procbuflen);
    146     myfread(s, procbuflen, 1, fp);
    147     s[procbuflen] = '\0';
     146    s = (char *)AllocL(procbuflen+head+2);
     147    myfread(s, head, 1, fp);
     148    s[head] = '\n';
     149    fseek(fp, pi->data.s.help_start, SEEK_SET);
     150    myfread(s+head+1, procbuflen, 1, fp);
     151    s[procbuflen+head+1] = '\n';
     152    s[procbuflen+head+2] = '\0';
    148153    return(s);
    149154  }
     
    718723  pi->data.s.proc_start = pos;
    719724  pi->data.s.help_start = 0L;
     725  pi->data.s.help_end   = 0L;
    720726  pi->data.s.body_start = 0L;
    721727  pi->data.s.body_end   = 0L;
Note: See TracChangeset for help on using the changeset viewer.