Changeset 7fd611 in git for Singular/libparse.l


Ignore:
Timestamp:
May 18, 1998, 11:32:07 AM (26 years ago)
Author:
Kai Krüger <krueger@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
2f786f772c07a297f5aeb1e84266fbeb9c80861d
Parents:
edb75871a6a2c6003867916fbd03788e11c667bd
Message:
pretty-printing of help


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

Legend:

Unmodified
Added
Removed
  • Singular/libparse.l

    redb758 r7fd611  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: libparse.l,v 1.21 1998-05-09 14:34:31 krueger Exp $ */
     5/* $Id: libparse.l,v 1.22 1998-05-18 09:32:07 krueger Exp $ */
    66#include <stdio.h>
    77#include <string.h>
     
    451451              }
    452452            }
     453<pdef>({comment}[^\n]*)  { }
     454<pdef>\/\/*      { old_state = YYSTATE; BEGIN(comment); }
    453455<pdef>.    {
    454456             if(brace2<=0) {
     
    738740  if((last_cmd == LP_INFO)&&(mode == GET_INFO))
    739741  {
     742    int i, offset=0;
    740743    long current_location = ftell(yylpin);
    741744    int len = (int)(current_pos(0) - string_start);
     
    745748    fseek(yylpin, current_location, SEEK_SET);
    746749    text_buffer[len]='\0';
     750    offset=0;
     751    for(i=0;i<=len; i++) {
     752      if(text_buffer[i]=='\\' &&
     753         (text_buffer[i+1]=='"' || text_buffer[i+1]=='{' ||
     754          text_buffer[i+1]=='}' || text_buffer[i+1]=='\\')) {
     755        i++;
     756        offset++;
     757      }
     758      if(offset>0) text_buffer[i-offset] = text_buffer[i];
     759    }
    747760  }
    748761#  endif /* STANDALONE_PARSER */
Note: See TracChangeset for help on using the changeset viewer.