Fossil SCM

Accidentally omitted the --skin option processing from the previous check-in.

drh 2015-02-11 15:12 trunk
Commit 5ce5ff5765202f7ec9aad04e709651ebb53e3e9e
2 files changed +4 +12
+4
--- src/main.c
+++ src/main.c
@@ -2026,10 +2026,11 @@
20262026
** --nossl signal that no SSL connections are available
20272027
** --notfound URL use URL as "HTTP 404, object not found" page.
20282028
** --files GLOB comma-separate glob patterns for static file to serve
20292029
** --baseurl URL base URL (useful with reverse proxies)
20302030
** --scgi Interpret input as SCGI rather than HTTP
2031
+** --skin LABEL Use override skin LABEL
20312032
**
20322033
** See also: cgi, server, winsrv
20332034
*/
20342035
void cmd_http(void){
20352036
const char *zIpAddr = 0;
@@ -2049,10 +2050,11 @@
20492050
dehttpize(z);
20502051
zFileGlob = z;
20512052
}else{
20522053
zFileGlob = find_option("files",0,1);
20532054
}
2055
+ skin_override();
20542056
zNotFound = find_option("notfound", 0, 1);
20552057
g.useLocalauth = find_option("localauth", 0, 0)!=0;
20562058
g.sslNotAvailable = find_option("nossl", 0, 0)!=0;
20572059
useSCGI = find_option("scgi", 0, 0)!=0;
20582060
zAltBase = find_option("baseurl", 0, 1);
@@ -2212,10 +2214,11 @@
22122214
** --th-trace trace TH1 execution (for debugging purposes)
22132215
** --baseurl URL Use URL as the base (useful for reverse proxies)
22142216
** --notfound URL Redirect
22152217
** --files GLOBLIST Comma-separated list of glob patterns for static files
22162218
** --scgi Accept SCGI rather than HTTP
2219
+** --skin LABEL Use override skin LABEL
22172220
**
22182221
** See also: cgi, http, winsrv
22192222
*/
22202223
void cmd_webserver(void){
22212224
int iPort, mxPort; /* Range of TCP ports allowed */
@@ -2240,10 +2243,11 @@
22402243
dehttpize(z);
22412244
zFileGlob = z;
22422245
}else{
22432246
zFileGlob = find_option("files",0,1);
22442247
}
2248
+ skin_override();
22452249
g.useLocalauth = find_option("localauth", 0, 0)!=0;
22462250
Th_InitTraceLog();
22472251
zPort = find_option("port", "P", 1);
22482252
zNotFound = find_option("notfound", 0, 1);
22492253
zAltBase = find_option("baseurl", 0, 1);
22502254
--- src/main.c
+++ src/main.c
@@ -2026,10 +2026,11 @@
2026 ** --nossl signal that no SSL connections are available
2027 ** --notfound URL use URL as "HTTP 404, object not found" page.
2028 ** --files GLOB comma-separate glob patterns for static file to serve
2029 ** --baseurl URL base URL (useful with reverse proxies)
2030 ** --scgi Interpret input as SCGI rather than HTTP
 
2031 **
2032 ** See also: cgi, server, winsrv
2033 */
2034 void cmd_http(void){
2035 const char *zIpAddr = 0;
@@ -2049,10 +2050,11 @@
2049 dehttpize(z);
2050 zFileGlob = z;
2051 }else{
2052 zFileGlob = find_option("files",0,1);
2053 }
 
2054 zNotFound = find_option("notfound", 0, 1);
2055 g.useLocalauth = find_option("localauth", 0, 0)!=0;
2056 g.sslNotAvailable = find_option("nossl", 0, 0)!=0;
2057 useSCGI = find_option("scgi", 0, 0)!=0;
2058 zAltBase = find_option("baseurl", 0, 1);
@@ -2212,10 +2214,11 @@
2212 ** --th-trace trace TH1 execution (for debugging purposes)
2213 ** --baseurl URL Use URL as the base (useful for reverse proxies)
2214 ** --notfound URL Redirect
2215 ** --files GLOBLIST Comma-separated list of glob patterns for static files
2216 ** --scgi Accept SCGI rather than HTTP
 
2217 **
2218 ** See also: cgi, http, winsrv
2219 */
2220 void cmd_webserver(void){
2221 int iPort, mxPort; /* Range of TCP ports allowed */
@@ -2240,10 +2243,11 @@
2240 dehttpize(z);
2241 zFileGlob = z;
2242 }else{
2243 zFileGlob = find_option("files",0,1);
2244 }
 
