rev 172 - in trunk: include/prothon modules/File modules/Re modules/String modules/Tuple src

SVN User <[email protected]>
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-03-28 01:25:20 -0500 (Sun, 28 Mar 2004)
New Revision: 172

Modified:
   trunk/include/prothon/prothon.h
   trunk/modules/File/File.c
   trunk/modules/Re/Re.c
   trunk/modules/String/String.c
   trunk/modules/Tuple/Tuple.c
   trunk/src/argproc.c
   trunk/src/builtins.c
   trunk/src/clist.c
   trunk/src/console.c
   trunk/src/getline.c
   trunk/src/interp.c
   trunk/src/lock.c
   trunk/src/main.c
   trunk/src/memory_mgr.c
   trunk/src/object.c
   trunk/src/parser_routines.c
   trunk/src/sys.c
   trunk/src/thread.c
Log:
fixed dict.__str__, cleaned up usage of PR_FALSE, PR_TRUE,
FALSE, and TRUE

Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/include/prothon/prothon.h	2004-03-28 06:25:20 UTC (rev 172)
@@ -50,7 +50,7 @@
  * ====================================================================
  */
 
-
+ 
 // Prothon.h
 
 #ifndef PROTHON_H
@@ -65,6 +65,13 @@
 #define PROTHON_VERSION_BUILD   "$Rev$"  
 #define PROTHON_VERSION_DATE	__DATE__
 
+#ifndef FALSE
+#define FALSE	0
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
+
 #ifdef WIN32
 #define PR_DECLARE_EXPORT(type)         __declspec(dllexport) type
 #else
@@ -199,8 +206,8 @@
 typedef enum {
 	
 // "singleton" objects
-	PR_FALSE =0,			// 0 False
-	PR_TRUE,				// 1 True
+	PR_FALSE,			// 0 False
+	PR_TRUE,			// 1 True
 	OBJECT,				// 2 Object
 	NONE,				// 3 None
  
@@ -422,21 +429,21 @@
 
 // DEL_ATTR: Find attr in object that matches a key and delete it.
 // Much like get-attr, except that when an attr is found it is deleted.
-// If no attr is found to delete it returns PR_FALSE, else PR_TRUE.
+// If no attr is found to delete it returns FALSE, else TRUE.
 int del_attr(isp ist, obj_p obj, obj_p key);
 
 // INS_PROTO: Insert an object in the list of proto objects.
 // This is the immediate protos for an object, not the reachable.
 // Pos == 0 means head of list and pos >= len means append at end.
-// Duplicates will be ignored.  PR_TRUE will be returned if the proto
-// was inserted, PR_FALSE if not.
+// Duplicates will be ignored.  TRUE will be returned if the proto
+// was inserted, FALSE if not.
 int ins_proto(isp ist, obj_p obj, obj_p proto, int pos);
 
 // DEL_PROTO: Delete an object from the list of proto objects.
 // This is from the immediate proto list for an object, not the reachable.
 // You must pass the exact object to be deleted.
-// The last proto may not be deleted.  PR_TRUE will be returned if the proto
-// was found and deleted, PR_FALSE if not.
+// The last proto may not be deleted.  TRUE will be returned if the proto
+// was found and deleted, FALSE if not.
 int del_proto(isp ist, obj_p obj, obj_p proto);
 
 // PROTO_LEN: Get number of protos in an object
@@ -457,7 +464,7 @@
 // or have a circular reference.  See section "INTERPRETER STATE" below.
 obj_p proto_list(isp ist, obj_p object);
 
-// HAS_PROTO:  Returns PR_TRUE if second object is in reachable proto list of first object
+// HAS_PROTO:  Returns TRUE if second object is in reachable proto list of first object
 // The ist param may return an exception object if proto pointers are missing 
 // or have a circular reference.  See section "INTERPRETER STATE" below.
 int has_proto(isp ist, obj_p obj, obj_p obj_proto);
@@ -556,7 +563,7 @@
 // function is called on the existing key in the dict with the passed key as the parameter.
 // If the keys match, then the value in the dictionary is replaced and the existing key
 // is left in place.  If there is no match the ky and value are added.
-// The function returns PR_TRUE if there was no match and a new entry was added and it returns
+// The function returns TRUE if there was no match and a new entry was added and it returns
 // false if a value was replaced for an existing key.
 int dict_add(isp ist, obj_p dict_obj, obj_p key_in, obj_p value_in);
 
@@ -586,7 +593,7 @@
 // when read-locked) then the order will stay the same.  The order will match
 // the order of keys given by dict_keys() if they are both called while the
 // dict is read-locked.
-#define dict_values(ist, dict_obj) dict_keys_values(ist, dict_obj, PR_FALSE)
+#define dict_values(ist, dict_obj) dict_keys_values(ist, dict_obj, FALSE)
 
 // HASH_MASK: Maximum value for any hash function to return.
 // Minimum value is 1.

Modified: trunk/modules/File/File.c
===================================================================
--- trunk/modules/File/File.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/modules/File/File.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -201,7 +201,7 @@
 }
 #endif
 DEF(FILE_PROTO, read, list2( sym(ist, "size"), new_int_obj(-1))) {
-	int readall = PR_FALSE;
+	int readall = FALSE;
 	i64_t size_in;
 	size_t size, total_read=0, num_read;
 	obj_p str_obj;
@@ -221,7 +221,7 @@
 	size_in = parms[1]->data.i64;
 	if (!size_in) return new_string_obj("");
 	if (size_in < 0) {
-		readall = PR_TRUE;
+		readall = TRUE;
 		size = BUFSIZE(self);
 	} else
 		size = (size_t) size_in;
@@ -268,12 +268,12 @@
 		buf = obj_str->str;
 	}
 	buf[total_read] = 0;
-	str_obj->unmutable = PR_TRUE;
+	str_obj->unmutable = TRUE;
 	return str_obj;
 }
 
 DEF(FILE_PROTO, readline, list2( sym(ist, "size"), new_int_obj(-1))) {
-	int readall = PR_FALSE;
+	int readall = FALSE;
 	i64_t  size_in;
 	size_t size, total_read;
 	obj_p str_obj;
@@ -293,7 +293,7 @@
 	size_in = parms[1]->data.i64;
 	if (!size_in) return new_string_obj("");
 	if (size_in < 0) {
-		readall = PR_TRUE;
+		readall = TRUE;
 		size = BUFSIZE(self);
 	} else
 		size = (size_t) size_in;
@@ -338,12 +338,12 @@
 		obj_str->len = total_read;
 	}
 	buf[total_read] = 0;
-	str_obj->unmutable = PR_TRUE;
+	str_obj->unmutable = TRUE;
 	return str_obj;
 }
 
 DEF(FILE_PROTO, readlines, list2( sym(ist, "size"), new_int_obj(-1))) {
-	int readall = PR_FALSE;
+	int readall = FALSE;
 	i64_t  size_in;
 	size_t size, total_read=0, num_read;
 	obj_p str_obj, list_obj;
@@ -363,7 +363,7 @@
 	size_in = parms[1]->data.i64;
 	if (!size_in) return new_string_obj("");
 	if (size_in < 0) {
-		readall = PR_TRUE;
+		readall = TRUE;
 		size = BUFSIZE(self);
 	} else
 		size = (size_t) size_in;
@@ -414,7 +414,7 @@
 			obj_str->len = num_read;
 		}
 		buf[num_read] = 0;
