Skip to contentSkip to conversation

Update README to match changes in the initialization code

PATCH In review James Westby 2 participants 3 messages Dec 18, 2006 – Feb 27, 2007 Sparse checker

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Update README to match changes in the initialization code

There have been changes in the functions to call to get the parse tree from sparse, so update the README file to reflect these changes.

---
 README |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)
README +3 -17
index 6b1034b..b9ee73c 100644
@@ -47,28 +47,14 @@ requires the information.
 
 This means that a user of the library will literally just need to do
 
-	struct token *token;
-	int fd = open(filename, O_RDONLY);
 	struct symbol_list *list = NULL;
 
-	if (fd < 0)
-		exit_with_complaint();
-
-	// Initialize parse symbols
-	init_symbols();
-
-	// Tokenize the input stream
-	token = tokenize(filename, fd, NULL);
-
-	// Pre-process the stream
-	token = preprocess(token);
-
-	// Parse the resulting C code
-	translation_unit(token, &list);
+	// Initialise sparse and tokenize, preprocess and parse the file.
+	list = sparse(filename);
 
 	// Evaluate the types now if we want to
 	// Or leave it until later.
-	symbol_iterate(list, evaluate_symbol, NULL);
+	evaluate_symbol_list(list);
 
 and he is now done - having a full C parse of the file he opened.  The
 library doesn't need any more setup, and once done does not impose any
Signature · 1 line
1.4.4.2
#1 lore raw
Quoted 3 lines · James Westby

There have been changes in the functions to call to get the parse tree from sparse, so update the README file to reflect these changes.

My apologies, I didn't think that this message had made it, and the patch is incorrect anyway. My other patch supercedes this one.

Thanks,

James

Signature · 2 lines
  James Westby   --    GPG Key ID: B577FE13    --     http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256
#2 lore raw
Quoted 6 lines · James Westby
Quoted 2 lines · James Westby

There have been changes in the functions to call to get the parse tree from sparse, so update the README file to reflect these changes.

My apologies, I didn't think that this message had made it, and the patch is incorrect anyway. My other patch supercedes this one.

OK. I've applied your superseding patch, so I'll ignore this one.

- Josh Triplett