MonetDB: Dec2011 - Assign value to variable that is used in for ...

2012-02-13 Thread Sjoerd Mullender
Changeset: fc0a4a65dc38 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc0a4a65dc38
Modified Files:
testing/Mtest.py.in
Branch: Dec2011
Log Message:

Assign value to variable that is used in for loop.
The assignment is needed in case the for loop doesn't run because the
file being looped over is empty.  In that case no assignment takes
place, so we provide a useful value.


diffs (19 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1560,6 +1560,7 @@ def StableOutErr(env,par,TST,SYST,RELEAS
 ### StableOutErr(env,par,TST,SYST,RELEASE,DIST,VERSION) #
 
 def CategorizeResult(TST, SockTime):
+l = '!--MajorDiffs--'   # assign something in case file is empty
 for l in open(%s.out.diff.html % TST):
 pass
 if   l[:14] == '!--NoDiffs--':
@@ -1574,6 +1575,7 @@ def CategorizeResult(TST, SockTime):
 ff.write(\n!--MajorDiffs--\n)
 ff.close()
 o = F_ERROR
+l = '!--MajorDiffs--'   # assign something in case file is empty
 for l in open(%s.err.diff.html % TST):
 pass
 if   l[:14] == '!--NoDiffs--':
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Indent.

2012-02-13 Thread Sjoerd Mullender
Changeset: 83374e9bd613 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=83374e9bd613
Modified Files:
monetdb5/mal/mal_instruction.mx
Branch: default
Log Message:

Indent.


diffs (truncated from 1981 to 300 lines):

diff --git a/monetdb5/mal/mal_instruction.mx b/monetdb5/mal/mal_instruction.mx
--- a/monetdb5/mal/mal_instruction.mx
+++ b/monetdb5/mal/mal_instruction.mx
@@ -39,29 +39,29 @@ All Rights Reserved.
 
 #define DEBUG_MAL_INSTR
 /* #define DEBUG_REDUCE */
-#define MAXARG 4   /* BEWARE the code depends on this knowledge */
+#define MAXARG 4   /* BEWARE the code depends on 
this knowledge */
 #define STMT_INCREMENT 32
 #define MAL_VAR_WINDOW  32
 #define MAXVARS 32
 #define MAXLISTING 64*1024
 
 typedef struct SYMDEF {
-   struct SYMDEF *peer;/* where to look next */
-   struct SYMDEF *skip;/* skip to next different symbol */
+   struct SYMDEF *peer;/* where to look next */
+   struct SYMDEF *skip;/* skip to next different symbol */
str name;
int kind;
-   struct MALBLK *def; /* the details of the MAL fcn */
+   struct MALBLK *def; /* the details of the MAL fcn */
 } *Symbol, SymRecord;
 
 typedef struct VARRECORD {
-   str name;   /* argname or lexical value repr */
-   malType type;   /* internal type signature */
-   int flags;  /* see below, reserve some space */
-   int tmpindex;   /* temporary variable */
+   str name;   /* argname or lexical 
value repr */
+   malType type;   /* internal type signature */
+   int flags;  /* see below, reserve 
some space */
+   int tmpindex;   /* temporary variable */
ValRecord value;
-   int eolife; /* pc index when it should be garbage 
collected */
-   int propc, maxprop; /* proc count and max number of properties */
-   int prps[]; /* property array */
+   int eolife; /* pc index when it 
should be garbage collected */
+   int propc, maxprop; /* proc count and max number of 
properties */
+   int prps[]; /* property array */
 } *VarPtr, VarRecord;
 
 /* Variable properties */
@@ -72,7 +72,7 @@ typedef struct VARRECORD {
 #define VAR_CLEANUP16
 #define VAR_INIT   32
 #define VAR_USED   64
-#define VAR_DISABLED   128 /* used for comments and scheduler */
+#define VAR_DISABLED   128 /* used for comments and scheduler */
 
 /* type check status is kept around to improve type checking efficiency */
 #define TYPE_ERROR  -1
@@ -81,112 +81,106 @@ typedef struct VARRECORD {
 
 #define GARBAGECONTROL   3
 
-#define VARARGS 1  /* deal with variable arguments */
+#define VARARGS 1  /* deal with variable arguments 
*/
 #define VARRETS 2
 
 /* all functions return a string */
 
 typedef struct {
-   bit token;  /* instruction type */
-   bit barrier;/* flow of control modifier takes:
-  BARRIER, LEAVE, REDO, EXIT, CATCH, RAISE*/
-   bit typechk;/* type check status */
-   bit gc; /* garbage control flags */
-   bit polymorphic;/* complex type analysis */
-   bit varargs;/* variable number of arguments */
-   int recycle;/* 0 or index into recycle cache */
-   int jump;   /* controlflow program counter */
-   MALfcn fcn; /* resolved function address */
-   struct MALBLK *blk; /* resolved MAL function address */
-   str modname;/* module context */
-   str fcnname;/* function name */
-   int argc, retc, maxarg; /* total and result argument count */
-   int argv[]; /* at least a few entries */
+   bit token;  /* instruction type */
+   bit barrier;/* flow of control modifier 
takes:
+  BARRIER, 
LEAVE, REDO, EXIT, CATCH, RAISE */
+   bit typechk;/* type check status */
+   bit gc; /* garbage control 
flags */
+   bit polymorphic;/* complex type analysis */
+   bit varargs;/* variable number of arguments 
*/
+   int recycle;/* 0 or index into recycle 
cache */
+   int jump;   /* controlflow program 
counter */
+   MALfcn fcn; /* resolved function 
address */
+   struct MALBLK *blk;