-		str_obj->unmutable = PR_TRUE;
+		str_obj->unmutable = TRUE;
 		list_append(ist, list_obj, str_obj);
 	}
 	return list_obj;

Modified: trunk/modules/Re/Re.c
===================================================================
--- trunk/modules/Re/Re.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/modules/Re/Re.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -123,7 +123,7 @@
 	s = strch(parms[1]);
 	m = pr_malloc((ngrps+1)*sizeof(regmatch_t));
 	m[0].rm_so = -1; m[0].rm_eo = 0;
-	while(PR_TRUE) {
+	while(TRUE) {
 		if (m[0].rm_so == m[0].rm_eo) m[0].rm_eo++;
 		m[0].rm_so = m[0].rm_eo;  m[0].rm_eo = strlen(s); 
 		if ((err = regexec(e, s, ngrps+1, m, REG_STARTEND|(m[0].rm_so ? REG_NOTBOL : 0)))) {
@@ -157,7 +157,7 @@
 				else          list_append(ist, tuple_obj, new_string_n_obj(s+sp,ep-sp));
 			}
 			list_append(ist, res, tuple_obj);
-			tuple_obj->unmutable = PR_TRUE;
+			tuple_obj->unmutable = TRUE;
 		}
 	}
 	pr_free(m);
@@ -243,7 +243,7 @@
 	m = pr_malloc((ngrps+1)*sizeof(regmatch_t));
 	m[0].rm_so = -1; m[0].rm_eo = 0;
 	last_split = 0;
-	while(PR_TRUE) {
+	while(TRUE) {
 		if (m[0].rm_so == m[0].rm_eo) m[0].rm_eo++;
 		m[0].rm_so = m[0].rm_eo;  m[0].rm_eo = strlen(s); 
 		if ((err = regexec(e, s, ngrps+1, m, REG_STARTEND|(m[0].rm_so ? REG_NOTBOL : 0)))) {
@@ -356,10 +356,10 @@
 		}
 	}
 	*(*p2)=0;
-	return PR_FALSE;
+	return FALSE;
 err:
 	raise_exception(ist, RE_EXC, "invalid escape sequence");
-	return PR_TRUE;
+	return TRUE;
 }
 
 DEF( RE_PROTO, sub, list6( sym(ist, "repl"),  NULL, 
@@ -369,7 +369,7 @@
 	size_t size;
 	regmatch_t* m;
 	regoff_t last_split;
-	int i, last_index=0, repl_is_func=PR_FALSE, count, err, ngrps = numgrps(self);
+	int i, last_index=0, repl_is_func=FALSE, count, err, ngrps = numgrps(self);
 	obj_p lastindex_obj, repl_obj, res_obj, match_obj, arr[2];
 	regex_t* e = self->data.ptr;
 	if ( !has_proto(ist, parms[1], OBJ(STRING_PROTO)) &&
@@ -400,7 +400,7 @@
 	m[0].rm_so = -1; m[0].rm_eo = 0;
 	last_split = 0;
 	res = pr_malloc(1); res[0]=0;
-	while(PR_TRUE) {
+	while(TRUE) {
 		if (m[0].rm_so == m[0].rm_eo) m[0].rm_eo++;
 		m[0].rm_so = m[0].rm_eo;  m[0].rm_eo = strlen(orig_s); 
 		if ((err = regexec(e, orig_s, ngrps+1, m, REG_STARTEND|(m[0].rm_so ? REG_NOTBOL : 0)))) {
@@ -526,7 +526,7 @@
 	res = new_tuple_obj(2);
 	list_append(ist, res, list_item(ist, self, 2*grp  ));
 	list_append(ist, res, list_item(ist, self, 2*grp+1));
-	res->unmutable = PR_TRUE;
+	res->unmutable = TRUE;
 	return res;
 }
 
@@ -598,7 +598,7 @@
 			if (sp == -1) list_append(ist, res, OBJ(NONE));
 			else		  list_append(ist, res, new_string_n_obj(orig_s+sp, ep-sp));
 		}
-		res->unmutable = PR_TRUE;
+		res->unmutable = TRUE;
 		return res;
 	}
 }
@@ -615,7 +615,7 @@
 		if (sp == -1) list_append(ist, res, parms[1]);
 		else		  list_append(ist, res, new_string_n_obj(orig_s+sp, ep-sp));
 	}
-	res->unmutable = PR_TRUE;
+	res->unmutable = TRUE;
 	return res;
 }
 

Modified: trunk/modules/String/String.c
===================================================================
--- trunk/modules/String/String.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/modules/String/String.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -101,7 +101,7 @@
 		memcpy(&(obj_str->str[slen]), strch(other), olen);
 		obj_str->str[tlen] = 0;
 	}
-	obj->unmutable = PR_TRUE;
+	obj->unmutable = TRUE;
 	return obj;
 }
 
@@ -135,7 +135,7 @@
 			memcpy(obj_str->str+i*len, strch(self), len);
 		obj_str->str[tlen] = 0;
 	}
-	obj->unmutable = PR_TRUE;
+	obj->unmutable = TRUE;
 	return obj;
 }
 
@@ -216,7 +216,7 @@
 		}
 	}
 	dest_ptr[tlen] = 0;
-	obj->unmutable = PR_TRUE;
+	obj->unmutable = TRUE;
 	del_unlock(str_list);
 	return obj;
 }

Modified: trunk/modules/Tuple/Tuple.c
===================================================================
--- trunk/modules/Tuple/Tuple.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/modules/Tuple/Tuple.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -108,7 +108,7 @@
 	size  = len*times;
 	if(times == 0) { 
 		obj_p res = new_tuple_obj(0);
-		res ->unmutable = PR_TRUE;
+		res ->unmutable = TRUE;
 		return res;
 	}
 	if(times == 1) return self;

