All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Update the information in README about using the library.
@ 2006-12-18 22:00 James Westby
  2007-02-27 19:05 ` Josh Triplett
  0 siblings, 1 reply; 7+ messages in thread
From: James Westby @ 2006-12-18 22:00 UTC (permalink / raw)
  To: linux-sparse

Changes in the library have left the README giving out of date information
on how to intialise the library and get the symbols out of it. Update the
documentation to match the latest functions.

Signed-off-by: James Westby <jw+debian@jameswestby.net>
---
 README |   29 ++++++++---------------------
 1 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/README b/README
index 6b1034b..69492ab 100644
--- a/README
+++ b/README
@@ -47,35 +47,22 @@ 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;
+  struct string_list *filelist = NULL;
+  char *file;
 
-	if (fd < 0)
-		exit_with_complaint();
+  action(sparse_initialize(argc, argv, filelist));
 
-	// 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);
-
-	// Evaluate the types now if we want to
-	// Or leave it until later.
-	symbol_iterate(list, evaluate_symbol, NULL);
+  FOR_EACH_PTR_NOTAG(filelist, file) {
+    action(sparse(file));
+  } END_FOR_EACH_PTR_NOTAG(file);
 
 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
 more requirements.  The user is free to do whatever he wants with the
 parse tree that got built up, and needs not worry about the library ever
 again.  There is no extra state, there are no parser callbacks, there is
-only the parse tree that is described by the header files. 
+only the parse tree that is described by the header files. The action 
+funtion takes a pointer to a symbol_list and does whatever it likes with it.
 
 The library also contains (as an example user) a few clients that do the
 preprocessing, parsing and type evaluation and just print out the
-- 
1.4.4.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Update the information in README about using the library.
  2006-12-18 22:00 [PATCH] Update the information in README about using the library James Westby
@ 2007-02-27 19:05 ` Josh Triplett
  0 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2007-02-27 19:05 UTC (permalink / raw)
  To: linux-sparse

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

James Westby wrote:
> Changes in the library have left the README giving out of date information
> on how to intialise the library and get the symbols out of it. Update the
> documentation to match the latest functions.
> 
> Signed-off-by: James Westby <jw+debian@jameswestby.net>

Applied.

- Josh Triplett



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Update the information in README about using the library.
  2013-12-04  0:12     ` Christopher Li
@ 2013-12-09  9:21       ` Christopher Li
  0 siblings, 0 replies; 7+ messages in thread
From: Christopher Li @ 2013-12-09  9:21 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Franz Schrober, Linux-Sparse, James Westby

On Tue, Dec 3, 2013 at 4:12 PM, Christopher Li <sparse@chrisli.org> wrote:
>> Bad assumption; if you've already pushed the patch, I'd suggest just
>> "git revert"ing the revert.
>>
>
> Thanks, that is just what I need. I will just do that then.

I need to revert 3 patch and there are change in between.
So I just apply the original patch. I push the change out already.

Chris

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Update the information in README about using the library.
  2013-12-03 23:45   ` Josh Triplett
@ 2013-12-04  0:12     ` Christopher Li
  2013-12-09  9:21       ` Christopher Li
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Li @ 2013-12-04  0:12 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Franz Schrober, Linux-Sparse, James Westby

On Tue, Dec 3, 2013 at 3:45 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> On Tue, Dec 03, 2013 at 03:17:37PM -0800, Christopher Li wrote:
>> That will make you as the author of this commit.
>
> The "From:" line at the top of the patch will make git set that person
> as the author rather than the sender of the mail.
>
>> I think not much people have pull from the sparse repository yet.
>
> Bad assumption; if you've already pushed the patch, I'd suggest just
> "git revert"ing the revert.
>

Thanks, that is just what I need. I will just do that then.

Chris

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Update the information in README about using the library.
  2013-12-03 23:17 ` Christopher Li
@ 2013-12-03 23:45   ` Josh Triplett
  2013-12-04  0:12     ` Christopher Li
  0 siblings, 1 reply; 7+ messages in thread
From: Josh Triplett @ 2013-12-03 23:45 UTC (permalink / raw)
  To: Christopher Li; +Cc: Franz Schrober, Linux-Sparse, James Westby

On Tue, Dec 03, 2013 at 03:17:37PM -0800, Christopher Li wrote:
> That will make you as the author of this commit.

The "From:" line at the top of the patch will make git set that person
as the author rather than the sender of the mail.

> I think not much people have pull from the sparse repository yet.

Bad assumption; if you've already pushed the patch, I'd suggest just
"git revert"ing the revert.

- Josh Triplett

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Update the information in README about using the library.
  2013-12-03  8:26 Franz Schrober
