Changeset 490a23b in git for Singular/subexpr.cc


Ignore:
Timestamp:
Nov 8, 2007, 10:20:33 AM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
0586246dcc809d6e595b1a3a36f82fab2f8a689e
Parents:
6c1bf2eee0f91c18932a19bd56699e99fd9e83d1
Message:
*hannes: Print, PrintNSpaces and monitor


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

Legend:

Unmodified
Added
Removed
  • Singular/subexpr.cc

    r6c1bf2 r490a23b  
    55* ABSTRACT: handling of leftv
    66*/
    7 /* $Id: subexpr.cc,v 1.98 2007-11-06 14:56:24 Singular Exp $ */
     7/* $Id: subexpr.cc,v 1.99 2007-11-08 09:20:33 Singular Exp $ */
    88
    99#include <stdlib.h>
     
    109109        case UNKNOWN:
    110110        case DEF_CMD:
    111           ::Print("%-*.*s`%s`",spaces,spaces," ",n);
    112           break;
    113111        case PACKAGE_CMD:
    114           ::Print("%-*.*s`%s`",spaces,spaces," ",n);
     112          PrintNSpaces(spaces);
     113          PrintS("`");PrintS(n);PrintS("`");
    115114          break;
    116115        case NONE:
     
    122121        case RING_CMD:
    123122        case QRING_CMD:
    124           ::Print("%-*.*s",spaces,spaces," ");
     123          PrintNSpaces(spaces);
    125124          rWrite((ring)d);
    126125          break;
     
    135134        case POLY_CMD:
    136135        case VECTOR_CMD:
    137           ::Print("%-*.*s",spaces,spaces," ");
     136          PrintNSpaces(spaces);
    138137          pWrite0((poly)d);
    139138          break;
     
    142141          break;
    143142        case STRING_CMD:
    144           ::Print("%-*.*s%s",spaces,spaces," ",(char *)d);
     143          PrintNSpaces(spaces);
     144          PrintS((char *)d);
    145145          break;
    146146       case INT_CMD:
    147           ::Print("%-*.*s%d",spaces,spaces," ",(int)(long)d);
     147          PrintNSpaces(spaces);
     148          ::Print("%d",(int)(long)d);
    148149          break;
    149150       case PROC_CMD:
    150151         {
    151152           procinfov pi=(procinfov)d;
    152            ::Print("%-*.*s// libname  : %s\n",spaces,spaces," ",
    153                    piProcinfo(pi, "libname"));
    154            ::Print("%-*.*s// procname : %s\n",spaces,spaces," ",
    155                    piProcinfo(pi, "procname"));
    156            ::Print("%-*.*s// type     : %s",spaces,spaces," ",
    157                    piProcinfo(pi, "type"));
     153
     154           PrintNSpaces(spaces);
     155           PrintS("// libname  : ");
     156           PrintS(piProcinfo(pi, "libname"));
     157           PrintLn();
     158
     159           PrintNSpaces(spaces);
     160           PrintS("// procname : ");
     161           PrintS(piProcinfo(pi, "procname"));
     162           PrintLn();
     163
     164           PrintNSpaces(spaces);
     165           PrintS("// type     : ");
     166           PrintS(piProcinfo(pi, "type"));
    158167           //           ::Print("%-*.*s// ref      : %s",spaces,spaces," ",
    159168           //   piProcinfo(pi, "ref"));
     
    162171       case POINTER_CMD:
    163172         { package pack = (package)d;
    164          ::Print("%-*.*s// %s\n",spaces,spaces," ","PointerTest");
    165          ::Print("%-*.*s// %s",spaces,spaces," ",IDID(pack->idroot));
     173         PrintNSpaces(spaces);
     174         PrintS("// PointerTest\n");
     175         PrintNSpaces(spaces);
     176         ::Print("// %s\n",IDID(pack->idroot));
    166177         //::Print(((char *)(pack->idroot)->data), spaces);
    167178         break;
     
    170181          {
    171182            si_link l=(si_link)d;
    172             ::Print("%-*.*s// type : %s\n",spaces,spaces," ",
    173                     slStatus(l, "type"));
    174             ::Print("%-*.*s// mode : %s\n",spaces,spaces," ",
    175                     slStatus(l, "mode"));
    176             ::Print("%-*.*s// name : %s\n",spaces,spaces," ",
    177                     slStatus(l, "name"));
    178             ::Print("%-*.*s// open : %s\n",spaces,spaces," ",
    179                     slStatus(l, "open"));
    180             ::Print("%-*.*s// read : %s\n",spaces,spaces," ",
    181                     slStatus(l, "read"));
    182             ::Print("%-*.*s// write: %s",spaces,spaces," ",
    183                     slStatus(l, "write"));
     183            PrintNSpaces(spaces);
     184            ::Print("// type : %s\n", slStatus(l, "type"));
     185            PrintNSpaces(spaces);
     186            ::Print("// mode : %s\n", slStatus(l, "mode"));
     187            PrintNSpaces(spaces);
     188            ::Print("// name : %s\n", slStatus(l, "name"));
     189            PrintNSpaces(spaces);
     190            ::Print("// open : %s\n", slStatus(l, "open"));
     191            PrintNSpaces(spaces);
     192            ::Print("// read : %s\n", slStatus(l, "read"));
     193            PrintNSpaces(spaces);
     194            ::Print("// write: %s", slStatus(l, "write"));
    184195          break;
    185196          }
     
    188199          s=String(d);
    189200          if (s==NULL) return;
    190           ::Print("%-*.*s",spaces,spaces," ");
     201          PrintNSpaces(spaces);
    191202          PrintS(s);
    192203          omFree((ADDRESS)s);
     
    196207          lists l=(lists)d;
    197208          if (l->nr<0)
    198              ::Print("%-*.*sempty list\n",spaces,spaces," ");
     209          {
     210             PrintNSpaces(spaces);
     211             PrintS("empty list\n");
     212          }
    199213          else
    200214          {
     
    204218              if (l->m[i].rtyp!=DEF_CMD)
    205219              {
    206                 ::Print("%-*.*s[%d]:\n",spaces,spaces," ",i+1);
     220                PrintNSpaces(spaces);
     221                ::Print("[%d]:\n",i+1);
    207222                l->m[i].Print(NULL,spaces+3);
    208223              }
Note: See TracChangeset for help on using the changeset viewer.