2245 g.useLocalauth = find_option("localauth", 0, 0)!=0;
2246 Th_InitTraceLog();
2247 zPort = find_option("port", "P", 1);
2248 zNotFound = find_option("notfound", 0, 1);
2249 zAltBase = find_option("baseurl", 0, 1);
2250
--- src/main.c
+++ src/main.c
@@ -2026,10 +2026,11 @@
2026 ** --nossl signal that no SSL connections are available
2027 ** --notfound URL use URL as "HTTP 404, object not found" page.
2028 ** --files GLOB comma-separate glob patterns for static file to serve
2029 ** --baseurl URL base URL (useful with reverse proxies)
2030 ** --scgi Interpret input as SCGI rather than HTTP
2031 ** --skin LABEL Use override skin LABEL
2032 **
2033 ** See also: cgi, server, winsrv
2034 */
2035 void cmd_http(void){
2036 const char *zIpAddr = 0;
@@ -2049,10 +2050,11 @@
2050 dehttpize(z);
2051 zFileGlob = z;
2052 }else{
2053 zFileGlob = find_option("files",0,1);
2054 }
2055 skin_override();
2056 zNotFound = find_option("notfound", 0, 1);
2057 g.useLocalauth = find_option("localauth", 0, 0)!=0;
2058 g.sslNotAvailable = find_option("nossl", 0, 0)!=0;
2059 useSCGI = find_option("scgi", 0, 0)!=0;
2060 zAltBase = find_option("baseurl", 0, 1);
@@ -2212,10 +2214,11 @@
2214 ** --th-trace trace TH1 execution (for debugging purposes)
2215 ** --baseurl URL Use URL as the base (useful for reverse proxies)
2216 ** --notfound URL Redirect
2217 ** --files GLOBLIST Comma-separated list of glob patterns for static files
2218 ** --scgi Accept SCGI rather than HTTP
2219 ** --skin LABEL Use override skin LABEL
2220 **
2221 ** See also: cgi, http, winsrv
2222 */
2223 void cmd_webserver(void){
2224 int iPort, mxPort; /* Range of TCP ports allowed */
@@ -2240,10 +2243,11 @@
2243 dehttpize(z);
2244 zFileGlob = z;
2245 }else{
2246 zFileGlob = find_option("files",0,1);
2247 }
2248 skin_override();
2249 g.useLocalauth = find_option("localauth", 0, 0)!=0;
2250 Th_InitTraceLog();
2251 zPort = find_option("port", "P", 1);
2252 zNotFound = find_option("notfound", 0, 1);
2253 zAltBase = find_option("baseurl", 0, 1);
2254
+12
--- src/skins.c
+++ src/skins.c
@@ -84,10 +84,22 @@
8484
blob_append(&err, " ", 1);
8585
blob_append(&err, aBuiltinSkin[i].zLabel, -1);
8686
}
8787
return blob_str(&err);
8888
}
89
+
90
+/*
91
+** Look for the --skin command-line option and process it. Or
92
+** call fossil_fatal() if an unknown skin is specified.
93
+*/
94
+void skin_override(void){
95
+ const char *zSkin = find_option("skin",0,1);
96
+ if( zSkin ){
97
+ char *zErr = skin_use_alternative(zSkin);
98
+ if( zErr ) fossil_fatal("available skins: %s", zErr);
99
+ }
100
+}
89101
90102
/*
91103
** The following routines return the various components of the skin
92104
** that should be used for the current run.
93105
*/
94106
--- src/skins.c
+++ src/skins.c
@@ -84,10 +84,22 @@
84 blob_append(&err, " ", 1);
85 blob_append(&err, aBuiltinSkin[i].zLabel, -1);
86 }
87 return blob_str(&err);
88 }
 
 
 
 
 
 
 
 
 
 
 
 
89
90 /*
91 ** The following routines return the various components of the skin
92 ** that should be used for the current run.
93 */
94
--- src/skins.c
+++ src/skins.c
@@ -84,10 +84,22 @@
84 blob_append(&err, " ", 1);
85 blob_append(&err, aBuiltinSkin[i].zLabel, -1);
86 }
87 return blob_str(&err);
88 }
89
90 /*
91 ** Look for the --skin command-line option and process it. Or
92 ** call fossil_fatal() if an unknown skin is specified.
93 */
94 void skin_override(void){
95 const char *zSkin = find_option("skin",0,1);
96 if( zSkin ){
97 char *zErr = skin_use_alternative(zSkin);
98 if( zErr ) fossil_fatal("available skins: %s", zErr);
99 }
100 }
101
102 /*
103 ** The following routines return the various components of the skin
104 ** that should be used for the current run.
105 */
106

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button