pinosaur
/
surf.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6aaaeb7
)
Adding a useragent parameter to surf.
author
Christoph Lohmann
<20h@r-36.net>
Wed, 31 Oct 2012 20:25:14 +0000
(21:25 +0100)
committer
Christoph Lohmann
<20h@r-36.net>
Wed, 31 Oct 2012 20:25:14 +0000
(21:25 +0100)
surf.1
patch
|
blob
|
history
surf.c
patch
|
blob
|
history
diff --git
a/surf.1
b/surf.1
index
6cd4044
..
46f8b68
100644
(file)
--- a/
surf.1
+++ b/
surf.1
@@
-10,6
+10,7
@@
surf \- simple webkit-based browser
.RB [-r\ scriptfile]
.RB [-s]
.RB [-t\ stylefile]
.RB [-r\ scriptfile]
.RB [-s]
.RB [-t\ stylefile]
+.RB [-u\ useragent]
.RB [-v]
.RB [-x]
.RB "URI"
.RB [-v]
.RB [-x]
.RB "URI"
@@
-41,6
+42,9
@@
Disable Javascript
.B \-t stylefile
Specify the user stylefile.
.TP
.B \-t stylefile
Specify the user stylefile.
.TP
+.B \-u useragent
+Specify the user stylefile.
+.TP
.B \-v
Prints version information to standard output, then exits.
.TP
.B \-v
Prints version information to standard output, then exits.
.TP
diff --git
a/surf.c
b/surf.c
index
3b291b5
..
07c689e
100644
(file)
--- a/
surf.c
+++ b/
surf.c
@@
-919,7
+919,7
@@
void
usage(void) {
fputs("surf - simple browser\n", stderr);
die("usage: surf [-c cookiefile] [-e xid] [-i] [-p] [-r scriptfile]"
usage(void) {
fputs("surf - simple browser\n", stderr);
die("usage: surf [-c cookiefile] [-e xid] [-i] [-p] [-r scriptfile]"
- " [-s] [-t stylefile] [-v] [-x] [uri]\n");
+ " [-s] [-t stylefile] [-
u useragent] [-
v] [-x] [uri]\n");
}
void
}
void
@@
-967,6
+967,9
@@
main(int argc, char *argv[]) {
case 't':
stylefile = EARGF(usage());
break;
case 't':
stylefile = EARGF(usage());
break;
+ case 'u':
+ useragent = EARGF(usage());
+ break;
case 'x':
showxid = TRUE;
break;
case 'x':
showxid = TRUE;
break;