summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2017-04-27 15:01:54 +0200
committerQuentin Rameau <quinq@fifth.space>2017-04-27 15:02:40 +0200
commitd0e3c69e5920eecd7ac7e12c39ccb10e2ca5410d (patch)
treeb0a29d3ac487bec245e6e7e6842e83a696f3d78f /surf.c
parent5c527339842fdd06411eaf25547aef0902f96915 (diff)
downloadsurf-d0e3c69e5920eecd7ac7e12c39ccb10e2ca5410d.tar.gz
surf-d0e3c69e5920eecd7ac7e12c39ccb10e2ca5410d.tar.bz2
surf-d0e3c69e5920eecd7ac7e12c39ccb10e2ca5410d.zip
Change site styles structure for a more generic one
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/surf.c b/surf.c
index 9f0c8a1..77e3d6f 100644
--- a/surf.c
+++ b/surf.c
@@ -136,9 +136,9 @@ typedef struct {
typedef struct {
char *regex;
- char *style;
+ char *file;
regex_t re;
-} SiteStyle;
+} SiteSpecific;
/* Surf */
static void usage(void);
@@ -304,8 +304,8 @@ setup(void)
styles[i].regex);
styles[i].regex = NULL;
}
- styles[i].style = g_strconcat(styledir, "/",
- styles[i].style, NULL);
+ styles[i].file = g_strconcat(styledir, "/",
+ styles[i].file, NULL);
}
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))
- return styles[i].style;
+ return styles[i].file;
}
return "";