Hi All,
I just patched my v.report to add the flag -d for 'data.' This causes the
header and footer to not be shown.
This is useful for me when calling v.report in a script.
The change is 2 lines in header.c, 5 in parse.c, and one in global.h.
What is the way to submit these as patches?
Thanks!
Rich
Here are diffs:
rich@testingrange:cmd > diff ./global.h
/usr/local/src/grass53_exp_2004_01_31/src.contrib/SCS/vector/v.report/cmd
57d56
< GLOBAL int d_format INIT(0);
rich@testingrange:cmd > diff ./header.c
/usr/local/src/grass53_exp_2004_01_31/src.contrib/SCS/vector/v.report/cmd
19,20d18
< if (d_format) return; /* no header if -d flag! */
<
129d126
< if (d_format) return; /* no trailer if -d flag! */
rich@testingrange:cmd > diff ./parse.c
/usr/local/src/grass53_exp_2004_01_31/src.contrib/SCS/vector/v.report/cmd
24d23
< struct Flag *d; /* data mode */
72,75d70
< flags.d = G_define_flag();
< flags.d->key = 'd';
< flags.d->description = "data only-suppress all headers";
<
99d93
< d_format = flags.d->answer;
Hi Again,
It looks like you can disregard this mail. v.to.db does exactly what I
want.
Sorry for the bother...but I did learn something.
Cheers,
Rich
On Mon, 2 Feb 2004, Rich Gibson wrote:
Hi All,
I just patched my v.report to add the flag -d for 'data.' This causes the
header and footer to not be shown.
This is useful for me when calling v.report in a script.
The change is 2 lines in header.c, 5 in parse.c, and one in global.h.
What is the way to submit these as patches?
Thanks!
Rich
Here are diffs:
rich@testingrange:cmd > diff ./global.h
/usr/local/src/grass53_exp_2004_01_31/src.contrib/SCS/vector/v.report/cmd
57d56
< GLOBAL int d_format INIT(0);
rich@testingrange:cmd > diff ./header.c
/usr/local/src/grass53_exp_2004_01_31/src.contrib/SCS/vector/v.report/cmd
19,20d18
< if (d_format) return; /* no header if -d flag! */
<
129d126
< if (d_format) return; /* no trailer if -d flag! */
rich@testingrange:cmd > diff ./parse.c
/usr/local/src/grass53_exp_2004_01_31/src.contrib/SCS/vector/v.report/cmd
24d23
< struct Flag *d; /* data mode */
72,75d70
< flags.d = G_define_flag();
< flags.d->key = 'd';
< flags.d->description = "data only-suppress all headers";
<
99d93
< d_format = flags.d->answer;
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5
Hello Rich
On Mon, 2 Feb 2004, Rich Gibson wrote:
Hi All,
I just patched my v.report to add the flag -d for 'data.' This causes the
header and footer to not be shown.
This is useful for me when calling v.report in a script.
What about writing the header to stderr 'fprintf(stderr, "....' and the
main information to stdout 'fprintf(stdout, "...' That would mean in a
script if you pipe the output of the command to another command you will
only get what was sent to stdout. But running with output to a terminal as
normal then everything would appear in sequence as normal.
Is that a potential alternative solution?
It is good to use unified format for diffs (diff -u) as it makes them
easier to read and more reliable to apply because the changes are
surrounded by context in the changed file.
If you have GRASS checked out from CVS then you can run something like
cvs diff -u src.contrib/SCS/vector/v.report
(from the top-level GRASS source directory) which automatically diffs your
local changed version against that in the CVS repository.
Paul