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.
Commit
12ff5ff85e0b61f008a3ce165c8e961451781dae
Parent
957be426253c20e…
1 file changed
+7
-4
+7
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -31,11 +31,11 @@ | ||
| 31 | 31 | #else |
| 32 | 32 | # include <errno.h> /* errno global */ |
| 33 | 33 | #endif |
| 34 | 34 | #if INTERFACE |
| 35 | 35 | #ifdef FOSSIL_ENABLE_JSON |
| 36 | -# include "cson_amalgamation.h" /* JSON API. Needed inside the INTERFACE block! */ | |
| 36 | +# include "cson_amalgamation.h" /* JSON API. */ | |
| 37 | 37 | # include "json_detail.h" |
| 38 | 38 | #endif |
| 39 | 39 | #ifdef FOSSIL_ENABLE_TCL |
| 40 | 40 | #include "tcl.h" |
| 41 | 41 | #endif |
| @@ -175,11 +175,12 @@ | ||
| 175 | 175 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 176 | 176 | char *urlShell; /* The shell query parameter on ssh: */ |
| 177 | 177 | int dontKeepUrl; /* Do not persist the URL */ |
| 178 | 178 | |
| 179 | 179 | 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 */ | |
| 181 | 182 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 182 | 183 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 183 | 184 | int userUid; /* Integer user id */ |
| 184 | 185 | |
| 185 | 186 | /* Information used to populate the RCVFROM table */ |
| @@ -223,11 +224,12 @@ | ||
| 223 | 224 | reported. In JSON mode we try to |
| 224 | 225 | always output JSON-form error |
| 225 | 226 | responses and always exit() with |
| 226 | 227 | code 0 to avoid an HTTP 500 error. |
| 227 | 228 | */ |
| 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. */ | |
| 229 | 231 | int errorDetailParanoia; /* 0=full error codes, 1=%10, 2=%100, 3=%1000 */ |
| 230 | 232 | cson_output_opt outOpt; /* formatting options for JSON mode. */ |
| 231 | 233 | cson_value * authToken; /* authentication token */ |
| 232 | 234 | char const * jsonp; /* Name of JSONP function wrapper. */ |
| 233 | 235 | unsigned char dispatchDepth /* Tells JSON command dispatching |
| @@ -1925,11 +1927,12 @@ | ||
| 1925 | 1927 | /* Unix implementation */ |
| 1926 | 1928 | if( isUiCmd ){ |
| 1927 | 1929 | #if !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__HAIKU__) |
| 1928 | 1930 | zBrowser = db_get("web-browser", 0); |
| 1929 | 1931 | 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" }; | |
| 1931 | 1934 | int i; |
| 1932 | 1935 | zBrowser = "echo"; |
| 1933 | 1936 | for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){ |
| 1934 | 1937 | if( binaryOnPath(azBrowserProg[i]) ){ |
| 1935 | 1938 | zBrowser = azBrowserProg[i]; |
| 1936 | 1939 |
| --- 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 |