Fossil SCM

In main.c: Shorten all source code lines to no more than 80 characters. Add google-chrome to the list of browser to try to launch with the "ui" command.

drh 2013-02-20 15:08 trunk
Commit 12ff5ff85e0b61f008a3ce165c8e961451781dae
1 file changed +7 -4
+7 -4
--- src/main.c
+++ src/main.c
@@ -31,11 +31,11 @@
3131
#else
3232
# include <errno.h> /* errno global */
3333
#endif
3434
#if INTERFACE
3535
#ifdef FOSSIL_ENABLE_JSON
36
-# include "cson_amalgamation.h" /* JSON API. Needed inside the INTERFACE block! */
36
+# include "cson_amalgamation.h" /* JSON API. */
3737
# include "json_detail.h"
3838
#endif
3939
#ifdef FOSSIL_ENABLE_TCL
4040
#include "tcl.h"
4141
#endif
@@ -175,11 +175,12 @@
175175
char *urlFossil; /* The fossil query parameter on ssh: */
176176
char *urlShell; /* The shell query parameter on ssh: */
177177
int dontKeepUrl; /* Do not persist the URL */
178178
179179
const char *zLogin; /* Login name. "" if not logged in. */
180
- const char *zSSLIdentity; /* Value of --ssl-identity option, filename of SSL client identity */
180
+ const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
181
+ ** SSL client identity */
181182
int useLocalauth; /* No login required if from 127.0.0.1 */
182183
int noPswd; /* Logged in without password (on 127.0.0.1) */
183184
int userUid; /* Integer user id */
184185
185186
/* Information used to populate the RCVFROM table */
@@ -223,11 +224,12 @@
223224
reported. In JSON mode we try to
224225
always output JSON-form error
225226
responses and always exit() with
226227
code 0 to avoid an HTTP 500 error.
227228
*/
228
- int resultCode; /* used for passing back specific codes from /json callbacks. */
229
+ int resultCode; /* used for passing back specific codes
230
+ ** from /json callbacks. */
229231
int errorDetailParanoia; /* 0=full error codes, 1=%10, 2=%100, 3=%1000 */
230232
cson_output_opt outOpt; /* formatting options for JSON mode. */
231233
cson_value * authToken; /* authentication token */
232234
char const * jsonp; /* Name of JSONP function wrapper. */
233235
unsigned char dispatchDepth /* Tells JSON command dispatching
@@ -1925,11 +1927,12 @@
19251927
/* Unix implementation */
19261928
if( isUiCmd ){
19271929
#if !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__HAIKU__)
19281930
zBrowser = db_get("web-browser", 0);
19291931
if( zBrowser==0 ){
1930
- static const char *const azBrowserProg[] = { "xdg-open", "gnome-open", "firefox" };
1932
+ static const char *const azBrowserProg[] =
1933
+ { "xdg-open", "gnome-open", "firefox", "google-chrome" };
19311934
int i;
19321935
zBrowser = "echo";
19331936
for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){
19341937
if( binaryOnPath(azBrowserProg[i]) ){
19351938
zBrowser = azBrowserProg[i];
19361939
--- src/main.c
+++ src/main.c
@@ -31,11 +31,11 @@
31 #else
32 # include <errno.h> /* errno global */
33 #endif
34 #if INTERFACE
35 #ifdef FOSSIL_ENABLE_JSON
36 # include "cson_amalgamation.h" /* JSON API. Needed inside the INTERFACE block! */
37 # include "json_detail.h"
38 #endif
39 #ifdef FOSSIL_ENABLE_TCL
40 #include "tcl.h"
41 #endif
@@ -175,11 +175,12 @@
175 char *urlFossil; /* The fossil query parameter on ssh: */
176 char *urlShell; /* The shell query parameter on ssh: */
177 int dontKeepUrl; /* Do not persist the URL */
178
179 const char *zLogin; /* Login name. "" if not logged in. */
180 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of SSL client identity */
 
181 int useLocalauth; /* No login required if from 127.0.0.1 */
182 int noPswd; /* Logged in without password (on 127.0.0.1) */
183 int userUid; /* Integer user id */
184
185 /* Information used to populate the RCVFROM table */
@@ -223,11 +224,12 @@
223 reported. In JSON mode we try to
224 always output JSON-form error
225 responses and always exit() with
226 code 0 to avoid an HTTP 500 error.
227 */
228 int resultCode; /* used for passing back specific codes from /json callbacks. */
 
229 int errorDetailParanoia; /* 0=full error codes, 1=%10, 2=%100, 3=%1000 */
230 cson_output_opt outOpt; /* formatting options for JSON mode. */
231 cson_value * authToken; /* authentication token */
232 char const * jsonp; /* Name of JSONP function wrapper. */
233 unsigned char dispatchDepth /* Tells JSON command dispatching
@@ -1925,11 +1927,12 @@
1925 /* Unix implementation */
1926 if( isUiCmd ){
1927 #if !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__HAIKU__)
1928 zBrowser = db_get("web-browser", 0);
1929 if( zBrowser==0 ){
1930 static const char *const azBrowserProg[] = { "xdg-open", "gnome-open", "firefox" };
 
1931 int i;
1932 zBrowser = "echo";
1933 for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){
1934 if( binaryOnPath(azBrowserProg[i]) ){
1935 zBrowser = azBrowserProg[i];
1936
--- src/main.c
+++ src/main.c
@@ -31,11 +31,11 @@
31 #else
32 # include <errno.h> /* errno global */
33 #endif
34 #if INTERFACE
35 #ifdef FOSSIL_ENABLE_JSON
36 # include "cson_amalgamation.h" /* JSON API. */
37 # include "json_detail.h"
38 #endif
39 #ifdef FOSSIL_ENABLE_TCL
40 #include "tcl.h"
41 #endif
@@ -175,11 +175,12 @@
175 char *urlFossil; /* The fossil query parameter on ssh: */
176 char *urlShell; /* The shell query parameter on ssh: */
177 int dontKeepUrl; /* Do not persist the URL */
178
179 const char *zLogin; /* Login name. "" if not logged in. */
180 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
181 ** SSL client identity */
182 int useLocalauth; /* No login required if from 127.0.0.1 */
183 int noPswd; /* Logged in without password (on 127.0.0.1) */
184 int userUid; /* Integer user id */
185
186 /* Information used to populate the RCVFROM table */
@@ -223,11 +224,12 @@
224 reported. In JSON mode we try to
225 always output JSON-form error
226 responses and always exit() with
227 code 0 to avoid an HTTP 500 error.
228 */
229 int resultCode; /* used for passing back specific codes
230 ** from /json callbacks. */
231 int errorDetailParanoia; /* 0=full error codes, 1=%10, 2=%100, 3=%1000 */
232 cson_output_opt outOpt; /* formatting options for JSON mode. */
233 cson_value * authToken; /* authentication token */
234 char const * jsonp; /* Name of JSONP function wrapper. */
235 unsigned char dispatchDepth /* Tells JSON command dispatching
@@ -1925,11 +1927,12 @@
1927 /* Unix implementation */
1928 if( isUiCmd ){
1929 #if !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__HAIKU__)
1930 zBrowser = db_get("web-browser", 0);
1931 if( zBrowser==0 ){
1932 static const char *const azBrowserProg[] =
1933 { "xdg-open", "gnome-open", "firefox", "google-chrome" };
1934 int i;
1935 zBrowser = "echo";
1936 for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){
1937 if( binaryOnPath(azBrowserProg[i]) ){
1938 zBrowser = azBrowserProg[i];
1939

Keyboard Shortcuts

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