Modified: trunk/src/argproc.c
===================================================================
--- trunk/src/argproc.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/argproc.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -93,7 +93,7 @@
 }
 
 obj_p arginit(isp ist, int argc, char* argv[]) {
-	int i, past_c_args = PR_FALSE;
+	int i, past_c_args = FALSE;
 	obj_p thread_argv, argv_obj = NULL;
 	obj_p thread_list = new_list_obj(4), res = new_object(NULL);
 	char *p, buf[10];
@@ -101,7 +101,7 @@
 		if (!past_c_args && argv[i][0] != '-') {
 			argv_obj = new_list_obj(argc - i);
 			set_attr(ist, res, sym(ist, "argv"), argv_obj);
-			past_c_args = PR_TRUE;
+			past_c_args = TRUE;
 		}
 		if (past_c_args)
 			list_append(ist, argv_obj, new_string_obj(argv[i]));

Modified: trunk/src/builtins.c
===================================================================
--- trunk/src/builtins.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/builtins.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -72,7 +72,7 @@
 
 DEF(OBJECT_OBJ, has_proto, FORM_RPARAM) {
 	if (has_proto(ist, self, parms[1])) return OBJ(PR_TRUE);
-	else						       return OBJ(PR_FALSE); 
+	else						        return OBJ(PR_FALSE); 
 }
 
 DEF(OBJECT_OBJ, set_proto, FORM_RPARAM) {
@@ -292,7 +292,7 @@
 
 static obj_p get_sequence_item(isp ist, obj_p self, obj_p slice, int seq_type) {
 	obj_p res = NULL, slice_item1, slice_item2, slice_item3;
-	int i, index1 = 0, index2 = 0, index3 = 0, slice1_empty=PR_FALSE, slice2_empty=PR_FALSE;
+	int i, index1 = 0, index2 = 0, index3 = 0, slice1_empty=FALSE, slice2_empty=FALSE;
 	int exp_len, self_len, slice_len = list_len(ist, slice);
 	char* self_str = NULL;
 	if (seq_type == SEQ_TYPE_STRING) {
@@ -302,7 +302,7 @@
 		self_len = list_len(ist, self);
 	slice_item1 = list_item(ist, slice,0);
 	if (slice_item1 == SLICEPARAM_EMPTY || slice_item1 == OBJ(NONE)) 
-		slice1_empty=PR_TRUE;
+		slice1_empty=TRUE;
 	else {
 		if (!has_proto(ist, slice_item1, OBJ(INT_PROTO))) {
 			raise_exception(ist, OBJ(TYPE_EXC), "sequence slice index must be an integer");
@@ -338,7 +338,7 @@
 	} else index3 = 1;
 	slice_item2 = list_item(ist, slice,1);
 	if (slice_item2 == SLICEPARAM_EMPTY || slice_item2 == OBJ(NONE))
-		slice2_empty=PR_TRUE;
+		slice2_empty=TRUE;
 	else {
 		if (!has_proto(ist, slice_item2, OBJ(INT_PROTO))) {
 			raise_exception(ist, OBJ(TYPE_EXC), "sequence slice index must be an integer");
@@ -611,7 +611,7 @@
 
 DEF (INT_OBJ, __gen__, NULL) {
 	obj_p gen_obj = new_int_obj(0);
-	gen_obj->unmutable = PR_FALSE;
+	gen_obj->unmutable = FALSE;
 	gen_obj->attr_proto.proto = INTGEN_OBJ;
 	set_attr(ist, gen_obj, SYM_LIMIT, self);
 	return gen_obj;
@@ -712,13 +712,13 @@
 DEF(LIST_OBJ, __setitem__, FORM_PARAM2) {
 	obj_p slice_item1, slice_item2, slice_item3;
 	obj_p slice = parms[1], value = parms[3];
-	int i, j, new_len, index1 = 0, index2 = 0, index3 = 0, slice1_empty=PR_FALSE, slice2_empty=PR_FALSE;
+	int i, j, new_len, index1 = 0, index2 = 0, index3 = 0, slice1_empty=FALSE, slice2_empty=FALSE;
 	int exp_len, val_len, self_len, slice_len = list_len(ist, slice);
 	read_unlock(ist, self); write_lock(ist, self);
 	self_len = listlen(self);
 	slice_item1 = list_item(ist, slice,0);
 	if (slice_item1 == SLICEPARAM_EMPTY || slice_item1 == OBJ(NONE)) 
-		slice1_empty=PR_TRUE;
+		slice1_empty=TRUE;
 	else {
 		if (!has_proto(ist, slice_item1, OBJ(INT_PROTO))) {
 			raise_exception(ist, OBJ(TYPE_EXC), "List slice index must be an integer");
@@ -764,7 +764,7 @@
 	} else index3 = 1;
 	slice_item2 = list_item(ist, slice,1);
 	if (slice_item2 == SLICEPARAM_EMPTY || slice_item2 == OBJ(NONE))
-		slice2_empty=PR_TRUE;
+		slice2_empty=TRUE;
 	else {
 		if (!has_proto(ist, slice_item2, OBJ(INT_PROTO))) {
 			raise_exception(ist, OBJ(TYPE_EXC), "sequence slice index must be an integer");
@@ -822,13 +822,13 @@
 DEF(LIST_OBJ, __delitem__, FORM_RPARAM) {
 	obj_p slice_item1, slice_item2, slice_item3;
 	obj_p slice = parms[1];
-	int i, j, new_len, index1 = 0, index2 = 0, index3 = 0, slice1_empty=PR_FALSE, slice2_empty=PR_FALSE;
+	int i, j, new_len, index1 = 0, index2 = 0, index3 = 0, slice1_empty=FALSE, slice2_empty=FALSE;
 	int exp_len, self_len, slice_len = list_len(ist, slice);
 	 read_unlock(ist, self);  write_lock(ist, self);
 	self_len = listlen(self);
 	slice_item1 = list_item(ist, slice,0);
 	if (slice_item1 == SLICEPARAM_EMPTY || slice_item1 == OBJ(NONE)) 
-		slice1_empty=PR_TRUE;
+		slice1_empty=TRUE;
 	else {
 		if (!has_proto(ist, slice_item1, OBJ(INT_PROTO))) {
 			raise_exception(ist, OBJ(TYPE_EXC), "List slice index must be an integer");
@@ -871,7 +871,7 @@
 	} else index3 = 1;
 	slice_item2 = list_item(ist, slice,1);
 	if (slice_item2 == SLICEPARAM_EMPTY || slice_item2 == OBJ(NONE))
-		slice2_empty=PR_TRUE;
+		slice2_empty=TRUE;
 	else {
 		if (!has_proto(ist, slice_item2, OBJ(INT_PROTO))) {
 			raise_exception(ist, OBJ(TYPE_EXC), "sequence slice index must be an integer");
@@ -926,7 +926,8 @@
 #define DICT_OBJ OBJ(DICT_PROTO)
 DEF(DICT_OBJ, __str__, NULL) {
 	int i, len = dict_len(ist, self);
-	char* res = pr_malloc(2); 
+	char* res = pr_malloc(3); 
+	obj_p res_obj;
 	obj_p keys = dict_keys(ist, self);
 	obj_p vals = dict_values(ist, self);
 	strcpy(res, "{");
@@ -938,9 +939,11 @@
 		strcat(res, ":");
 		strcat(res, str2);
 		if (i != len-1) strcat(res, ", ");
-		else			strcat(res, "}");
 	}
-	return new_string_obj(res);
+	strcat(res, "}");
+	res_obj = new_string_obj(res);
+	pr_free(res);
+	return res_obj;
 }
 
 DEF(DICT_OBJ, __objlist__, FORM_RPARAM) {

Modified: trunk/src/clist.c
===================================================================
--- trunk/src/clist.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/clist.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -135,8 +135,8 @@
 int clist_in(clist_p list, void* item) {
 	int i;
 	for(i=0; i < list->len; i++)
-		if (list->items[i].ptr == item) return PR_TRUE;
-	return PR_FALSE;
+		if (list->items[i].ptr == item) return TRUE;
+	return FALSE;
 }
 
 //********************************* clist_in_cnt ******************************
@@ -156,9 +156,9 @@
 				memmove( list->items+i, list->items+i+1, 
 					     (list->len-1 - i) * sizeof(clist_item_t) );
 			list->len--;
-			return PR_FALSE;
+			return FALSE;
 		}
-	return PR_TRUE;
+	return TRUE;
 }
 
 //********************************* clist_pop_dups ****************************

Modified: trunk/src/console.c
===================================================================
--- trunk/src/console.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/console.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -103,7 +103,7 @@
 	int i,ind_cnt;
 	char *d, *s, *lim;
 	line = Getline(ps1(ist));
-	if (!(*line)) return PR_TRUE;
+	if (!(*line)) return TRUE;
     Gl_histadd(line);
 	ind_cnt = indent_cnt(line);
 	lim = line+strlen(line)+1;
@@ -111,14 +111,14 @@
 	for (s=line+ind_cnt*INDENT_WIDTH; s < lim; d++, s++) *d = *s;
 	src = pr_realloc(src, strlen(line)+1);
 	strcpy(src, line);
-	return PR_FALSE;
+	return FALSE;
 }
 
 int add_src(isp ist) {
 	int i,ind_cnt;
 	char *d, *s, *lim;
 	line = Getline(ps2(ist));
-	if (!(*line)) return PR_TRUE;
+	if (!(*line)) return TRUE;
     Gl_histadd(line);
 	ind_cnt = indent_cnt(line);
 	lim = line+strlen(line)+1;
@@ -126,7 +126,7 @@
 	for (s=line+ind_cnt*INDENT_WIDTH; s < lim; d++, s++) *d = *s;
 	src = pr_realloc(src, strlen(src)+strlen(line)+1);
 	strcat(src, line);
-	return PR_FALSE;
+	return FALSE;
 }
 
 int tab_cnt(char* s) {
@@ -183,7 +183,7 @@
 	obj_p res;
 	exec_frame_t* frame = NULL;
     char buf[16];
-	int ind_level = 0, colon_flg = PR_FALSE;
+	int ind_level = 0, colon_flg = FALSE;
 	char histfile[512], *home;
 
 	if ((home = getenv("HOME")) != NULL)
@@ -196,7 +196,7 @@
 	printf( "Prothon %s Interactive Console, Build %s, %s (Ctrl-D to exit)\n", 
 		    PROTHON_VERSION_NUMBER, numonly(PROTHON_VERSION_BUILD, buf), PROTHON_VERSION_DATE ); 
 	src = pr_malloc(1);
-    while (PR_TRUE) {
+    while (TRUE) {
 		if (get_src(ist)) goto done;
 		if (tab_cnt(line)) {
 			printf ("Error: outer line should not be indented\n");
@@ -213,7 +213,7 @@
 				if (colon_flg && ind_chg != 1) {
 					printf ("Error: incorrect indentation for new block\n");
 					ind_level = 0; 
-					colon_flg = PR_FALSE;
+					colon_flg = FALSE;
 					pr_realloc(src, 1); src[0]=0;
 					break;
 				}

Modified: trunk/src/getline.c
===================================================================
--- trunk/src/getline.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/getline.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -546,7 +546,7 @@
                            &cRead               // address of number of records read
         )) return 0;
 
-     if (pirBuffer.EventType == KEY_EVENT  && KeyEvent->bKeyDown == PR_TRUE){
+     if (pirBuffer.EventType == KEY_EVENT  && KeyEvent->bKeyDown == TRUE){
          iCharCount = KeyEvent->wRepeatCount - 1;
          chLastChar = ((int) (KeyEvent->uChar).AsciiChar & 0xffff);
          if (!chLastChar)

Modified: trunk/src/interp.c
===================================================================
--- trunk/src/interp.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/interp.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -103,9 +103,9 @@
 	frame = pr_malloc(sizeof(exec_frame_t) + (code->max_stack_depth+STACK_PADDING) * sizeof(obj_p));
 	frame->next_frame		= NULL;
 	frame->prev_frame		= NULL;
-	frame->called_from_c	= PR_FALSE;
-	frame->do_not_free		= PR_FALSE;
-	frame->gen_marker		= PR_FALSE;
+	frame->called_from_c	= FALSE;
+	frame->do_not_free		= FALSE;
+	frame->gen_marker		= FALSE;
 	frame->self				= self;
 	frame->globals			= (func_obj ? get_attr(ist, func_obj, SYM(__GLOBALS__))    : globals);
 	frame->syn_locals		= (func_obj ? get_attr(ist, func_obj, SYM(__SYN_LOCALS__)) : syn_locals);
@@ -327,14 +327,14 @@
 
 	aprerr = apr_dso_load(&handle, dll_path, get_pr_head_pool());
 	if (aprerr != APR_SUCCESS)
-		return PR_FALSE;
+		return FALSE;
 
 	aprerr = apr_dso_sym(&dll_entry, handle, "dll_entry");
 	if (aprerr != APR_SUCCESS) {
 		apr_dso_unload(handle);
 		raise_exception(ist, OBJ(INTERNAL_EXC), "Loadable module `%s': initialization failed",
 				module_name);
-		return PR_FALSE;
+		return FALSE;
 	}
 
 	((void(*)(pr_services_t*))dll_entry)(&dll_services);
@@ -342,7 +342,7 @@
 	if ((module = get_attr(ist, OBJ(MODULES), sym(ist, module_name))) && dest_module)
 		set_attr(ist, dest_module, alias, module);
 
-	return PR_TRUE;
+	return TRUE;
 }
 
 //******************************** import_module **********************************
@@ -536,7 +536,7 @@
 	int i, param;
 	exec_frame_t *switch_frame = NULL, *free_frame = NULL;
 	exec_frame_t* frame = ist->frame;
-	int have_exstk, exc_try_loc = 0, exc_exc_loc = 0, return_flag = PR_FALSE;
+	int have_exstk, exc_try_loc = 0, exc_exc_loc = 0, return_flag = FALSE;
 	int exc_final=0, exc_final_return=0, stack_lim = frame->code->max_stack_depth;
 	obj_p exc_waiting=NULL, return_value = 0;
 
@@ -547,7 +547,7 @@
 		exc_try_loc	= p->try_loc;
 		exc_exc_loc	= p->exc_loc;
 	}
-	while(PR_TRUE){
+	while(TRUE){
 		while (have_exstk && (fr_pc <= exc_try_loc || fr_pc >= exc_exc_loc)) {
 			if (exc_final && fr_pc != exc_exc_loc) {
 				exc_final_return = fr_pc;
@@ -559,7 +559,7 @@
 				exc_final   = p->final;
 				exc_try_loc	= p->try_loc;
 				exc_exc_loc	= p->exc_loc;
-			} else have_exstk = PR_FALSE;
+			} else have_exstk = FALSE;
 		}
 		if (fr_pc >= fr_code->len){
 			return_value = do_return(ist, frame, &switch_frame, &free_frame, return_value);
@@ -721,7 +721,7 @@
 					exec_frame_t* new_frame = new_exec_frame( ist, 
 							frame->self, NULL, NULL,
 							frame->dyn_locals, frame->locals, func, NULL );
-					new_frame->gen_marker = PR_TRUE;
+					new_frame->gen_marker = TRUE;
 					func->data.ptr = new_frame;
 					switch_proto_to(ist, func, OBJ(GEN_PROTO));
 				}
@@ -760,19 +760,19 @@
 				break;
 			case OP_TRYFINALLY: {
 				exception_entry_t* exc_entry = pr_malloc(sizeof(exception_entry_t));
-				exc_final	= exc_entry->final   = PR_TRUE;
+				exc_final	= exc_entry->final   = TRUE;
 				exc_try_loc	= exc_entry->try_loc = fr_pc;
 				exc_exc_loc	= exc_entry->exc_loc = fr_pc+param;
 				exstk_push(frame, exc_entry);
-				have_exstk = PR_TRUE;
+				have_exstk = TRUE;
 			}	break;
 			case OP_TRYEXCEPT: {
 				exception_entry_t* exc_entry = pr_malloc(sizeof(exception_entry_t));
-				exc_final	= exc_entry->final   = PR_FALSE;
+				exc_final	= exc_entry->final   = FALSE;
 				exc_try_loc	= exc_entry->try_loc = fr_pc;
 				exc_exc_loc	= exc_entry->exc_loc = fr_pc+param;
 				exstk_push(frame, exc_entry);
-				have_exstk = PR_TRUE;
+				have_exstk = TRUE;
 			}	break;
 			case OP_EXCEPT: {
 				obj_p exc_proto, exc_obj_label;
@@ -978,13 +978,13 @@
 				return_flag = fr_ccall;
 				break;
 			case OP_IMPORT:    
-				import_module(ist, frame, param, PR_TRUE, NULL, PR_FALSE);
+				import_module(ist, frame, param, TRUE, NULL, FALSE);
 				break;
 			case OP_IMPORT_AS:    
-				import_module(ist, frame, param-1, PR_TRUE, fr_data(param-1), PR_FALSE);
+				import_module(ist, frame, param-1, TRUE, fr_data(param-1), FALSE);
 				break;
 			case OP_IMPORT_PUSH: 
-				fr_push(import_module(ist, frame, param, PR_FALSE, NULL, PR_TRUE));
+				fr_push(import_module(ist, frame, param, FALSE, NULL, TRUE));
 				break;
 			case OP_IMPORT_ATTR: {
 				obj_p obj;
@@ -1045,7 +1045,7 @@
 		}
 endop:
 		if (intrp_exobj) {
-			int frame_chg = PR_FALSE;
+			int frame_chg = FALSE;
 
 #ifdef TRACE_INTERPRETER
 			fprintf(tfout, "---exception---\n");
@@ -1061,14 +1061,14 @@
 				if (!tmp_frame->do_not_free)
 					pr_free(tmp_frame);
 				have_exstk = (fr_exstk && clist_len(fr_exstk));
-				frame_chg = PR_TRUE;
+				frame_chg = TRUE;
 				add_frame_to_exception(ist, frame);
 			}
 			if (have_exstk) {
 				if (frame_chg) {
 					exception_entry_t* p = (exception_entry_t*)(clist_tos(fr_exstk));
 					exc_exc_loc	= p->exc_loc;
-					frame_chg = PR_FALSE;
+					frame_chg = FALSE;
 				}
 				fr_pc = exc_exc_loc;
 				pr_free(clist_pop(fr_exstk));
@@ -1077,7 +1077,7 @@
 					exc_final   = p->final;
 					exc_try_loc	= p->try_loc;
 					exc_exc_loc	= p->exc_loc;
-				} else have_exstk = PR_FALSE;
+				} else have_exstk = FALSE;
 				exc_waiting = intrp_exobj;
 				ist->exception_obj = 0;
 				continue;
@@ -1156,7 +1156,7 @@
 		frame = ist->frame;
 		new_locals = new_object(NULL);
 		new_frame = new_exec_frame(	ist, self, NULL, NULL, dyn_locals, new_locals, func_obj, NULL );
-		new_frame->called_from_c = PR_TRUE;
+		new_frame->called_from_c = TRUE;
 		ist->frame->next_frame = new_frame;
 		new_frame->prev_frame = ist->frame;
 		load_frame_params( ist, frame, func_obj, parm_cnt, lbl_val_arr);
@@ -1255,7 +1255,7 @@
 										new_locals, new_locals, new_locals, NULL, code );
 		}
 	}
-	new_frame->called_from_c = PR_TRUE;
+	new_frame->called_from_c = TRUE;
 	new_frame->do_not_free   = get_frame;
 	if (frame) ist->frame->next_frame = new_frame;
 	new_frame->prev_frame = ist->frame;
@@ -1285,10 +1285,10 @@
 	else
 		state = parse_file_or_string(ist, filename, NULL);
 
-	catch_exception(ist, OBJ(FILENOTFOUND_EXC), NULL);  if_exc_return PR_FALSE;
+	catch_exception(ist, OBJ(FILENOTFOUND_EXC), NULL);  if_exc_return FALSE;
 
 	if (!state || !(code = (state->parse_results)))
-		return PR_FALSE;
+		return FALSE;
 
 	name = symch(ist, module_name);
 
@@ -1305,16 +1305,16 @@
 	new_locals = new_object(NULL);
 	set_attr(ist, module, SYM(__LOCALS__), new_locals);
 	new_frame = new_exec_frame( ist, module, module, dest_module, dyn_locals, new_locals, NULL, code );
-	new_frame->called_from_c = PR_TRUE;
+	new_frame->called_from_c = TRUE;
 	if (frame) ist->frame->next_frame = new_frame;
 	new_frame->prev_frame = ist->frame;
 	ist->frame = new_frame;
-	exec_loop(ist); if_exc_return PR_FALSE;
+	exec_loop(ist); if_exc_return FALSE;
 	if (dest_module){
 		if (!module_alias) module_alias = module_name;
 		set_attr(ist, dest_module, module_alias, module);
 	}
-	return PR_TRUE;
+	return TRUE;
 }
 
 //******************************** main_thread ***********************************
@@ -1337,7 +1337,7 @@
 	main_threads_started++;
 	main_threads_running++;
 
-	while (PR_TRUE) {
+	while (TRUE) {
 		char name[16];
 
 		apr_snprintf(name, sizeof(name), "Main%d", main_index);

Modified: trunk/src/lock.c
===================================================================
--- trunk/src/lock.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/lock.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -77,7 +77,7 @@
 	if (!force_wait && lock((obj)->wrlock)) return;
 	obj_wrlock_waiting++;
 	apr_thread_mutex_lock(obj_wrlock_mutex);
-	while(PR_TRUE) {
+	while(TRUE) {
 		apr_thread_cond_timedwait(obj_wrlock_cond, obj_wrlock_mutex, PAUSE_MS*1000);
 		if (lock((obj)->wrlock)) {
 			obj_wrlock_waiting--;
@@ -89,20 +89,20 @@
 
 //********************************* read_lock_try *****************************
 int read_lock_try(isp ist, obj_p obj) {
-	if (!lock((obj)->wrlock)) return PR_FALSE;
+	if (!lock((obj)->wrlock)) return FALSE;
 	if (obj->unmutable) {
 		free_wrlock(obj);
-		return PR_TRUE;
+		return TRUE;
 	}
 	if (obj->wrlock_req_cnt) {
 		free_wrlock(obj);
-		return PR_FALSE;
+		return FALSE;
 	}
 	clist_push(lockstack, obj);
 	obj->rdlock_cnt++;
 	obj->state = OBJ_STATE_NEW_OR_MARKED;
 	free_wrlock(obj);
-	return PR_TRUE;
+	return TRUE;
 }
 
 //********************************* read_lock *********************************
@@ -146,18 +146,18 @@
 
 //********************************* write_lock_try ****************************
 int write_lock_try(isp ist, obj_p obj) {
-	if (!lock((obj)->wrlock)) return PR_FALSE;
+	if (!lock((obj)->wrlock)) return FALSE;
 	if (obj->unmutable) {
 		raise_exception(ist, OBJ(LOCK_EXC), "write_lock attempted on an unmutable object");
 		free_wrlock(obj);
-		return PR_FALSE;
+		return FALSE;
 	}
 	if (obj->rdlock_cnt || obj->wrlock_req_cnt) {
 		free_wrlock(obj);
-		return PR_FALSE;
+		return FALSE;
 	}
-	obj->long_wrlock = PR_TRUE;
-	return PR_TRUE;
+	obj->long_wrlock = TRUE;
+	return TRUE;
 }
 
 //********************************* write_lock ********************************
@@ -186,7 +186,7 @@
 		apr_thread_mutex_unlock(write_mutex);
 		obj->rdlock_cnt += sav_cnt;
 	}
-	obj->long_wrlock = PR_TRUE;
+	obj->long_wrlock = TRUE;
 }
 
 //********************************* write_unlock ******************************
@@ -194,11 +194,11 @@
 	int write_ready_flag;
 	if (obj->unmutable) return;
 	assert(obj->wrlock);
-	obj->long_wrlock = PR_FALSE;
-	obj->archived = PR_FALSE;
+	obj->long_wrlock = FALSE;
+	obj->archived = FALSE;
 	obj->state = OBJ_STATE_NEW_OR_MARKED;
 	if (mem_mgr_phase == MM_PHASE_MARKING && obj->scanned) {
-		obj->scanned = PR_FALSE;
+		obj->scanned = FALSE;
 		pr_lock(&to_be_scanned_list_lock);
 		if (mem_mgr_phase == MM_PHASE_MARKING)
 			clist_append(to_be_scanned_list, obj);
@@ -236,7 +236,7 @@
 	}
 	lockp->waiting++;
 	apr_thread_mutex_lock(lockp->mutex);
-	while (PR_TRUE) {
+	while (TRUE) {
 		apr_thread_cond_timedwait(lockp->cond, lockp->mutex, PAUSE_MS*1000);
 		if (lock(lockp->lock)) {
 			lockp->waiting--;
@@ -257,13 +257,13 @@
 //********************************* del_lock **********************************
 void del_lock(obj_p obj) {
 	get_wrlock(obj, NO_WAIT);
-	obj->del_locked = PR_TRUE; 
+	obj->del_locked = TRUE; 
 	free_wrlock(obj);
 }
 
 //********************************* del_unlock ********************************
 void del_unlock(obj_p obj) {
 	get_wrlock(obj, NO_WAIT);
-	obj->del_locked = PR_FALSE;
+	obj->del_locked = FALSE;
 	free_wrlock(obj);
 }

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/main.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -258,7 +258,7 @@
 	printf("All main threads have terminated, now stopping memory manager ...\n");
 #endif
 
-	mem_mgr_req_termination = PR_TRUE;
+	mem_mgr_req_termination = TRUE;
 	while(!mem_mgr_terminated) apr_sleep(PAUSE_MS*1000);
 
 #ifdef DEBUG_THREADS

Modified: trunk/src/memory_mgr.c
===================================================================
--- trunk/src/memory_mgr.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/memory_mgr.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -98,14 +98,14 @@
 		}
 		apr_thread_mutex_unlock(write_mutex);
 	}
-	obj->long_wrlock = PR_TRUE;
+	obj->long_wrlock = TRUE;
 }
 
 //********************************* mm_write_unlock ***************************
 void mm_write_unlock(obj_p obj) {
 	int write_ready_flag;
 	assert(obj->wrlock);
-	obj->long_wrlock = PR_FALSE;
+	obj->long_wrlock = FALSE;
 	write_ready_flag = obj->wrlock_req_cnt;	
 	free_wrlock(obj);
 	if (write_ready_flag)  apr_thread_cond_broadcast(write_cond);
@@ -139,7 +139,7 @@
 		printf("Memory manager phase: Clearing marks\n");
 		obj_count = 0; time = clock();
 #endif
-		mem_mgr_running = PR_TRUE;
+		mem_mgr_running = TRUE;
 		mem_mgr_phase = MM_PHASE_CLEARING_MARKS;
 		pr_lock(&object_list_lock); 
 		obj=obj_list_root;
@@ -147,7 +147,7 @@
 		while(obj) {
 			mm_write_lock(ist, obj);
 			obj->state = OBJ_STATE_UNMARKED;
-			obj->scanned = PR_FALSE;
+			obj->scanned = FALSE;
 			mm_write_unlock(obj);
 			obj_count++;
 			pr_lock(&object_list_lock); 
@@ -165,10 +165,10 @@
 		to_be_scanned_list = new_clist(1000); 
 		mm_write_lock(ist, obj);
 		obj->state = OBJ_STATE_NEW_OR_MARKED;
-		obj->scanned = PR_TRUE;
+		obj->scanned = TRUE;
 		mm_write_unlock(obj);
 markscan:
-		while(PR_TRUE) {
+		while(TRUE) {
 			obj_p val;
 			obj_count++;
 			read_lock(ist, obj);
@@ -180,7 +180,7 @@
 					if(val > min_obj && val != obj && !val->scanned) {
 						mm_write_lock(ist, val);
 						val->state = OBJ_STATE_NEW_OR_MARKED;
-						val->scanned = PR_TRUE;
+						val->scanned = TRUE;
 						mm_write_unlock(val);
 						pr_lock(&to_be_scanned_list_lock);
 						clist_append(to_be_scanned_list, val);
@@ -194,7 +194,7 @@
 						  val != obj && !val->scanned ) {
 						mm_write_lock(ist, val);
 						val->state = OBJ_STATE_NEW_OR_MARKED;
-						val->scanned = PR_TRUE;
+						val->scanned = TRUE;
 						mm_write_unlock(val);
 						pr_lock(&to_be_scanned_list_lock);
 						clist_append(to_be_scanned_list, val);
@@ -221,7 +221,7 @@
 						if (val > min_obj && val != obj && !val->scanned) {
 							mm_write_lock(ist, val);
 							val->state = OBJ_STATE_NEW_OR_MARKED;
-							val->scanned = PR_TRUE;
+							val->scanned = TRUE;
 							mm_write_unlock(val);
 							pr_lock(&to_be_scanned_list_lock);
 							clist_append(to_be_scanned_list, val);
@@ -297,8 +297,8 @@
 	}
 	if (mem_mgr_req_termination)
 		mem_mgr_error = MMERR_NORMAL_TERMINATION;
-	mem_mgr_running = PR_FALSE;
-	mem_mgr_terminated = PR_TRUE;
+	mem_mgr_running = FALSE;
+	mem_mgr_terminated = TRUE;
 #ifdef DEBUG_THREADS
 	printf("Memory manager thread terminating\n");
 #endif

Modified: trunk/src/object.c
===================================================================
--- trunk/src/object.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/object.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -294,7 +294,7 @@
 	if (!proto) proto = OBJ(OBJECT);
 	obj->attr_proto.proto = proto;
 	lock_init(obj->wrlock);
-	obj->del_locked = PR_TRUE;
+	obj->del_locked = TRUE;
 	pr_lock(&object_list_lock);
 	obj->next_obj = obj_list_root;
 	obj_list_root = obj;
@@ -392,11 +392,11 @@
 			ptr->attr.key = ENTRY_DELETED;
 			attr_alen(attrs)--;
 			write_unlock(ist, obj);
-			return PR_TRUE;
+			return TRUE;
 		}
 	}
 	write_unlock(ist, obj);
-	return PR_FALSE;
+	return FALSE;
 }
 
 //********************************* add_attrs *********************************
@@ -410,7 +410,7 @@
 	attr_bp(attrs,0)->attr.value = proto;
 	attr_alen(attrs) = 0;
 	obj->attr_proto.attrs = attrs;
-	obj->has_attrs  	 = PR_TRUE;
+	obj->has_attrs  	 = TRUE;
 	return attrs;
 }
 
@@ -496,7 +496,7 @@
 	for (i=0; i < len; i++)
 		if (attr_bp(attrs, i)->attr.value == proto) {
 			write_unlock(ist, obj);
-			return PR_FALSE;
+			return FALSE;
 		}
 	if (len == attr_bsize(attrs)) {
 		attrs = attrs_realloc(obj, attrs);
@@ -505,13 +505,13 @@
 	if (pos >= len) {
 		attr_bp(attrs, attr_blen(attrs)++)->attr.value = proto;
 		write_unlock(ist, obj);
-		return PR_TRUE;
+		return TRUE;
 	} else if (pos < 0) pos = 0;
 	memmove(attr_bp(attrs,pos+1),attr_bp(attrs,pos),(len-pos)*sizeof(attr_t));
 	attr_bp(attrs,pos)->attr.value = proto;
 	attr_blen(attrs)++;
 	write_unlock(ist, obj);
-	return PR_TRUE;
+	return TRUE;
 }
 
 //********************************* del_proto **********************************
@@ -521,13 +521,13 @@
 	write_lock(ist, obj);
 	if (!obj->has_attrs) {
 		write_unlock(ist, obj);
-		return PR_FALSE;
+		return FALSE;
 	}
 	attrs = obj->attr_proto.attrs;
 	len = attr_blen(attrs);
 	if (len < 2)  {
 		write_unlock(ist, obj);
-		return PR_FALSE;
+		return FALSE;
 	}
 	for (i=0; i < len; i++)
 		if (attr_bp(attrs, i)->attr.value == proto) {
@@ -535,10 +535,10 @@
 				memmove(attr_bp(attrs,i),attr_bp(attrs,i+1),((len-1)-i)*sizeof(attr_t));
 			attr_blen(attrs)--;
 			write_unlock(ist, obj);
-			return PR_TRUE;
+			return TRUE;
 		}
 	write_unlock(ist, obj);
-	return PR_FALSE;
+	return FALSE;
 }
 
 //********************************* proto_len **********************************
@@ -619,7 +619,7 @@
 	if ( (!obj->has_attrs && obj->attr_proto.proto == obj_proto) ||
 		 obj_proto == OBJ(OBJECT) ) {
 		read_unlock(ist, obj);
-		return PR_TRUE;
+		return TRUE;
 	}
 	pao_list = new_clist(10);
 	clist_append(pao_list, obj);
@@ -642,11 +642,11 @@
 end_false:
 	clist_read_unlock(ist, pao_list);
 	pr_free(pao_list);
-	return PR_FALSE;
+	return FALSE;
 end_true:
 	clist_read_unlock(ist, pao_list);
 	pr_free(pao_list);
-	return PR_TRUE;
+	return TRUE;
 }
 
 //********************************* get_proto_attr *****************************
@@ -657,7 +657,7 @@
 	int i, j, len;
 	clist_t *pao_list;
 	if (proto_pp) *proto_pp = NULL;
-	while (PR_TRUE){
+	while (TRUE){
 		read_lock(ist, obj);
 		if( (res = get_attr(ist, obj, key)) || obj == OBJ(OBJECT) ) {
 			read_unlock(ist, obj);
@@ -781,7 +781,7 @@
 	obj->data_type = OBJ_TYPE_IMMDATA;
 	obj->imm_data_len = 8;
 	obj->data.i64 = num;
-	obj->unmutable = PR_TRUE;
+	obj->unmutable = TRUE;
 	return obj;
 }
 
@@ -791,7 +791,7 @@
 	obj->data_type = OBJ_TYPE_IMMDATA;
 	obj->imm_data_len = 8;
 	obj->data.f64 = num;
-	obj->unmutable = PR_TRUE;
+	obj->unmutable = TRUE;
 	return obj;
 }
 
@@ -814,7 +814,7 @@
 		obj_str->len = len;
 		strcpy(&(obj_str->str[0]), str);
 	}
-	obj->unmutable = PR_TRUE;
+	obj->unmutable = TRUE;
 	return obj;
 }
 
@@ -835,7 +835,7 @@
 		memcpy(&(obj_str->str[0]), str, len);
 		obj_str->str[len] = 0;
 	}
-	obj->unmutable = PR_TRUE;
+	obj->unmutable = TRUE;
 	return obj;
 }
 
@@ -846,7 +846,7 @@
 	hash_obj->imm_data_len = 4;
 	hash_obj->data.i32[0] = num & HASH_MASK;
 	if (!(hash_obj->data.i32[0])) hash_obj->data.i32[0] = 1;
-	hash_obj->unmutable = PR_TRUE;
+	hash_obj->unmutable = TRUE;
 	return hash_obj;
 }
 
@@ -957,7 +957,7 @@
 				list_append_no_lock(slice_obj,ind3);
 		}
 	}
-	slice_obj->unmutable = PR_TRUE;
+	slice_obj->unmutable = TRUE;
 	return slice_obj;
 }
 
@@ -966,7 +966,7 @@
 	obj_p super_obj = new_object(OBJ(SUPER_PROTO));
 	super_obj->data_type = OBJ_TYPE_DATAPTR;
 	super_obj->data.ptr = symbol;
-	super_obj->unmutable = PR_TRUE;
+	super_obj->unmutable = TRUE;
 	return super_obj;
 }
 
@@ -1099,12 +1099,12 @@
 #define dict_wr_chk()			\
 if (ist->exception_obj) {	\
 	write_unlock(ist, dict_obj);		\
-	return PR_FALSE;				\
+	return FALSE;				\
 }
 
 //********************************* dict_add **********************************
 int dict_add(isp ist, obj_p dict_obj, obj_p key_in, obj_p value_in){
-	i32_t i, hash, hash_in, match=PR_FALSE;
+	i32_t i, hash, hash_in, match=FALSE;
 	obj_p key, rp[2];
 	dict_p dict, dp, hole=NULL;
 	rp[0]=0; rp[1]=key_in;

Modified: trunk/src/parser_routines.c
===================================================================
--- trunk/src/parser_routines.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/parser_routines.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -88,9 +88,9 @@
 	state->in_buf = in_buf;
 	state->parse_results = NULL;
 	state->num_errors = -1;
-	state->assert_enbld = PR_TRUE;
-	state->defdoc_flag = PR_FALSE;
-	state->eof_flag = PR_FALSE;
+	state->assert_enbld = TRUE;
+	state->defdoc_flag = FALSE;
+	state->eof_flag = FALSE;
 	state->const_objs = new_clist(10);
 	return state;
 }
@@ -156,7 +156,7 @@
 	clist_append_num(p->srcmap, 0);
 	clist_append_num(p->srcmap, ((parse_state*) param)->line);
 	clist_append_num(p->srcmap, ((parse_state*) param)->column);
-	p->doc_flg = PR_FALSE;
+	p->doc_flg = FALSE;
 	return debug_retrn(__LINE__, p);
 }
 
@@ -190,12 +190,12 @@
 
 //********************************* add_code_to *******************************
 void add_code_to(code* newcode, code* res, int *k){
-	add_code_flg(newcode, res, k, PR_TRUE);
+	add_code_flg(newcode, res, k, TRUE);
 }
 
 //********************************* add_code_no_free *******************************
 void add_code_no_free(code* newcode, code* res, int *k){
-	add_code_flg(newcode, res, k, PR_FALSE);
+	add_code_flg(newcode, res, k, FALSE);
 }
 
 //********************************* parser called routines ********************
@@ -218,7 +218,7 @@
 		    stmt->stack_depth = 0;
 			stmt->max_stack_depth = 0;
 		    stmt->code_data[0].bytecode.opcode = OP_NOP;
-			stmt->doc_flg = PR_TRUE;
+			stmt->doc_flg = TRUE;
 		}
 	}
 	if (stmt->stack_depth) {
@@ -264,7 +264,7 @@
 		if (p1){
 			p1 = pr_realloc(p1, sizeof(code) + (p1->len + p3->len + size)*sizeof(code_t));
 			memcpy(p1->code_data + p1->len, p3->code_data, p3->len * sizeof(code_t));
-			add_all_srcmap(p1, p3, p1->len, PR_TRUE);
+			add_all_srcmap(p1, p3, p1->len, TRUE);
 			p1->len += p3->len + size;
 			p1->max_stack_depth = max(p1->max_stack_depth, p1->stack_depth + p3->max_stack_depth);
 			p1->stack_depth = p1->stack_depth + p3->stack_depth;
@@ -1079,7 +1079,7 @@
 		memcpy(&(obj_str->str[0]), str, len);
 		obj_str->str[len] = 0;
 	}
-	obj->unmutable = PR_TRUE;
+	obj->unmutable = TRUE;
 	p->code_data[0].bytecode.param = 2;
 	p->code_data[1].data = obj;
 	add_to_const_list(param, obj);

Modified: trunk/src/sys.c
===================================================================
--- trunk/src/sys.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/sys.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -134,7 +134,7 @@
 }
 
 obj_p load_sys_module(isp ist, char* prog_path, obj_p argv_obj) {
-	int have_home = PR_FALSE;
+	int have_home = FALSE;
 	char *s, *d, path[1024], home[1024], *pp;
 	obj_p sys_path, vers_tuple;
 	obj_p sys_module;
@@ -155,7 +155,7 @@
 
 	if ((pp = getenv("PROTHONPATH"))) {
 		s=pp;
-		while(PR_TRUE) {
+		while(TRUE) {
 			for (d=path; *s && *s!=';'; s++, d++) *d = *s;
 			*d = 0;
 			add_path(ist, sys_path, path); if_exc_return NULL;
@@ -172,7 +172,7 @@
 			if (path[len-1] == '\\')
 				path[len-1] = 0;
 			strcpy(home, path);
-			have_home = PR_TRUE;
+			have_home = TRUE;
 			set_attr(ist, sys_module, sym(ist, "prothonhome"), new_string_obj(home));
 		}
 	}
@@ -183,14 +183,14 @@
 		getcwd(path, sizeof(path));
 #endif
 		strcpy(home, path);
-		have_home = PR_TRUE;
+		have_home = TRUE;
 		set_attr(ist, sys_module, sym(ist, "prothonhome"), new_string_obj(home));
 	}
 	vers_tuple = new_tuple_obj(3);
 	list_append(ist, vers_tuple, new_string_obj(PROTHON_VERSION_NUMBER));
 	list_append(ist, vers_tuple, new_string_obj(numonly(PROTHON_VERSION_BUILD, path)));
 	list_append(ist, vers_tuple, new_string_obj(PROTHON_VERSION_DATE));
-	vers_tuple->unmutable = PR_TRUE;
+	vers_tuple->unmutable = TRUE;
 	set_attr(ist, sys_module, sym(ist, "version"), vers_tuple);
 	set_attr(ist, sys_module, sym(ist, "maxint"),  new_int_obj(MAX_INT_VAL));
 	set_attr(ist, sys_module, sym(ist, "modules"), OBJ(MODULES));

Modified: trunk/src/thread.c
===================================================================
--- trunk/src/thread.c	2004-03-28 05:56:37 UTC (rev 171)
+++ trunk/src/thread.c	2004-03-28 06:25:20 UTC (rev 172)
@@ -91,13 +91,13 @@
 	}
 	while (*((int*)thread_number_ptr)) {
 		int size = attr_tsize(obj->attr_proto.attrs)+(rand() & 31);
-		int obj_locked = PR_TRUE;
+		int obj_locked = TRUE;
 		if (obj->has_attrs)
 			obj->attr_proto.attrs = pr_realloc( obj->attr_proto.attrs, 
 				 size * sizeof(attr_t) );
-		while(PR_TRUE) {
+		while(TRUE) {
 			pr_lock(&object_list_lock); 
-			if (obj_locked) {write_unlock(ist, obj); obj_locked = PR_FALSE;}
+			if (obj_locked) {write_unlock(ist, obj); obj_locked = FALSE;}
 			do {obj = obj->next_obj;} while (obj && !write_lock_try(ist, obj));
 			if (obj) break;
 			pr_unlock(&object_list_lock);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.