Index: Singular/libparse.h
===================================================================
--- Singular/libparse.h	(revision b35b93807f117d1b5cb55df216eefd3920e0d91f)
+++ Singular/libparse.h	(revision c2da0a822ac3c31c9c7668c6c50ecf34c138908d)
@@ -4,9 +4,11 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: libparse.h,v 1.3 1998-04-06 16:27:19 krueger Exp $ */
+/* $Id: libparse.h,v 1.4 1998-04-20 10:05:53 krueger Exp $ */
 /*
 * ABSTRACT: lib parsing
 */
-#include "subexpr.h"
+#ifndef STANDALONE_PARSER
+#  include "subexpr.h"
+#endif
 typedef enum { LOAD_LIB, GET_INFO } lp_modes;
 typedef enum { OLD_LIBSTYLE, NEW_LIBSTYLE } lib_style_types;
Index: Singular/libparse.l
===================================================================
--- Singular/libparse.l	(revision b35b93807f117d1b5cb55df216eefd3920e0d91f)
+++ Singular/libparse.l	(revision c2da0a822ac3c31c9c7668c6c50ecf34c138908d)
@@ -3,5 +3,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: libparse.l,v 1.6 1998-04-16 08:12:55 pohl Exp $ */
+/* $Id: libparse.l,v 1.7 1998-04-20 10:05:54 krueger Exp $ */
 #include <stdio.h>
 #include <string.h>
@@ -21,6 +21,6 @@
 #  include "febase.h"
 #  include "mmemory.h"
-#  include "libparse.h"
-#endif
+#endif
+#include "libparse.h"
 
 #ifdef HAVE_LIBPARSER
@@ -40,5 +40,5 @@
 int quote  = 0;  /* " */
 int offset = 0;
-int p_static = 0;
+BOOLEAN p_static = FALSE;
 int old_state = 0;
 lib_cmds last_cmd = LP_NONE;
@@ -112,7 +112,4 @@
 #ifdef STANDALONE_PARSER
 procinfov pi;
-procinfo *iiInitSingularProcinfo(procinfov pi, char *libname,
-                                 char *procname, int line, long pos,
-				 int pstatic = 0);
 printpi(procinfov pi);
 pi_clear(procinfov pi);
@@ -236,19 +233,19 @@
            }
 
-static     { p_static=1; }
+static     { p_static=TRUE; }
 
 (proc[ \t]+{name})|([ \t]proc[ \t]+{name}) {
              char proc[256];
              BEGIN(pdef);
-#if YYLPDEBUG
+#if YYLPDEBUG > 0
              printf("Newlib:%s\n", newlib);
 #endif
 #ifdef STANDALONE_PARSER
-             if ( pi != NULL ) {
-               printpi(pi);
-               pi_clear(pi);
-             }
-             pi = (procinfo *)malloc(sizeof(procinfo));
-             iiInitSingularProcinfo(pi, newlib, yytext+5, yylplineno,
+               if ( pi != NULL ) {
+                 printpi(pi);
+                 pi_clear(pi);
+               }
+               pi = (procinfo *)malloc(sizeof(procinfo));
+               iiInitSingularProcinfo(pi, newlib, yytext+5, yylplineno,
 					current_pos(0), p_static);
 #else STANDALONE_PARSER
@@ -271,6 +268,8 @@
 		      yylplineno, current_pos(0), brace1, yytext);
 #endif
-               p_static=0;
+               p_static=FALSE;
+#ifndef STANDALONE_PARSER
              }
+#endif STANDALONE_PARSER
            }
 example    {
@@ -546,10 +545,10 @@
 
 \n                       { yylplineno++; }
-;                        { p_static = 0;
+;                        { p_static = FALSE;
 #if YYLPDEBUG
                             printf("%s", yytext);
 #endif
                          }
-.                        { p_static = 0; 
+.                        { p_static = FALSE; 
                            yylp_errno = YYLP_BAD_CHAR;
 #if YYLPDEBUG
@@ -625,4 +624,5 @@
 void copy_string(lp_modes mode)
 {
+#ifndef STANDALONE_PARSER
   if((last_cmd == LP_INFO)&&(mode == GET_INFO)) {
     long current_location = ftell(yylpin);
@@ -633,4 +633,5 @@
     fseek(yylpin, current_location, SEEK_SET);
   }
+#endif /* STANDALONE_PARSER */
 }
 
@@ -667,5 +668,5 @@
   yylplex(argv[0], argv[0], &lib_style);
   if(yylp_errno) {
-    printf("ERROR accured: ");
+    printf("ERROR accured: [%d] ", yylp_errno);
     printf(yylp_errlist[yylp_errno], yylplineno);
     printf("\n");
Index: Singular/libparse.sed
===================================================================
--- Singular/libparse.sed	(revision c2da0a822ac3c31c9c7668c6c50ecf34c138908d)
+++ Singular/libparse.sed	(revision c2da0a822ac3c31c9c7668c6c50ecf34c138908d)
@@ -0,0 +1,4 @@
+s/\[\^\\n\]/\[\^\\r\]/g
+s/>\\n/>\\r/g
+s/^\\n/\\r/g
+
Index: Singular/utils.cc
===================================================================
--- Singular/utils.cc	(revision b35b93807f117d1b5cb55df216eefd3920e0d91f)
+++ Singular/utils.cc	(revision c2da0a822ac3c31c9c7668c6c50ecf34c138908d)
@@ -9,5 +9,5 @@
 procinfo *iiInitSingularProcinfo(procinfov pi, char *libname,
                                  char *procname, int line, long pos,
-				 int pstatic = 0)
+				 BOOLEAN pstatic = FALSE)
 {
   pi->libname = (char *)malloc(strlen(libname)+1);
Index: Singular/utils.h
===================================================================
--- Singular/utils.h	(revision b35b93807f117d1b5cb55df216eefd3920e0d91f)
+++ Singular/utils.h	(revision c2da0a822ac3c31c9c7668c6c50ecf34c138908d)
@@ -1,4 +1,14 @@
 /*
  */
+
+typedef short BOOLEAN;
+
+#ifndef FALSE
+#define FALSE       0
+#endif
+
+#ifndef TRUE
+#define TRUE        1
+#endif
 
 class procinfo;
