]> granicus.if.org Git - postgresql/commitdiff
Add // comments.
authorBruce Momjian <bruce@momjian.us>
Fri, 5 Sep 1997 00:09:47 +0000 (00:09 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 5 Sep 1997 00:09:47 +0000 (00:09 +0000)
src/backend/parser/scan.l
src/backend/utils/sort/psort.c
src/bin/psql/psql.c
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-exec.c

index d29db6084f2b193370d1e5277b319bfb763797b9..bc043f630bd810c6be78d3d6a4d9ba9e20eb838b 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.16 1997/09/02 02:32:35 thomas Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.17 1997/09/05 00:09:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -120,6 +120,7 @@ real                -?{digit}+\.{digit}+([Ee][-+]?{digit}+)?
 param          \${integer}
 
 comment                "--".*\n
+comment2       "//".*\n
 
 space          [ \t\n\f]
 other          .
@@ -131,6 +132,7 @@ other               .
                }
 
 {comment}      { /* ignore */  }
+{comment2}     { /* ignore */  }
 
 {xcline}       { /* ignore */ }
 
index d7829401810dfbfff1a0df876fb1b3a65b7a8cb8..12486166268bd460cb2e7e399468da54ce7759d1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.17 1997/08/19 21:36:06 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.18 1997/09/05 00:09:23 momjian Exp $
  *
  * NOTES
  *      Sorts the first relation into the second relation.
@@ -90,21 +90,21 @@ static      long    shortzero = 0;  /* used to delimit runs */
  *
  * LeftistContextData   treeContext;
  *
- * static       int     TapeRange;             // number of tapes - 1 (T) //
- * static       int     Level;                 // (l) //
- * static       int     TotalDummy;            // summation of tp_dummy //
+ * static       int     TapeRange;             number of tapes - 1 (T)
+ * static       int     Level;                 (l)
+ * static       int     TotalDummy;            summation of tp_dummy
  * static struct tape   *Tape;
  *
- * static      int     BytesRead;              // to keep track of # of IO //
+ * static      int     BytesRead;              to keep track of # of IO
  * static      int     BytesWritten;
  *
- * struct leftist       *Tuples;               // current tuples in memory //
+ * struct leftist       *Tuples;               current tuples in memory
  *
- * FILE                        *psort_grab_file;       // this holds tuples grabbed
- *                                                from merged sort runs //
- * long                        psort_current;          // current file position //
- * long                        psort_saved;            // file position saved for
- *                                                mark and restore //
+ * FILE                        *psort_grab_file;       this holds tuples grabbed
+ *                                                from merged sort runs
+ * long                        psort_current;          current file position
+ * long                        psort_saved;            file position saved for
+ *                                                mark and restore
  */
 
 /*
index 191752b66fd927d759f552cffdd5b55da5fe6564..0b77a3ff5f14bf3b84abdf254c88d6cf36c373e0 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.89 1997/09/01 06:09:53 thomas Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.90 1997/09/05 00:09:30 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1605,7 +1605,8 @@ MainLoop(PsqlSettings * settings, FILE * source)
                        continue;
 
                    /* single-line comment? truncate line */
-                   } else if (line[i] == '-' && line[i+1] == '-') {
+                   } else if ((line[i] == '-' && line[i+1] == '-') ||
+                              (line[i] == '/' && line[i+1] == '/')) {
                        /* print comment at top of query */
                        if (settings->singleStep)
                            fprintf(stdout, "%s\n", line + i);
index 3c5abd9c8ff1eaa05521dfc96fd8a272ea008361..cb9b10d8704156baf9be22d4854aab1a17946fbf 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.37 1997/06/06 01:42:02 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.38 1997/09/05 00:09:43 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -423,14 +423,14 @@ connectDB(PGconn *conn)
     int         portno;
 
     /*
-    //
-    // Initialize the startup packet. 
-    //
-    // This data structure is used for the seq-packet protocol.  It
-    // describes the frontend-backend connection.
-    //
-    //
-    */
+     *
+     * Initialize the startup packet. 
+     *
+     * This data structure is used for the seq-packet protocol.  It
+     * describes the frontend-backend connection.
+     *
+     *
+     */
     strncpy(startup.user,conn->pguser,sizeof(startup.user));
     strncpy(startup.database,conn->dbName,sizeof(startup.database));
     strncpy(startup.tty,conn->pgtty,sizeof(startup.tty));
@@ -442,10 +442,10 @@ connectDB(PGconn *conn)
     startup.execFile[0]='\0';  /* not used */
 
     /*
-    //
-    // Open a connection to postmaster/backend.
-    //
-    */
+     *
+     * Open a connection to postmaster/backend.
+     *
+     */
     port = (Port *) malloc(sizeof(Port));
     memset((char *) port, 0, sizeof(Port));
 
index 97543a05d15a217e287549cd00290baff456c1c1..771e8c66e2b4c23573e0307c6b604d1e5dbf4d21 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.34 1997/08/27 09:05:23 vadim Exp $
+ *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.35 1997/09/05 00:09:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -436,11 +436,11 @@ process_response_from_backend(FILE *pfin, FILE *pfout, FILE *pfdebug,
           done = true;
         } else {
           /*
-             // since backend may produce more than one result for some 
-             // commands need to poll until clear 
-             // send an empty query down, and keep reading out of the pipe
-             // until an 'I' is received.
-             */
+           * since backend may produce more than one result for some 
+           * commands need to poll until clear 
+           * send an empty query down, and keep reading out of the pipe
+           * until an 'I' is received.
+           */
           pqPuts("Q ", pfout, pfdebug); /* send an empty query */
           /*
            * Increment a flag and process messages in the usual way because