Index: libcfa/src/parseconfig.cfa
===================================================================
--- libcfa/src/parseconfig.cfa	(revision ecfa7607e85a589e6b1a47966da0bc30f4adf6dc)
+++ libcfa/src/parseconfig.cfa	(revision 8e0f2db04877d560c555d3113c2d1596a27f4064)
@@ -97,6 +97,8 @@
 // Parse configuration from a file formatted in shell style
 KVPairs & parse_tabular_config_format( const char * config_file, size_t num_entries ) {
-	// * KVPairs kv_pairs;
 	KVPairs kv_pairs = { num_entries };
+
+	char key[64];
+	char value[256];
 
 	try {
@@ -104,51 +106,17 @@
 
 		while () {
-			// * char key;
-			// * char value;
-		  	// if ( comments( in, key ) ) break;			// eof ?
-
-			// THE CODE BELOW IS TEMPORARY, TO TRY AND GET SOMETHING WORKING
-
-		  	// Right now doesn't handle duplicate keys. Should use hashmap for that
-			char c;
-			[1024] char key;
-			[1024] char value;
-			//StringBuilder key_sb;
-			//StringBuilder value_sb;
-
-			// Doesn't handle comments
-			in | key;
-			/*
-			while () {
-				in | c;
-				if ( c == ' ' || c == '\t' ) {
-					while ( c == ' ' || c == '\t' ) in | c;
-					break;
-				} else {
-			  		add_char( key_sb, c );
-				}
-			}
-			*/
-
-			//* char key = alloc( key_sb.size );
-			//strcpy( key, key_sb.string );
-
-			// Doesn't handle comments
+		for ( Parmnum ) {								// parameter names can appear in any order
+		  if ( comments( in, key ) ) break;				// eof ?
+			for ( posn = 0; posn < Parmnum && strcmp( name, parms[posn].name ) != 0; posn += 1 ); // linear search
+		  if ( posn == Parmnum ) break;					// configuration not found ?
+		  if ( parms[posn].value != 0 ) break;			// duplicate configuration ?
 			in | value;
-			/*
-			while () {
-				in | c;
-			  if ( c == ' ' || c == '\t' || c == '\n' ) break;
-				add_char( value_sb, c );
-			}
-			*/
-
-			//* char value = alloc( value_sb.size );
-			//strcpy( value, value_sb.string );
 
 			add_kv_pair( kv_pairs, key, value );
 
-		  if ( fail( in ) ) break;
-		  	in | nl; // ignore remainder of line
+		  if ( eof( in ) ) break;
+			in | nl;									// ignore remainder of line
+			numOfParms += 1;
+			parms[posn].value = value;
 		} // for
 	} catch( Open_Failure * ex; ex->istream == &in ) {
