Fossil SCM

Fix the --skin option so that it works on Windows.

drh 2017-05-26 13:15 trunk
Commit 685617773e63bc55902e9b06c5e068fc2a9585dce82a160a9df267468dd790cf
2 files changed +10 +5
+10
--- src/skins.c
+++ src/skins.c
@@ -157,10 +157,20 @@
157157
fossil_free(z);
158158
}
159159
}
160160
return zOut;
161161
}
162
+
163
+/*
164
+** Return the command-line option used to set the skin, or return NULL
165
+** if the default skin is being used.
166
+*/
167
+const char *skin_in_use(void){
168
+ if( zAltSkinDir ) return zAltSkinDir;
169
+ if( pAltSkin ) return pAltSkin->zLabel;
170
+ return 0;
171
+}
162172
163173
/*
164174
** Return a pointer to a SkinDetail element. Return 0 if not found.
165175
*/
166176
static struct SkinDetail *skin_detail_find(const char *zName){
167177
--- src/skins.c
+++ src/skins.c
@@ -157,10 +157,20 @@
157 fossil_free(z);
158 }
159 }
160 return zOut;
161 }
 
 
 
 
 
 
 
 
 
 
162
163 /*
164 ** Return a pointer to a SkinDetail element. Return 0 if not found.
165 */
166 static struct SkinDetail *skin_detail_find(const char *zName){
167
--- src/skins.c
+++ src/skins.c
@@ -157,10 +157,20 @@
157 fossil_free(z);
158 }
159 }
160 return zOut;
161 }
162
163 /*
164 ** Return the command-line option used to set the skin, or return NULL
165 ** if the default skin is being used.
166 */
167 const char *skin_in_use(void){
168 if( zAltSkinDir ) return zAltSkinDir;
169 if( pAltSkin ) return pAltSkin->zLabel;
170 return 0;
171 }
172
173 /*
174 ** Return a pointer to a SkinDetail element. Return 0 if not found.
175 */
176 static struct SkinDetail *skin_detail_find(const char *zName){
177
--- src/winhttp.c
+++ src/winhttp.c
@@ -306,10 +306,11 @@
306306
SOCKADDR_IN addr;
307307
int idCnt = 0;
308308
int iPort = mnPort;
309309
Blob options;
310310
wchar_t zTmpPath[MAX_PATH];
311
+ const char *zSkin;
311312
#if USE_SEE
312313
const char *zSavedKey = 0;
313314
size_t savedKeySize = 0;
314315
#endif
315316
@@ -330,10 +331,14 @@
330331
blob_appendf(&options, " --th-trace");
331332
}
332333
if( flags & HTTP_SERVER_REPOLIST ){
333334
blob_appendf(&options, " --repolist");
334335
}
336
+ zSkin = skin_in_use();
337
+ if( zSkin ){
338
+ blob_appendf(&options, " --skin %s", zSkin);
339
+ }
335340
#if USE_SEE
336341
zSavedKey = db_get_saved_encryption_key();
337342
savedKeySize = db_get_saved_encryption_key_size();
338343
if( zSavedKey!=0 && savedKeySize>0 ){
339344
blob_appendf(&options, " --usepidkey %lu:%p:%u", GetCurrentProcessId(),
340345
--- src/winhttp.c
+++ src/winhttp.c
@@ -306,10 +306,11 @@
306 SOCKADDR_IN addr;
307 int idCnt = 0;
308 int iPort = mnPort;
309 Blob options;
310 wchar_t zTmpPath[MAX_PATH];
 
311 #if USE_SEE
312 const char *zSavedKey = 0;
313 size_t savedKeySize = 0;
314 #endif
315
@@ -330,10 +331,14 @@
330 blob_appendf(&options, " --th-trace");
331 }
332 if( flags & HTTP_SERVER_REPOLIST ){
333 blob_appendf(&options, " --repolist");
334 }
 
 
 
 
335 #if USE_SEE
336 zSavedKey = db_get_saved_encryption_key();
337 savedKeySize = db_get_saved_encryption_key_size();
338 if( zSavedKey!=0 && savedKeySize>0 ){
339 blob_appendf(&options, " --usepidkey %lu:%p:%u", GetCurrentProcessId(),
340
--- src/winhttp.c
+++ src/winhttp.c
@@ -306,10 +306,11 @@
306 SOCKADDR_IN addr;
307 int idCnt = 0;
308 int iPort = mnPort;
309 Blob options;
310 wchar_t zTmpPath[MAX_PATH];
311 const char *zSkin;
312 #if USE_SEE
313 const char *zSavedKey = 0;
314 size_t savedKeySize = 0;
315 #endif
316
@@ -330,10 +331,14 @@
331 blob_appendf(&options, " --th-trace");
332 }
333 if( flags & HTTP_SERVER_REPOLIST ){
334 blob_appendf(&options, " --repolist");
335 }
336 zSkin = skin_in_use();
337 if( zSkin ){
338 blob_appendf(&options, " --skin %s", zSkin);
339 }
340 #if USE_SEE
341 zSavedKey = db_get_saved_encryption_key();
342 savedKeySize = db_get_saved_encryption_key_size();
343 if( zSavedKey!=0 && savedKeySize>0 ){
344 blob_appendf(&options, " --usepidkey %lu:%p:%u", GetCurrentProcessId(),
345

Keyboard Shortcuts

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