@ 2013-12-03 23:17 ` Christopher Li
  2013-12-03 23:45   ` Josh Triplett
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Li @ 2013-12-03 23:17 UTC (permalink / raw)
  To: Franz Schrober; +Cc: Linux-Sparse, James Westby

That will make you as the author of this commit.
I think not much people have pull from the sparse repository yet.

How about I just roll back and reapply your patch without
the undo part? Of course you need to regenerate a patch with
James' ACK.

The problem is that the next pull from sparse repository
will be a bit messy if you have the abandoned branch already.
Nothing "git reset" can't fix. Hopefully that will not affect a lot of
people.


Chris

On Tue, Dec 3, 2013 at 12:26 AM, Franz Schrober <franzschrober@gmail.com> wrote:
> From: James Westby <james@jameswestby.net>
>
> Changes in the library have left the README giving out of date information
> on how to intialise the library and get the symbols out of it. Update the
> documentation to match the latest functions.
>
> Signed-off-by: James Westby <james@jameswestby.net>
> Signed-off-by: Franz Schrober <franzschrober@gmail.com>
> ---
> This patch was already submitted by James Westby and had to be reverted again
> after he didn't responded in the 4 year relicense process. Now he accepted the
> change to MIT license and I just resubmit it for him. So it is a revert for the
> revert 01b00f59f2a6aba6b623c0a68827938c1f570877 ('Revert "Update the
> information in README about using the library."')
>
> Sorry for the inconveniences.
>
>  README | 29 ++++++++---------------------
>  1 file changed, 8 insertions(+), 21 deletions(-)
>
> diff --git a/README b/README
> index a731a82..033ae15 100644
> --- a/README
> +++ b/README
> @@ -47,35 +47,22 @@ 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;
> +  struct string_list *filelist = NULL;
> +  char *file;
>
> -       if (fd < 0)
> -               exit_with_complaint();
> +  action(sparse_initialize(argc, argv, filelist));
>
> -       // 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);
> -
> -       // Evaluate the types now if we want to
> -       // Or leave it until later.
> -       symbol_iterate(list, evaluate_symbol, NULL);
> +  FOR_EACH_PTR_NOTAG(filelist, file) {
> +    action(sparse(file));
> +  } END_FOR_EACH_PTR_NOTAG(file);
>
>  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
>  more requirements.  The user is free to do whatever he wants with the
>  parse tree that got built up, and needs not worry about the library ever
>  again.  There is no extra state, there are no parser callbacks, there is
> -only the parse tree that is described by the header files.
> +only the parse tree that is described by the header files. The action
> +funtion takes a pointer to a symbol_list and does whatever it likes with it.
>
>  The library also contains (as an example user) a few clients that do the
>  preprocessing, parsing and type evaluation and just print out the
> --
> 1.8.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] Update the information in README about using the library.
@ 2013-12-03  8:26 Franz Schrober
  2013-12-03 23:17 ` Christopher Li
  0 siblings, 1 reply; 7+ messages in thread
From: Franz Schrober @ 2013-12-03  8:26 UTC (permalink / raw)
  To: linux-sparse; +Cc: sparse, James Westby, Franz Schrober

From: James Westby <james@jameswestby.net>

Changes in the library have left the README giving out of date information
on how to intialise the library and get the symbols out of it. Update the
documentation to match the latest functions.

Signed-off-by: James Westby <james@jameswestby.net>
Signed-off-by: Franz Schrober <franzschrober@gmail.com>
---
This patch was already submitted by James Westby and had to be reverted again
after he didn't responded in the 4 year relicense process. Now he accepted the
change to MIT license and I just resubmit it for him. So it is a revert for the
revert 01b00f59f2a6aba6b623c0a68827938c1f570877 ('Revert "Update the
information in README about using the library."')

Sorry for the inconveniences.

 README | 29 ++++++++---------------------
 1 file changed, 8 insertions(+), 21 deletions(-)

diff --git a/README b/README
index a731a82..033ae15 100644
--- a/README
+++ b/README
@@ -47,35 +47,22 @@ 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;
+  struct string_list *filelist = NULL;
+  char *file;
 
-	if (fd < 0)
-		exit_with_complaint();
+  action(sparse_initialize(argc, argv, filelist));
 
-	// 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);

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-09  9:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-18 22:00 [PATCH] Update the information in README about using the library James Westby
2007-02-27 19:05 ` Josh Triplett
2013-12-03  8:26 Franz Schrober
2013-12-03 23:17 ` Christopher Li
2013-12-03 23:45   ` Josh Triplett
2013-12-04  0:12     ` Christopher Li
2013-12-09  9:21       ` Christopher Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.