pinosaur
/
surf.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c52733
)
Change site styles structure for a more generic one
author
Quentin Rameau
<quinq@fifth.space>
Thu, 27 Apr 2017 13:01:54 +0000
(15:01 +0200)
committer
Quentin Rameau
<quinq@fifth.space>
Thu, 27 Apr 2017 13:02:40 +0000
(15:02 +0200)
config.def.h
patch
|
blob
|
history
surf.c
patch
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
dce76f8
..
712f975
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-90,7
+90,7
@@
static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
* The iteration will stop at the first match, beginning at the beginning of
* the list.
*/
* The iteration will stop at the first match, beginning at the beginning of
* the list.
*/
-static SiteS
tyle
styles[] = {
+static SiteS
pecific
styles[] = {
/* regexp file in $styledir */
{ ".*", "default.css" },
};
/* regexp file in $styledir */
{ ".*", "default.css" },
};
diff --git
a/surf.c
b/surf.c
index
9f0c8a1
..
77e3d6f
100644
(file)
--- a/
surf.c
+++ b/
surf.c
@@
-136,9
+136,9
@@
typedef struct {
typedef struct {
char *regex;
typedef struct {
char *regex;
- char *
sty
le;
+ char *
fi
le;
regex_t re;
regex_t re;
-} SiteS
tyle
;
+} SiteS
pecific
;
/* Surf */
static void usage(void);
/* Surf */
static void usage(void);
@@
-304,8
+304,8
@@
setup(void)
styles[i].regex);
styles[i].regex = NULL;
}
styles[i].regex);
styles[i].regex = NULL;
}
- styles[i].
sty
le = g_strconcat(styledir, "/",
-
styles[i].sty
le, NULL);
+ styles[i].
fi
le = g_strconcat(styledir, "/",
+
styles[i].fi
le, NULL);
}
g_free(styledir);
} else {
}
g_free(styledir);
} else {
@@
-748,7
+748,7
@@
getstyle(const char *uri)
for (i = 0; i < LENGTH(styles); ++i) {
if (styles[i].regex &&
!regexec(&(styles[i].re), uri, 0, NULL, 0))
for (i = 0; i < LENGTH(styles); ++i) {
if (styles[i].regex &&
!regexec(&(styles[i].re), uri, 0, NULL, 0))
- return styles[i].
sty
le;
+ return styles[i].
fi
le;
}
return "";
}
return "";