Changeset b10eee in git for kernel/febase.cc


Ignore:
Timestamp:
Jan 13, 2005, 4:13:32 PM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
2743d153ccc6b38e777e5dad0da2dde9b4af56f2
Parents:
ed97c1a4f90e91f9dd72603636d0dc0dc3b843c8
Message:
* hannes: newBuffer: febase.cc -> feread.cc


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

Legend:

Unmodified
Added
Removed
  • kernel/febase.cc

    red97c1 rb10eee  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: febase.cc,v 1.2 2003-12-11 16:28:51 Singular Exp $ */
     4/* $Id: febase.cc,v 1.3 2005-01-13 15:13:31 Singular Exp $ */
    55/*
    66* ABSTRACT: i/o system
     
    219219  //Print("----------------\n");
    220220  return FALSE;
    221 }
    222 
    223 void newBuffer(char* s, feBufferTypes t, procinfo* pi, int lineno)
    224 {
    225   currentVoice->Next();
    226   //Print(":Buffer%d(%s):%s(%x)\n",
    227   //  t,BT_name[t],pname,currentVoice);
    228   if (pi!=NULL)
    229   {
    230     int l=strlen(pi->procname);
    231     if (pi->libname!=NULL) l+=strlen(pi->libname);
    232     currentVoice->filename = (char *)omAlloc(l+3);
    233     *currentVoice->filename='\0';
    234     if (pi->libname!=NULL) strcat(currentVoice->filename,pi->libname);
    235     strcat(currentVoice->filename,"::");
    236     strcat(currentVoice->filename,pi->procname);
    237     currentVoice->pi       = pi;
    238   }
    239   else
    240   {
    241     currentVoice->filename = omStrDup(currentVoice->prev->filename);
    242     currentVoice->pi       = currentVoice->prev->pi;
    243   }
    244   currentVoice->buffer   = s;
    245   currentVoice->sw       = BI_buffer;
    246   currentVoice->typ      = t;
    247   switch (t)
    248   {
    249     case BT_execute:
    250                      yylineno-=2;
    251                      break;
    252     case BT_proc:
    253     case BT_example:
    254                      currentVoice->oldb=myynewbuffer();
    255                      yylineno = lineno+1;
    256                      break;
    257     case BT_if:
    258     case BT_else:
    259     case BT_break:
    260                      yylineno = yy_blocklineno-1;
    261                      break;
    262     //case BT_file:
    263     default:
    264                      yylineno = 1;
    265                      break;
    266   }
    267   //Print("start body (%s) at line %d\n",BT_name[t],yylineno);
    268   currentVoice->start_lineno = yylineno;
    269   //printf("start buffer typ %d\n",t);
    270   //Voice *p=currentVoice;
    271   //Print("-----------------\ncurr:");
    272   //do
    273   //{
    274   //Print("voice fn:%s\n",p->filename);
    275   //p=p->prev;
    276   //}
    277   //while (p!=NULL);
    278   //Print("----------------\n");
    279221}
    280222
Note: See TracChangeset for help on using the changeset viewer.