Fossil SCM
style
Commit
3ba9a4d5caa9615236bb48609bedcb2854b7ec1b
Parent
8923e06ceabd4d6…
7 files changed
+4
-4
+2
-2
+9
-9
+8
-8
+2
-2
+5
-5
+19
-19
+4
-4
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -938,19 +938,19 @@ | ||
| 938 | 938 | |
| 939 | 939 | if( eType==0 ){ |
| 940 | 940 | if( binOk ){ |
| 941 | 941 | return 0; /* We don't want binary warnings for this file. */ |
| 942 | 942 | } |
| 943 | - if( lookFlags&(LOOK_LENGTH) && !lookFlags&(LOOK_NUL) ){ | |
| 943 | + if( (lookFlags&LOOK_LENGTH) && !(lookFlags&LOOK_NUL) ){ | |
| 944 | 944 | zWarning = "long lines"; |
| 945 | 945 | }else{ |
| 946 | 946 | zWarning = "binary data"; |
| 947 | 947 | } |
| 948 | 948 | zDisable = "\"binary-glob\" setting"; |
| 949 | 949 | zConvert = ""; /* We cannot convert binary files. */ |
| 950 | 950 | }else if( fHasCrLf && fUnicode ){ |
| 951 | - if ( crnlOk && encodingOk ){ | |
| 951 | + if( crnlOk && encodingOk ){ | |
| 952 | 952 | return 0; /* We don't want CR/NL and Unicode warnings for this file. */ |
| 953 | 953 | } |
| 954 | 954 | zWarning = "CR/NL line endings and Unicode"; |
| 955 | 955 | zDisable = "\"crnl-glob\" and \"encoding-glob\" settings"; |
| 956 | 956 | }else if( fHasCrLf ){ |
| @@ -958,11 +958,11 @@ | ||
| 958 | 958 | return 0; /* We don't want CR/NL warnings for this file. */ |
| 959 | 959 | } |
| 960 | 960 | zWarning = "CR/NL line endings"; |
| 961 | 961 | zDisable = "\"crnl-glob\" setting"; |
| 962 | 962 | }else{ |
| 963 | - if ( encodingOk ){ | |
| 963 | + if( encodingOk ){ | |
| 964 | 964 | return 0; /* We don't want encoding warnings for this file. */ |
| 965 | 965 | } |
| 966 | 966 | zWarning = "Unicode"; |
| 967 | 967 | zDisable = "\"encoding-glob\" setting"; |
| 968 | 968 | #if !defined(_WIN32) && !defined(__CYGWIN__) |
| @@ -1223,11 +1223,11 @@ | ||
| 1223 | 1223 | ** After the following function call has returned, the Global.aCommitFile[] |
| 1224 | 1224 | ** array is allocated to contain the "id" field from the vfile table |
| 1225 | 1225 | ** for each file to be committed. Or, if aCommitFile is NULL, all files |
| 1226 | 1226 | ** should be committed. |
| 1227 | 1227 | */ |
| 1228 | - if ( select_commit_files() ){ | |
| 1228 | + if( select_commit_files() ){ | |
| 1229 | 1229 | blob_zero(&ans); |
| 1230 | 1230 | prompt_user("continue (y/N)? ", &ans); |
| 1231 | 1231 | cReply = blob_str(&ans)[0]; |
| 1232 | 1232 | if( cReply!='y' && cReply!='Y' ) fossil_exit(1);; |
| 1233 | 1233 | } |
| 1234 | 1234 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -938,19 +938,19 @@ | |
| 938 | |
| 939 | if( eType==0 ){ |
| 940 | if( binOk ){ |
| 941 | return 0; /* We don't want binary warnings for this file. */ |
| 942 | } |
| 943 | if( lookFlags&(LOOK_LENGTH) && !lookFlags&(LOOK_NUL) ){ |
| 944 | zWarning = "long lines"; |
| 945 | }else{ |
| 946 | zWarning = "binary data"; |
| 947 | } |
| 948 | zDisable = "\"binary-glob\" setting"; |
| 949 | zConvert = ""; /* We cannot convert binary files. */ |
| 950 | }else if( fHasCrLf && fUnicode ){ |
| 951 | if ( crnlOk && encodingOk ){ |
| 952 | return 0; /* We don't want CR/NL and Unicode warnings for this file. */ |
| 953 | } |
| 954 | zWarning = "CR/NL line endings and Unicode"; |
| 955 | zDisable = "\"crnl-glob\" and \"encoding-glob\" settings"; |
| 956 | }else if( fHasCrLf ){ |
| @@ -958,11 +958,11 @@ | |
| 958 | return 0; /* We don't want CR/NL warnings for this file. */ |
| 959 | } |
| 960 | zWarning = "CR/NL line endings"; |
| 961 | zDisable = "\"crnl-glob\" setting"; |
| 962 | }else{ |
| 963 | if ( encodingOk ){ |
| 964 | return 0; /* We don't want encoding warnings for this file. */ |
| 965 | } |
| 966 | zWarning = "Unicode"; |
| 967 | zDisable = "\"encoding-glob\" setting"; |
| 968 | #if !defined(_WIN32) && !defined(__CYGWIN__) |
| @@ -1223,11 +1223,11 @@ | |
| 1223 | ** After the following function call has returned, the Global.aCommitFile[] |
| 1224 | ** array is allocated to contain the "id" field from the vfile table |
| 1225 | ** for each file to be committed. Or, if aCommitFile is NULL, all files |
| 1226 | ** should be committed. |
| 1227 | */ |
| 1228 | if ( select_commit_files() ){ |
| 1229 | blob_zero(&ans); |
| 1230 | prompt_user("continue (y/N)? ", &ans); |
| 1231 | cReply = blob_str(&ans)[0]; |
| 1232 | if( cReply!='y' && cReply!='Y' ) fossil_exit(1);; |
| 1233 | } |
| 1234 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -938,19 +938,19 @@ | |
| 938 | |
| 939 | if( eType==0 ){ |
| 940 | if( binOk ){ |
| 941 | return 0; /* We don't want binary warnings for this file. */ |
| 942 | } |
| 943 | if( (lookFlags&LOOK_LENGTH) && !(lookFlags&LOOK_NUL) ){ |
| 944 | zWarning = "long lines"; |
| 945 | }else{ |
| 946 | zWarning = "binary data"; |
| 947 | } |
| 948 | zDisable = "\"binary-glob\" setting"; |
| 949 | zConvert = ""; /* We cannot convert binary files. */ |
| 950 | }else if( fHasCrLf && fUnicode ){ |
| 951 | if( crnlOk && encodingOk ){ |
| 952 | return 0; /* We don't want CR/NL and Unicode warnings for this file. */ |
| 953 | } |
| 954 | zWarning = "CR/NL line endings and Unicode"; |
| 955 | zDisable = "\"crnl-glob\" and \"encoding-glob\" settings"; |
| 956 | }else if( fHasCrLf ){ |
| @@ -958,11 +958,11 @@ | |
| 958 | return 0; /* We don't want CR/NL warnings for this file. */ |
| 959 | } |
| 960 | zWarning = "CR/NL line endings"; |
| 961 | zDisable = "\"crnl-glob\" setting"; |
| 962 | }else{ |
| 963 | if( encodingOk ){ |
| 964 | return 0; /* We don't want encoding warnings for this file. */ |
| 965 | } |
| 966 | zWarning = "Unicode"; |
| 967 | zDisable = "\"encoding-glob\" setting"; |
| 968 | #if !defined(_WIN32) && !defined(__CYGWIN__) |
| @@ -1223,11 +1223,11 @@ | |
| 1223 | ** After the following function call has returned, the Global.aCommitFile[] |
| 1224 | ** array is allocated to contain the "id" field from the vfile table |
| 1225 | ** for each file to be committed. Or, if aCommitFile is NULL, all files |
| 1226 | ** should be committed. |
| 1227 | */ |
| 1228 | if( select_commit_files() ){ |
| 1229 | blob_zero(&ans); |
| 1230 | prompt_user("continue (y/N)? ", &ans); |
| 1231 | cReply = blob_str(&ans)[0]; |
| 1232 | if( cReply!='y' && cReply!='Y' ) fossil_exit(1);; |
| 1233 | } |
| 1234 |
M
src/db.c
+2
-2
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -769,15 +769,15 @@ | ||
| 769 | 769 | ){ |
| 770 | 770 | if( !g.db ){ |
| 771 | 771 | assert( g.zMainDbType==0 ); |
| 772 | 772 | g.db = db_open(zDbName); |
| 773 | 773 | g.zMainDbType = zLabel; |
| 774 | - if ( pWasAttached ) *pWasAttached = 0; | |
| 774 | + if( pWasAttached ) *pWasAttached = 0; | |
| 775 | 775 | }else{ |
| 776 | 776 | assert( g.zMainDbType!=0 ); |
| 777 | 777 | db_attach(zDbName, zLabel); |
| 778 | - if ( pWasAttached ) *pWasAttached = 1; | |
| 778 | + if( pWasAttached ) *pWasAttached = 1; | |
| 779 | 779 | } |
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | /* |
| 783 | 783 | ** Open the user database in "~/.fossil". Create the database anew if |
| 784 | 784 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -769,15 +769,15 @@ | |
| 769 | ){ |
| 770 | if( !g.db ){ |
| 771 | assert( g.zMainDbType==0 ); |
| 772 | g.db = db_open(zDbName); |
| 773 | g.zMainDbType = zLabel; |
| 774 | if ( pWasAttached ) *pWasAttached = 0; |
| 775 | }else{ |
| 776 | assert( g.zMainDbType!=0 ); |
| 777 | db_attach(zDbName, zLabel); |
| 778 | if ( pWasAttached ) *pWasAttached = 1; |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | /* |
| 783 | ** Open the user database in "~/.fossil". Create the database anew if |
| 784 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -769,15 +769,15 @@ | |
| 769 | ){ |
| 770 | if( !g.db ){ |
| 771 | assert( g.zMainDbType==0 ); |
| 772 | g.db = db_open(zDbName); |
| 773 | g.zMainDbType = zLabel; |
| 774 | if( pWasAttached ) *pWasAttached = 0; |
| 775 | }else{ |
| 776 | assert( g.zMainDbType!=0 ); |
| 777 | db_attach(zDbName, zLabel); |
| 778 | if( pWasAttached ) *pWasAttached = 1; |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | /* |
| 783 | ** Open the user database in "~/.fossil". Create the database anew if |
| 784 |
+9
-9
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -337,11 +337,11 @@ | ||
| 337 | 337 | if( pFlags ) *pFlags = LOOK_NONE; |
| 338 | 338 | if( n==0 ) return result; /* Empty file -> text */ |
| 339 | 339 | if( n%sizeof(WCHAR_T) ){ |
| 340 | 340 | if( pFlags ) *pFlags |= LOOK_ODD; |
| 341 | 341 | result = 0; /* Odd number of bytes -> binary (UTF-8?) */ |
| 342 | - if ( n<sizeof(WCHAR_T) ) return result; /* One byte -> binary (UTF-8?) */ | |
| 342 | + if( n<sizeof(WCHAR_T) ) return result; /* One byte -> binary (UTF-8?) */ | |
| 343 | 343 | } |
| 344 | 344 | c = *z; |
| 345 | 345 | if( c==0 ){ |
| 346 | 346 | if( pFlags ) *pFlags |= LOOK_NUL; |
| 347 | 347 | result = 0; /* NUL character in a file -> binary */ |
| @@ -348,11 +348,11 @@ | ||
| 348 | 348 | } |
| 349 | 349 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 350 | 350 | if( !j && pFlags ) *pFlags |= LOOK_LONE_LF; |
| 351 | 351 | while( 1 ){ |
| 352 | 352 | int c2 = c; |
| 353 | - if ( n<sizeof(WCHAR_T) ) break; | |
| 353 | + if( n<sizeof(WCHAR_T) ) break; | |
| 354 | 354 | n -= sizeof(WCHAR_T); |
| 355 | 355 | c = *++z; ++j; |
| 356 | 356 | if( c==0 ){ |
| 357 | 357 | if( pFlags ) *pFlags |= LOOK_NUL; |
| 358 | 358 | result = 0; /* NUL character in a file -> binary */ |
| @@ -576,11 +576,11 @@ | ||
| 576 | 576 | a = xa; |
| 577 | 577 | b = xb; |
| 578 | 578 | continue; |
| 579 | 579 | } |
| 580 | 580 | } |
| 581 | - | |
| 581 | + | |
| 582 | 582 | /* For the current block comprising nr triples, figure out |
| 583 | 583 | ** how many lines of A and B are to be displayed |
| 584 | 584 | */ |
| 585 | 585 | if( R[r]>nContext ){ |
| 586 | 586 | na = nb = nContext; |
| @@ -1268,11 +1268,11 @@ | ||
| 1268 | 1268 | ** Then this is probably an alignment that will be difficult for humans |
| 1269 | 1269 | ** to read. So instead, just show all of the right side inserted followed |
| 1270 | 1270 | ** by all of the left side deleted. |
| 1271 | 1271 | ** |
| 1272 | 1272 | ** The coefficients for conditions (1) and (2) above are determined by |
| 1273 | - ** experimentation. | |
| 1273 | + ** experimentation. | |
| 1274 | 1274 | */ |
| 1275 | 1275 | mxLen = nLeft>nRight ? nLeft : nRight; |
| 1276 | 1276 | if( i*4>mxLen*5 && (nMatch==0 || iMatch/nMatch>15) ){ |
| 1277 | 1277 | memset(aM, 4, mnLen); |
| 1278 | 1278 | if( nLeft>mnLen ) memset(aM+mnLen, 1, nLeft-mnLen); |
| @@ -1505,11 +1505,11 @@ | ||
| 1505 | 1505 | ma--; |
| 1506 | 1506 | mb--; |
| 1507 | 1507 | a++; |
| 1508 | 1508 | b++; |
| 1509 | 1509 | } |
| 1510 | - | |
| 1510 | + | |
| 1511 | 1511 | } |
| 1512 | 1512 | fossil_free(alignment); |
| 1513 | 1513 | if( i<nr-1 ){ |
| 1514 | 1514 | m = R[r+i*3+3]; |
| 1515 | 1515 | for(j=0; j<m; j++){ |
| @@ -2297,11 +2297,11 @@ | ||
| 2297 | 2297 | if( !content_get(rid, &toAnnotate) ){ |
| 2298 | 2298 | fossil_panic("unable to retrieve content of artifact #%d", rid); |
| 2299 | 2299 | } |
| 2300 | 2300 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2301 | 2301 | annotation_start(p, &toAnnotate); |
| 2302 | - | |
| 2302 | + | |
| 2303 | 2303 | db_prepare(&q, |
| 2304 | 2304 | "SELECT (SELECT uuid FROM blob WHERE rid=mlink.%s)," |
| 2305 | 2305 | " date(event.mtime)," |
| 2306 | 2306 | " coalesce(event.euser,event.user)," |
| 2307 | 2307 | " mlink.pid" |
| @@ -2309,11 +2309,11 @@ | ||
| 2309 | 2309 | " WHERE mlink.fid=:rid" |
| 2310 | 2310 | " AND event.objid=mlink.mid" |
| 2311 | 2311 | " ORDER BY event.mtime", |
| 2312 | 2312 | (annFlags & ANN_FILE_VERS)!=0 ? "fid" : "mid" |
| 2313 | 2313 | ); |
| 2314 | - | |
| 2314 | + | |
| 2315 | 2315 | db_bind_int(&q, ":rid", rid); |
| 2316 | 2316 | if( iLimit==0 ) iLimit = 1000000000; |
| 2317 | 2317 | while( rid && iLimit>cnt && db_step(&q)==SQLITE_ROW ){ |
| 2318 | 2318 | const char *zUuid = db_column_text(&q, 0); |
| 2319 | 2319 | const char *zDate = db_column_text(&q, 1); |
| @@ -2434,11 +2434,11 @@ | ||
| 2434 | 2434 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2435 | 2435 | iLimit = atoi(zLimit); |
| 2436 | 2436 | showLog = find_option("log",0,0)!=0; |
| 2437 | 2437 | fileVers = find_option("filevers",0,0)!=0; |
| 2438 | 2438 | db_must_be_within_tree(); |
| 2439 | - if (g.argc<3) { | |
| 2439 | + if( g.argc<3 ) { | |
| 2440 | 2440 | usage("FILENAME"); |
| 2441 | 2441 | } |
| 2442 | 2442 | file_tree_name(g.argv[2], &treename, 1); |
| 2443 | 2443 | zFilename = blob_str(&treename); |
| 2444 | 2444 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| @@ -2448,11 +2448,11 @@ | ||
| 2448 | 2448 | fid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFilename); |
| 2449 | 2449 | if( fid==0 ){ |
| 2450 | 2450 | fossil_fatal("not part of current checkout: %s", zFilename); |
| 2451 | 2451 | } |
| 2452 | 2452 | cid = db_lget_int("checkout", 0); |
| 2453 | - if (cid == 0){ | |
| 2453 | + if( cid == 0 ){ | |
| 2454 | 2454 | fossil_fatal("Not in a checkout"); |
| 2455 | 2455 | } |
| 2456 | 2456 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2457 | 2457 | compute_direct_ancestors(cid, iLimit); |
| 2458 | 2458 | mid = db_int(0, "SELECT mlink.mid FROM mlink, ancestor " |
| 2459 | 2459 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -337,11 +337,11 @@ | |
| 337 | if( pFlags ) *pFlags = LOOK_NONE; |
| 338 | if( n==0 ) return result; /* Empty file -> text */ |
| 339 | if( n%sizeof(WCHAR_T) ){ |
| 340 | if( pFlags ) *pFlags |= LOOK_ODD; |
| 341 | result = 0; /* Odd number of bytes -> binary (UTF-8?) */ |
| 342 | if ( n<sizeof(WCHAR_T) ) return result; /* One byte -> binary (UTF-8?) */ |
| 343 | } |
| 344 | c = *z; |
| 345 | if( c==0 ){ |
| 346 | if( pFlags ) *pFlags |= LOOK_NUL; |
| 347 | result = 0; /* NUL character in a file -> binary */ |
| @@ -348,11 +348,11 @@ | |
| 348 | } |
| 349 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 350 | if( !j && pFlags ) *pFlags |= LOOK_LONE_LF; |
| 351 | while( 1 ){ |
| 352 | int c2 = c; |
| 353 | if ( n<sizeof(WCHAR_T) ) break; |
| 354 | n -= sizeof(WCHAR_T); |
| 355 | c = *++z; ++j; |
| 356 | if( c==0 ){ |
| 357 | if( pFlags ) *pFlags |= LOOK_NUL; |
| 358 | result = 0; /* NUL character in a file -> binary */ |
| @@ -576,11 +576,11 @@ | |
| 576 | a = xa; |
| 577 | b = xb; |
| 578 | continue; |
| 579 | } |
| 580 | } |
| 581 | |
| 582 | /* For the current block comprising nr triples, figure out |
| 583 | ** how many lines of A and B are to be displayed |
| 584 | */ |
| 585 | if( R[r]>nContext ){ |
| 586 | na = nb = nContext; |
| @@ -1268,11 +1268,11 @@ | |
| 1268 | ** Then this is probably an alignment that will be difficult for humans |
| 1269 | ** to read. So instead, just show all of the right side inserted followed |
| 1270 | ** by all of the left side deleted. |
| 1271 | ** |
| 1272 | ** The coefficients for conditions (1) and (2) above are determined by |
| 1273 | ** experimentation. |
| 1274 | */ |
| 1275 | mxLen = nLeft>nRight ? nLeft : nRight; |
| 1276 | if( i*4>mxLen*5 && (nMatch==0 || iMatch/nMatch>15) ){ |
| 1277 | memset(aM, 4, mnLen); |
| 1278 | if( nLeft>mnLen ) memset(aM+mnLen, 1, nLeft-mnLen); |
| @@ -1505,11 +1505,11 @@ | |
| 1505 | ma--; |
| 1506 | mb--; |
| 1507 | a++; |
| 1508 | b++; |
| 1509 | } |
| 1510 | |
| 1511 | } |
| 1512 | fossil_free(alignment); |
| 1513 | if( i<nr-1 ){ |
| 1514 | m = R[r+i*3+3]; |
| 1515 | for(j=0; j<m; j++){ |
| @@ -2297,11 +2297,11 @@ | |
| 2297 | if( !content_get(rid, &toAnnotate) ){ |
| 2298 | fossil_panic("unable to retrieve content of artifact #%d", rid); |
| 2299 | } |
| 2300 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2301 | annotation_start(p, &toAnnotate); |
| 2302 | |
| 2303 | db_prepare(&q, |
| 2304 | "SELECT (SELECT uuid FROM blob WHERE rid=mlink.%s)," |
| 2305 | " date(event.mtime)," |
| 2306 | " coalesce(event.euser,event.user)," |
| 2307 | " mlink.pid" |
| @@ -2309,11 +2309,11 @@ | |
| 2309 | " WHERE mlink.fid=:rid" |
| 2310 | " AND event.objid=mlink.mid" |
| 2311 | " ORDER BY event.mtime", |
| 2312 | (annFlags & ANN_FILE_VERS)!=0 ? "fid" : "mid" |
| 2313 | ); |
| 2314 | |
| 2315 | db_bind_int(&q, ":rid", rid); |
| 2316 | if( iLimit==0 ) iLimit = 1000000000; |
| 2317 | while( rid && iLimit>cnt && db_step(&q)==SQLITE_ROW ){ |
| 2318 | const char *zUuid = db_column_text(&q, 0); |
| 2319 | const char *zDate = db_column_text(&q, 1); |
| @@ -2434,11 +2434,11 @@ | |
| 2434 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2435 | iLimit = atoi(zLimit); |
| 2436 | showLog = find_option("log",0,0)!=0; |
| 2437 | fileVers = find_option("filevers",0,0)!=0; |
| 2438 | db_must_be_within_tree(); |
| 2439 | if (g.argc<3) { |
| 2440 | usage("FILENAME"); |
| 2441 | } |
| 2442 | file_tree_name(g.argv[2], &treename, 1); |
| 2443 | zFilename = blob_str(&treename); |
| 2444 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| @@ -2448,11 +2448,11 @@ | |
| 2448 | fid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFilename); |
| 2449 | if( fid==0 ){ |
| 2450 | fossil_fatal("not part of current checkout: %s", zFilename); |
| 2451 | } |
| 2452 | cid = db_lget_int("checkout", 0); |
| 2453 | if (cid == 0){ |
| 2454 | fossil_fatal("Not in a checkout"); |
| 2455 | } |
| 2456 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2457 | compute_direct_ancestors(cid, iLimit); |
| 2458 | mid = db_int(0, "SELECT mlink.mid FROM mlink, ancestor " |
| 2459 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -337,11 +337,11 @@ | |
| 337 | if( pFlags ) *pFlags = LOOK_NONE; |
| 338 | if( n==0 ) return result; /* Empty file -> text */ |
| 339 | if( n%sizeof(WCHAR_T) ){ |
| 340 | if( pFlags ) *pFlags |= LOOK_ODD; |
| 341 | result = 0; /* Odd number of bytes -> binary (UTF-8?) */ |
| 342 | if( n<sizeof(WCHAR_T) ) return result; /* One byte -> binary (UTF-8?) */ |
| 343 | } |
| 344 | c = *z; |
| 345 | if( c==0 ){ |
| 346 | if( pFlags ) *pFlags |= LOOK_NUL; |
| 347 | result = 0; /* NUL character in a file -> binary */ |
| @@ -348,11 +348,11 @@ | |
| 348 | } |
| 349 | j = ((c!=UTF16BE_LF) && (c!=UTF16LE_LF)); |
| 350 | if( !j && pFlags ) *pFlags |= LOOK_LONE_LF; |
| 351 | while( 1 ){ |
| 352 | int c2 = c; |
| 353 | if( n<sizeof(WCHAR_T) ) break; |
| 354 | n -= sizeof(WCHAR_T); |
| 355 | c = *++z; ++j; |
| 356 | if( c==0 ){ |
| 357 | if( pFlags ) *pFlags |= LOOK_NUL; |
| 358 | result = 0; /* NUL character in a file -> binary */ |
| @@ -576,11 +576,11 @@ | |
| 576 | a = xa; |
| 577 | b = xb; |
| 578 | continue; |
| 579 | } |
| 580 | } |
| 581 | |
| 582 | /* For the current block comprising nr triples, figure out |
| 583 | ** how many lines of A and B are to be displayed |
| 584 | */ |
| 585 | if( R[r]>nContext ){ |
| 586 | na = nb = nContext; |
| @@ -1268,11 +1268,11 @@ | |
| 1268 | ** Then this is probably an alignment that will be difficult for humans |
| 1269 | ** to read. So instead, just show all of the right side inserted followed |
| 1270 | ** by all of the left side deleted. |
| 1271 | ** |
| 1272 | ** The coefficients for conditions (1) and (2) above are determined by |
| 1273 | ** experimentation. |
| 1274 | */ |
| 1275 | mxLen = nLeft>nRight ? nLeft : nRight; |
| 1276 | if( i*4>mxLen*5 && (nMatch==0 || iMatch/nMatch>15) ){ |
| 1277 | memset(aM, 4, mnLen); |
| 1278 | if( nLeft>mnLen ) memset(aM+mnLen, 1, nLeft-mnLen); |
| @@ -1505,11 +1505,11 @@ | |
| 1505 | ma--; |
| 1506 | mb--; |
| 1507 | a++; |
| 1508 | b++; |
| 1509 | } |
| 1510 | |
| 1511 | } |
| 1512 | fossil_free(alignment); |
| 1513 | if( i<nr-1 ){ |
| 1514 | m = R[r+i*3+3]; |
| 1515 | for(j=0; j<m; j++){ |
| @@ -2297,11 +2297,11 @@ | |
| 2297 | if( !content_get(rid, &toAnnotate) ){ |
| 2298 | fossil_panic("unable to retrieve content of artifact #%d", rid); |
| 2299 | } |
| 2300 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2301 | annotation_start(p, &toAnnotate); |
| 2302 | |
| 2303 | db_prepare(&q, |
| 2304 | "SELECT (SELECT uuid FROM blob WHERE rid=mlink.%s)," |
| 2305 | " date(event.mtime)," |
| 2306 | " coalesce(event.euser,event.user)," |
| 2307 | " mlink.pid" |
| @@ -2309,11 +2309,11 @@ | |
| 2309 | " WHERE mlink.fid=:rid" |
| 2310 | " AND event.objid=mlink.mid" |
| 2311 | " ORDER BY event.mtime", |
| 2312 | (annFlags & ANN_FILE_VERS)!=0 ? "fid" : "mid" |
| 2313 | ); |
| 2314 | |
| 2315 | db_bind_int(&q, ":rid", rid); |
| 2316 | if( iLimit==0 ) iLimit = 1000000000; |
| 2317 | while( rid && iLimit>cnt && db_step(&q)==SQLITE_ROW ){ |
| 2318 | const char *zUuid = db_column_text(&q, 0); |
| 2319 | const char *zDate = db_column_text(&q, 1); |
| @@ -2434,11 +2434,11 @@ | |
| 2434 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2435 | iLimit = atoi(zLimit); |
| 2436 | showLog = find_option("log",0,0)!=0; |
| 2437 | fileVers = find_option("filevers",0,0)!=0; |
| 2438 | db_must_be_within_tree(); |
| 2439 | if( g.argc<3 ) { |
| 2440 | usage("FILENAME"); |
| 2441 | } |
| 2442 | file_tree_name(g.argv[2], &treename, 1); |
| 2443 | zFilename = blob_str(&treename); |
| 2444 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| @@ -2448,11 +2448,11 @@ | |
| 2448 | fid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFilename); |
| 2449 | if( fid==0 ){ |
| 2450 | fossil_fatal("not part of current checkout: %s", zFilename); |
| 2451 | } |
| 2452 | cid = db_lget_int("checkout", 0); |
| 2453 | if( cid == 0 ){ |
| 2454 | fossil_fatal("Not in a checkout"); |
| 2455 | } |
| 2456 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2457 | compute_direct_ancestors(cid, iLimit); |
| 2458 | mid = db_int(0, "SELECT mlink.mid FROM mlink, ancestor " |
| 2459 |
+8
-8
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -20,11 +20,11 @@ | ||
| 20 | 20 | #include "config.h" |
| 21 | 21 | #include "finfo.h" |
| 22 | 22 | |
| 23 | 23 | /* |
| 24 | 24 | ** COMMAND: finfo |
| 25 | -** | |
| 25 | +** | |
| 26 | 26 | ** Usage: %fossil finfo ?OPTIONS? FILENAME |
| 27 | 27 | ** |
| 28 | 28 | ** Print the complete change history for a single file going backwards |
| 29 | 29 | ** in time. The default mode is -l. |
| 30 | 30 | ** |
| @@ -55,11 +55,11 @@ | ||
| 55 | 55 | ** See also: artifact, cat, descendants, info, leaves |
| 56 | 56 | */ |
| 57 | 57 | void finfo_cmd(void){ |
| 58 | 58 | capture_case_sensitive_option(); |
| 59 | 59 | db_must_be_within_tree(); |
| 60 | - if (find_option("status","s",0)) { | |
| 60 | + if( find_option("status","s",0) ){ | |
| 61 | 61 | Stmt q; |
| 62 | 62 | Blob line; |
| 63 | 63 | Blob fname; |
| 64 | 64 | int vid; |
| 65 | 65 | |
| @@ -73,11 +73,11 @@ | ||
| 73 | 73 | db_prepare(&q, |
| 74 | 74 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" |
| 75 | 75 | " FROM vfile WHERE vfile.pathname=%B %s", |
| 76 | 76 | &fname, filename_collation()); |
| 77 | 77 | blob_zero(&line); |
| 78 | - if ( db_step(&q)==SQLITE_ROW ) { | |
| 78 | + if( db_step(&q)==SQLITE_ROW ) { | |
| 79 | 79 | Blob uuid; |
| 80 | 80 | int isDeleted = db_column_int(&q, 1); |
| 81 | 81 | int isNew = db_column_int(&q,2) == 0; |
| 82 | 82 | int chnged = db_column_int(&q,3); |
| 83 | 83 | int renamed = db_column_int(&q,4); |
| @@ -247,11 +247,11 @@ | ||
| 247 | 247 | |
| 248 | 248 | /* |
| 249 | 249 | ** WEBPAGE: finfo |
| 250 | 250 | ** URL: /finfo?name=FILENAME |
| 251 | 251 | ** |
| 252 | -** Show the change history for a single file. | |
| 252 | +** Show the change history for a single file. | |
| 253 | 253 | ** |
| 254 | 254 | ** Additional query parameters: |
| 255 | 255 | ** |
| 256 | 256 | ** a=DATE Only show changes after DATE |
| 257 | 257 | ** b=DATE Only show changes before DATE |
| @@ -265,11 +265,11 @@ | ||
| 265 | 265 | const char *zFilename; |
| 266 | 266 | char zPrevDate[20]; |
| 267 | 267 | const char *zA; |
| 268 | 268 | const char *zB; |
| 269 | 269 | int n; |
| 270 | - | |
| 270 | + | |
| 271 | 271 | Blob title; |
| 272 | 272 | Blob sql; |
| 273 | 273 | HQuery url; |
| 274 | 274 | GraphContext *pGraph; |
| 275 | 275 | int brBg = P("brbg")!=0; |
| @@ -288,11 +288,11 @@ | ||
| 288 | 288 | |
| 289 | 289 | zPrevDate[0] = 0; |
| 290 | 290 | zFilename = PD("name",""); |
| 291 | 291 | url_add_parameter(&url, "name", zFilename); |
| 292 | 292 | blob_zero(&sql); |
| 293 | - blob_appendf(&sql, | |
| 293 | + blob_appendf(&sql, | |
| 294 | 294 | "SELECT" |
| 295 | 295 | " datetime(event.mtime,'localtime')," /* Date of change */ |
| 296 | 296 | " coalesce(event.ecomment, event.comment)," /* Check-in comment */ |
| 297 | 297 | " coalesce(event.euser, event.user)," /* User who made chng */ |
| 298 | 298 | " mlink.pid," /* Parent rid */ |
| @@ -403,11 +403,11 @@ | ||
| 403 | 403 | @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a> |
| 404 | 404 | } |
| 405 | 405 | @ %z(href("%R/artifact/%s",zUuid))[%S(zUuid)]</a> part of check-in |
| 406 | 406 | }else{ |
| 407 | 407 | char *zNewName; |
| 408 | - zNewName = db_text(0, | |
| 408 | + zNewName = db_text(0, | |
| 409 | 409 | "SELECT name FROM filename WHERE fnid = " |
| 410 | 410 | " (SELECT fnid FROM mlink" |
| 411 | 411 | " WHERE mid=%d" |
| 412 | 412 | " AND pfnid IN (SELECT fnid FROM filename WHERE name=%Q %s))", |
| 413 | 413 | fmid, zFilename, filename_collation()); |
| @@ -418,11 +418,11 @@ | ||
| 418 | 418 | }else{ |
| 419 | 419 | @ <b>Deleted</b> by check-in |
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | hyperlink_to_uuid(zShortCkin); |
| 423 | - @ %w(zCom) (user: | |
| 423 | + @ %w(zCom) (user: | |
| 424 | 424 | hyperlink_to_user(zUser, zDate, ""); |
| 425 | 425 | @ branch: %h(zBr)) |
| 426 | 426 | if( g.perm.Hyperlink && zUuid ){ |
| 427 | 427 | const char *z = zFilename; |
| 428 | 428 | if( fpid ){ |
| 429 | 429 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -20,11 +20,11 @@ | |
| 20 | #include "config.h" |
| 21 | #include "finfo.h" |
| 22 | |
| 23 | /* |
| 24 | ** COMMAND: finfo |
| 25 | ** |
| 26 | ** Usage: %fossil finfo ?OPTIONS? FILENAME |
| 27 | ** |
| 28 | ** Print the complete change history for a single file going backwards |
| 29 | ** in time. The default mode is -l. |
| 30 | ** |
| @@ -55,11 +55,11 @@ | |
| 55 | ** See also: artifact, cat, descendants, info, leaves |
| 56 | */ |
| 57 | void finfo_cmd(void){ |
| 58 | capture_case_sensitive_option(); |
| 59 | db_must_be_within_tree(); |
| 60 | if (find_option("status","s",0)) { |
| 61 | Stmt q; |
| 62 | Blob line; |
| 63 | Blob fname; |
| 64 | int vid; |
| 65 | |
| @@ -73,11 +73,11 @@ | |
| 73 | db_prepare(&q, |
| 74 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" |
| 75 | " FROM vfile WHERE vfile.pathname=%B %s", |
| 76 | &fname, filename_collation()); |
| 77 | blob_zero(&line); |
| 78 | if ( db_step(&q)==SQLITE_ROW ) { |
| 79 | Blob uuid; |
| 80 | int isDeleted = db_column_int(&q, 1); |
| 81 | int isNew = db_column_int(&q,2) == 0; |
| 82 | int chnged = db_column_int(&q,3); |
| 83 | int renamed = db_column_int(&q,4); |
| @@ -247,11 +247,11 @@ | |
| 247 | |
| 248 | /* |
| 249 | ** WEBPAGE: finfo |
| 250 | ** URL: /finfo?name=FILENAME |
| 251 | ** |
| 252 | ** Show the change history for a single file. |
| 253 | ** |
| 254 | ** Additional query parameters: |
| 255 | ** |
| 256 | ** a=DATE Only show changes after DATE |
| 257 | ** b=DATE Only show changes before DATE |
| @@ -265,11 +265,11 @@ | |
| 265 | const char *zFilename; |
| 266 | char zPrevDate[20]; |
| 267 | const char *zA; |
| 268 | const char *zB; |
| 269 | int n; |
| 270 | |
| 271 | Blob title; |
| 272 | Blob sql; |
| 273 | HQuery url; |
| 274 | GraphContext *pGraph; |
| 275 | int brBg = P("brbg")!=0; |
| @@ -288,11 +288,11 @@ | |
| 288 | |
| 289 | zPrevDate[0] = 0; |
| 290 | zFilename = PD("name",""); |
| 291 | url_add_parameter(&url, "name", zFilename); |
| 292 | blob_zero(&sql); |
| 293 | blob_appendf(&sql, |
| 294 | "SELECT" |
| 295 | " datetime(event.mtime,'localtime')," /* Date of change */ |
| 296 | " coalesce(event.ecomment, event.comment)," /* Check-in comment */ |
| 297 | " coalesce(event.euser, event.user)," /* User who made chng */ |
| 298 | " mlink.pid," /* Parent rid */ |
| @@ -403,11 +403,11 @@ | |
| 403 | @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a> |
| 404 | } |
| 405 | @ %z(href("%R/artifact/%s",zUuid))[%S(zUuid)]</a> part of check-in |
| 406 | }else{ |
| 407 | char *zNewName; |
| 408 | zNewName = db_text(0, |
| 409 | "SELECT name FROM filename WHERE fnid = " |
| 410 | " (SELECT fnid FROM mlink" |
| 411 | " WHERE mid=%d" |
| 412 | " AND pfnid IN (SELECT fnid FROM filename WHERE name=%Q %s))", |
| 413 | fmid, zFilename, filename_collation()); |
| @@ -418,11 +418,11 @@ | |
| 418 | }else{ |
| 419 | @ <b>Deleted</b> by check-in |
| 420 | } |
| 421 | } |
| 422 | hyperlink_to_uuid(zShortCkin); |
| 423 | @ %w(zCom) (user: |
| 424 | hyperlink_to_user(zUser, zDate, ""); |
| 425 | @ branch: %h(zBr)) |
| 426 | if( g.perm.Hyperlink && zUuid ){ |
| 427 | const char *z = zFilename; |
| 428 | if( fpid ){ |
| 429 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -20,11 +20,11 @@ | |
| 20 | #include "config.h" |
| 21 | #include "finfo.h" |
| 22 | |
| 23 | /* |
| 24 | ** COMMAND: finfo |
| 25 | ** |
| 26 | ** Usage: %fossil finfo ?OPTIONS? FILENAME |
| 27 | ** |
| 28 | ** Print the complete change history for a single file going backwards |
| 29 | ** in time. The default mode is -l. |
| 30 | ** |
| @@ -55,11 +55,11 @@ | |
| 55 | ** See also: artifact, cat, descendants, info, leaves |
| 56 | */ |
| 57 | void finfo_cmd(void){ |
| 58 | capture_case_sensitive_option(); |
| 59 | db_must_be_within_tree(); |
| 60 | if( find_option("status","s",0) ){ |
| 61 | Stmt q; |
| 62 | Blob line; |
| 63 | Blob fname; |
| 64 | int vid; |
| 65 | |
| @@ -73,11 +73,11 @@ | |
| 73 | db_prepare(&q, |
| 74 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" |
| 75 | " FROM vfile WHERE vfile.pathname=%B %s", |
| 76 | &fname, filename_collation()); |
| 77 | blob_zero(&line); |
| 78 | if( db_step(&q)==SQLITE_ROW ) { |
| 79 | Blob uuid; |
| 80 | int isDeleted = db_column_int(&q, 1); |
| 81 | int isNew = db_column_int(&q,2) == 0; |
| 82 | int chnged = db_column_int(&q,3); |
| 83 | int renamed = db_column_int(&q,4); |
| @@ -247,11 +247,11 @@ | |
| 247 | |
| 248 | /* |
| 249 | ** WEBPAGE: finfo |
| 250 | ** URL: /finfo?name=FILENAME |
| 251 | ** |
| 252 | ** Show the change history for a single file. |
| 253 | ** |
| 254 | ** Additional query parameters: |
| 255 | ** |
| 256 | ** a=DATE Only show changes after DATE |
| 257 | ** b=DATE Only show changes before DATE |
| @@ -265,11 +265,11 @@ | |
| 265 | const char *zFilename; |
| 266 | char zPrevDate[20]; |
| 267 | const char *zA; |
| 268 | const char *zB; |
| 269 | int n; |
| 270 | |
| 271 | Blob title; |
| 272 | Blob sql; |
| 273 | HQuery url; |
| 274 | GraphContext *pGraph; |
| 275 | int brBg = P("brbg")!=0; |
| @@ -288,11 +288,11 @@ | |
| 288 | |
| 289 | zPrevDate[0] = 0; |
| 290 | zFilename = PD("name",""); |
| 291 | url_add_parameter(&url, "name", zFilename); |
| 292 | blob_zero(&sql); |
| 293 | blob_appendf(&sql, |
| 294 | "SELECT" |
| 295 | " datetime(event.mtime,'localtime')," /* Date of change */ |
| 296 | " coalesce(event.ecomment, event.comment)," /* Check-in comment */ |
| 297 | " coalesce(event.euser, event.user)," /* User who made chng */ |
| 298 | " mlink.pid," /* Parent rid */ |
| @@ -403,11 +403,11 @@ | |
| 403 | @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a> |
| 404 | } |
| 405 | @ %z(href("%R/artifact/%s",zUuid))[%S(zUuid)]</a> part of check-in |
| 406 | }else{ |
| 407 | char *zNewName; |
| 408 | zNewName = db_text(0, |
| 409 | "SELECT name FROM filename WHERE fnid = " |
| 410 | " (SELECT fnid FROM mlink" |
| 411 | " WHERE mid=%d" |
| 412 | " AND pfnid IN (SELECT fnid FROM filename WHERE name=%Q %s))", |
| 413 | fmid, zFilename, filename_collation()); |
| @@ -418,11 +418,11 @@ | |
| 418 | }else{ |
| 419 | @ <b>Deleted</b> by check-in |
| 420 | } |
| 421 | } |
| 422 | hyperlink_to_uuid(zShortCkin); |
| 423 | @ %w(zCom) (user: |
| 424 | hyperlink_to_user(zUser, zDate, ""); |
| 425 | @ branch: %h(zBr)) |
| 426 | if( g.perm.Hyperlink && zUuid ){ |
| 427 | const char *z = zFilename; |
| 428 | if( fpid ){ |
| 429 |
+2
-2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1731,11 +1731,11 @@ | ||
| 1731 | 1731 | @ <tr><th>User:</th><td> |
| 1732 | 1732 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 1733 | 1733 | @ </table> |
| 1734 | 1734 | free(zDate); |
| 1735 | 1735 | free(zTktTitle); |
| 1736 | - | |
| 1736 | + | |
| 1737 | 1737 | if( g.perm.ModTkt && modPending ){ |
| 1738 | 1738 | @ <div class="section">Moderation</div> |
| 1739 | 1739 | @ <blockquote> |
| 1740 | 1740 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 1741 | 1741 | @ <label><input type="radio" name="modaction" value="delete"> |
| @@ -1924,11 +1924,11 @@ | ||
| 1924 | 1924 | if( (i%8)==7 && i+1<nColor ){ |
| 1925 | 1925 | @ </tr><tr> |
| 1926 | 1926 | } |
| 1927 | 1927 | } |
| 1928 | 1928 | @ </tr><tr> |
| 1929 | - if (stdClrFound){ | |
| 1929 | + if( stdClrFound ){ | |
| 1930 | 1930 | @ <td colspan="6"> |
| 1931 | 1931 | @ <input type="radio" name="%s(zId)" value="%h(aColor[nColor].zColor)" /> |
| 1932 | 1932 | }else{ |
| 1933 | 1933 | @ <td style="background-color: %h(zDefaultColor);" colspan="6"> |
| 1934 | 1934 | @ <input type="radio" name="%s(zId)" value="%h(aColor[nColor].zColor)" |
| 1935 | 1935 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1731,11 +1731,11 @@ | |
| 1731 | @ <tr><th>User:</th><td> |
| 1732 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 1733 | @ </table> |
| 1734 | free(zDate); |
| 1735 | free(zTktTitle); |
| 1736 | |
| 1737 | if( g.perm.ModTkt && modPending ){ |
| 1738 | @ <div class="section">Moderation</div> |
| 1739 | @ <blockquote> |
| 1740 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 1741 | @ <label><input type="radio" name="modaction" value="delete"> |
| @@ -1924,11 +1924,11 @@ | |
| 1924 | if( (i%8)==7 && i+1<nColor ){ |
| 1925 | @ </tr><tr> |
| 1926 | } |
| 1927 | } |
| 1928 | @ </tr><tr> |
| 1929 | if (stdClrFound){ |
| 1930 | @ <td colspan="6"> |
| 1931 | @ <input type="radio" name="%s(zId)" value="%h(aColor[nColor].zColor)" /> |
| 1932 | }else{ |
| 1933 | @ <td style="background-color: %h(zDefaultColor);" colspan="6"> |
| 1934 | @ <input type="radio" name="%s(zId)" value="%h(aColor[nColor].zColor)" |
| 1935 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1731,11 +1731,11 @@ | |
| 1731 | @ <tr><th>User:</th><td> |
| 1732 | hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>"); |
| 1733 | @ </table> |
| 1734 | free(zDate); |
| 1735 | free(zTktTitle); |
| 1736 | |
| 1737 | if( g.perm.ModTkt && modPending ){ |
| 1738 | @ <div class="section">Moderation</div> |
| 1739 | @ <blockquote> |
| 1740 | @ <form method="POST" action="%R/tinfo/%s(zUuid)"> |
| 1741 | @ <label><input type="radio" name="modaction" value="delete"> |
| @@ -1924,11 +1924,11 @@ | |
| 1924 | if( (i%8)==7 && i+1<nColor ){ |
| 1925 | @ </tr><tr> |
| 1926 | } |
| 1927 | } |
| 1928 | @ </tr><tr> |
| 1929 | if( stdClrFound ){ |
| 1930 | @ <td colspan="6"> |
| 1931 | @ <input type="radio" name="%s(zId)" value="%h(aColor[nColor].zColor)" /> |
| 1932 | }else{ |
| 1933 | @ <td style="background-color: %h(zDefaultColor);" colspan="6"> |
| 1934 | @ <input type="radio" name="%s(zId)" value="%h(aColor[nColor].zColor)" |
| 1935 |
+5
-5
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -635,11 +635,11 @@ | ||
| 635 | 635 | const char *zReturn = 0; |
| 636 | 636 | assert( hasArg==0 || hasArg==1 ); |
| 637 | 637 | nLong = strlen(zLong); |
| 638 | 638 | for(i=1; i<g.argc; i++){ |
| 639 | 639 | char *z; |
| 640 | - if (i+hasArg >= g.argc) break; | |
| 640 | + if( i+hasArg >= g.argc ) break; | |
| 641 | 641 | z = g.argv[i]; |
| 642 | 642 | if( z[0]!='-' ) continue; |
| 643 | 643 | z++; |
| 644 | 644 | if( z[0]=='-' ){ |
| 645 | 645 | if( z[1]==0 ){ |
| @@ -1131,11 +1131,11 @@ | ||
| 1131 | 1131 | zRepo = zToFree = mprintf("%s%.*s.fossil",g.zRepositoryName,i,zPathInfo); |
| 1132 | 1132 | |
| 1133 | 1133 | /* To avoid mischief, make sure the repository basename contains no |
| 1134 | 1134 | ** characters other than alphanumerics, "/", "_", "-", and ".", and |
| 1135 | 1135 | ** that "-" never occurs immediately after a "/" and that "." is always |
| 1136 | - ** surrounded by two alphanumerics. Any character that does not | |
| 1136 | + ** surrounded by two alphanumerics. Any character that does not | |
| 1137 | 1137 | ** satisfy these constraints is converted into "_". |
| 1138 | 1138 | */ |
| 1139 | 1139 | szFile = 0; |
| 1140 | 1140 | for(j=strlen(g.zRepositoryName)+1, k=0; zRepo[j] && k<i-1; j++, k++){ |
| 1141 | 1141 | char c = zRepo[j]; |
| @@ -1591,11 +1591,11 @@ | ||
| 1591 | 1591 | const char *zHost; |
| 1592 | 1592 | const char *zAltBase; |
| 1593 | 1593 | const char *zFileGlob; |
| 1594 | 1594 | |
| 1595 | 1595 | /* The winhttp module passes the --files option as --files-urlenc with |
| 1596 | - ** the argument being URL encoded, to avoid wildcard expansion in the | |
| 1596 | + ** the argument being URL encoded, to avoid wildcard expansion in the | |
| 1597 | 1597 | ** shell. This option is for internal use and is undocumented. |
| 1598 | 1598 | */ |
| 1599 | 1599 | zFileGlob = find_option("files-urlenc",0,1); |
| 1600 | 1600 | if( zFileGlob ){ |
| 1601 | 1601 | char *z = mprintf("%s", zFileGlob); |
| @@ -1695,12 +1695,12 @@ | ||
| 1695 | 1695 | ** |
| 1696 | 1696 | ** The "ui" command automatically starts a web browser after initializing |
| 1697 | 1697 | ** the web server. The "ui" command also binds to 127.0.0.1 and so will |
| 1698 | 1698 | ** only process HTTP traffic from the local machine. |
| 1699 | 1699 | ** |
| 1700 | -** The REPOSITORY can be a directory (aka folder) that contains one or | |
| 1701 | -** more repositories with names ending in ".fossil". In this case, the | |
| 1700 | +** The REPOSITORY can be a directory (aka folder) that contains one or | |
| 1701 | +** more repositories with names ending in ".fossil". In this case, the | |
| 1702 | 1702 | ** a prefix of the URL pathname is used to search the directory for an |
| 1703 | 1703 | ** appropriate repository. To thwart mischief, the pathname in the URL must |
| 1704 | 1704 | ** contain only alphanumerics, "_", "/", "-", and ".", and no "-" may |
| 1705 | 1705 | ** occur after "/", and every "." must be surrounded on both sides by |
| 1706 | 1706 | ** alphanumerics. Any pathname that does not satisfy these constraints |
| 1707 | 1707 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -635,11 +635,11 @@ | |
| 635 | const char *zReturn = 0; |
| 636 | assert( hasArg==0 || hasArg==1 ); |
| 637 | nLong = strlen(zLong); |
| 638 | for(i=1; i<g.argc; i++){ |
| 639 | char *z; |
| 640 | if (i+hasArg >= g.argc) break; |
| 641 | z = g.argv[i]; |
| 642 | if( z[0]!='-' ) continue; |
| 643 | z++; |
| 644 | if( z[0]=='-' ){ |
| 645 | if( z[1]==0 ){ |
| @@ -1131,11 +1131,11 @@ | |
| 1131 | zRepo = zToFree = mprintf("%s%.*s.fossil",g.zRepositoryName,i,zPathInfo); |
| 1132 | |
| 1133 | /* To avoid mischief, make sure the repository basename contains no |
| 1134 | ** characters other than alphanumerics, "/", "_", "-", and ".", and |
| 1135 | ** that "-" never occurs immediately after a "/" and that "." is always |
| 1136 | ** surrounded by two alphanumerics. Any character that does not |
| 1137 | ** satisfy these constraints is converted into "_". |
| 1138 | */ |
| 1139 | szFile = 0; |
| 1140 | for(j=strlen(g.zRepositoryName)+1, k=0; zRepo[j] && k<i-1; j++, k++){ |
| 1141 | char c = zRepo[j]; |
| @@ -1591,11 +1591,11 @@ | |
| 1591 | const char *zHost; |
| 1592 | const char *zAltBase; |
| 1593 | const char *zFileGlob; |
| 1594 | |
| 1595 | /* The winhttp module passes the --files option as --files-urlenc with |
| 1596 | ** the argument being URL encoded, to avoid wildcard expansion in the |
| 1597 | ** shell. This option is for internal use and is undocumented. |
| 1598 | */ |
| 1599 | zFileGlob = find_option("files-urlenc",0,1); |
| 1600 | if( zFileGlob ){ |
| 1601 | char *z = mprintf("%s", zFileGlob); |
| @@ -1695,12 +1695,12 @@ | |
| 1695 | ** |
| 1696 | ** The "ui" command automatically starts a web browser after initializing |
| 1697 | ** the web server. The "ui" command also binds to 127.0.0.1 and so will |
| 1698 | ** only process HTTP traffic from the local machine. |
| 1699 | ** |
| 1700 | ** The REPOSITORY can be a directory (aka folder) that contains one or |
| 1701 | ** more repositories with names ending in ".fossil". In this case, the |
| 1702 | ** a prefix of the URL pathname is used to search the directory for an |
| 1703 | ** appropriate repository. To thwart mischief, the pathname in the URL must |
| 1704 | ** contain only alphanumerics, "_", "/", "-", and ".", and no "-" may |
| 1705 | ** occur after "/", and every "." must be surrounded on both sides by |
| 1706 | ** alphanumerics. Any pathname that does not satisfy these constraints |
| 1707 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -635,11 +635,11 @@ | |
| 635 | const char *zReturn = 0; |
| 636 | assert( hasArg==0 || hasArg==1 ); |
| 637 | nLong = strlen(zLong); |
| 638 | for(i=1; i<g.argc; i++){ |
| 639 | char *z; |
| 640 | if( i+hasArg >= g.argc ) break; |
| 641 | z = g.argv[i]; |
| 642 | if( z[0]!='-' ) continue; |
| 643 | z++; |
| 644 | if( z[0]=='-' ){ |
| 645 | if( z[1]==0 ){ |
| @@ -1131,11 +1131,11 @@ | |
| 1131 | zRepo = zToFree = mprintf("%s%.*s.fossil",g.zRepositoryName,i,zPathInfo); |
| 1132 | |
| 1133 | /* To avoid mischief, make sure the repository basename contains no |
| 1134 | ** characters other than alphanumerics, "/", "_", "-", and ".", and |
| 1135 | ** that "-" never occurs immediately after a "/" and that "." is always |
| 1136 | ** surrounded by two alphanumerics. Any character that does not |
| 1137 | ** satisfy these constraints is converted into "_". |
| 1138 | */ |
| 1139 | szFile = 0; |
| 1140 | for(j=strlen(g.zRepositoryName)+1, k=0; zRepo[j] && k<i-1; j++, k++){ |
| 1141 | char c = zRepo[j]; |
| @@ -1591,11 +1591,11 @@ | |
| 1591 | const char *zHost; |
| 1592 | const char *zAltBase; |
| 1593 | const char *zFileGlob; |
| 1594 | |
| 1595 | /* The winhttp module passes the --files option as --files-urlenc with |
| 1596 | ** the argument being URL encoded, to avoid wildcard expansion in the |
| 1597 | ** shell. This option is for internal use and is undocumented. |
| 1598 | */ |
| 1599 | zFileGlob = find_option("files-urlenc",0,1); |
| 1600 | if( zFileGlob ){ |
| 1601 | char *z = mprintf("%s", zFileGlob); |
| @@ -1695,12 +1695,12 @@ | |
| 1695 | ** |
| 1696 | ** The "ui" command automatically starts a web browser after initializing |
| 1697 | ** the web server. The "ui" command also binds to 127.0.0.1 and so will |
| 1698 | ** only process HTTP traffic from the local machine. |
| 1699 | ** |
| 1700 | ** The REPOSITORY can be a directory (aka folder) that contains one or |
| 1701 | ** more repositories with names ending in ".fossil". In this case, the |
| 1702 | ** a prefix of the URL pathname is used to search the directory for an |
| 1703 | ** appropriate repository. To thwart mischief, the pathname in the URL must |
| 1704 | ** contain only alphanumerics, "_", "/", "-", and ".", and no "-" may |
| 1705 | ** occur after "/", and every "." must be surrounded on both sides by |
| 1706 | ** alphanumerics. Any pathname that does not satisfy these constraints |
| 1707 |
+19
-19
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -139,11 +139,11 @@ | ||
| 139 | 139 | @ <table class="usetupLayoutTable"> |
| 140 | 140 | @ <tr><td class="usetupColumnLayout"> |
| 141 | 141 | @ <span class="note">Users:</span> |
| 142 | 142 | @ <table class="usetupUserList"> |
| 143 | 143 | prevLevel = 0; |
| 144 | - db_prepare(&s, | |
| 144 | + db_prepare(&s, | |
| 145 | 145 | "SELECT uid, login, cap, info, 1 FROM user" |
| 146 | 146 | " WHERE login IN ('anonymous','nobody','developer','reader') " |
| 147 | 147 | " UNION ALL " |
| 148 | 148 | "SELECT uid, login, cap, info, 2 FROM user" |
| 149 | 149 | " WHERE login NOT IN ('anonymous','nobody','developer','reader') " |
| @@ -250,11 +250,11 @@ | ||
| 250 | 250 | @ <td><i>Write-Tkt:</i> Edit tickets</td></tr> |
| 251 | 251 | @ <tr><td valign="top"><b>x</b></td> |
| 252 | 252 | @ <td><i>Private:</i> Push and/or pull private branches</td></tr> |
| 253 | 253 | @ <tr><td valign="top"><b>z</b></td> |
| 254 | 254 | @ <td><i>Zip download:</i> Download a baseline via the |
| 255 | - @ <tt>/zip</tt> URL even without | |
| 255 | + @ <tt>/zip</tt> URL even without | |
| 256 | 256 | @ check<span class="capability">o</span>ut |
| 257 | 257 | @ and <span class="capability">h</span>istory permissions</td></tr> |
| 258 | 258 | @ </table> |
| 259 | 259 | @ </li> |
| 260 | 260 | @ |
| @@ -357,11 +357,11 @@ | ||
| 357 | 357 | style_header("User Creation Error"); |
| 358 | 358 | @ <span class="loginError">Empty login not allowed.</span> |
| 359 | 359 | @ |
| 360 | 360 | @ <p><a href="setup_uedit?id=%d(uid)">[Bummer]</a></p> |
| 361 | 361 | style_footer(); |
| 362 | - return; | |
| 362 | + return; | |
| 363 | 363 | } |
| 364 | 364 | if( isValidPwString(zPw) ){ |
| 365 | 365 | zPw = sha1_shared_secret(zPw, zLogin, 0); |
| 366 | 366 | }else{ |
| 367 | 367 | zPw = db_text(0, "SELECT pw FROM user WHERE uid=%d", uid); |
| @@ -394,11 +394,11 @@ | ||
| 394 | 394 | " SELECT %Q WHERE NOT EXISTS(SELECT 1 FROM user WHERE login=%Q);", |
| 395 | 395 | zLogin, zLogin |
| 396 | 396 | ); |
| 397 | 397 | zOldLogin = zLogin; |
| 398 | 398 | } |
| 399 | - blob_appendf(&sql, | |
| 399 | + blob_appendf(&sql, | |
| 400 | 400 | "UPDATE user SET login=%Q," |
| 401 | 401 | " pw=coalesce(shared_secret(%Q,%Q," |
| 402 | 402 | "(SELECT value FROM config WHERE name='project-code')),pw)," |
| 403 | 403 | " info=%Q," |
| 404 | 404 | " cap=%Q," |
| @@ -643,11 +643,11 @@ | ||
| 643 | 643 | @ </p></li> |
| 644 | 644 | @ |
| 645 | 645 | @ <li><p> |
| 646 | 646 | @ The <span class="capability">Delete</span> privilege give the user the |
| 647 | 647 | @ ability to erase wiki, tickets, and attachments that have been added |
| 648 | - @ by anonymous users. This capability is intended for deletion of spam. | |
| 648 | + @ by anonymous users. This capability is intended for deletion of spam. | |
| 649 | 649 | @ The delete capability is only in effect for 24 hours after the item |
| 650 | 650 | @ is first posted. The <span class="usertype">Setup</span> user can |
| 651 | 651 | @ delete anything at any time. |
| 652 | 652 | @ </p></li> |
| 653 | 653 | @ |
| @@ -700,11 +700,11 @@ | ||
| 700 | 700 | @ </p></li> |
| 701 | 701 | @ |
| 702 | 702 | @ <li><p> |
| 703 | 703 | @ The <span class="capability">EMail</span> privilege allows the display of |
| 704 | 704 | @ sensitive information such as the email address of users and contact |
| 705 | - @ information on tickets. Recommended OFF for | |
| 705 | + @ information on tickets. Recommended OFF for | |
| 706 | 706 | @ <span class="usertype">anonymous</span> and for |
| 707 | 707 | @ <span class="usertype">nobody</span> but ON for |
| 708 | 708 | @ <span class="usertype">developer</span>. |
| 709 | 709 | @ </p></li> |
| 710 | 710 | @ |
| @@ -724,11 +724,11 @@ | ||
| 724 | 724 | @ <ul> |
| 725 | 725 | @ <li><p> |
| 726 | 726 | @ No login is required for user <span class="usertype">nobody</span>. The |
| 727 | 727 | @ capabilities of the <span class="usertype">nobody</span> user are |
| 728 | 728 | @ inherited by all users, regardless of whether or not they are logged in. |
| 729 | - @ To disable universal access to the repository, make sure no user named | |
| 729 | + @ To disable universal access to the repository, make sure no user named | |
| 730 | 730 | @ <span class="usertype">nobody</span> exists or that the |
| 731 | 731 | @ <span class="usertype">nobody</span> user has no capabilities |
| 732 | 732 | @ enabled. The password for <span class="usertype">nobody</span> is ignore. |
| 733 | 733 | @ To avoid problems with spiders overloading the server, it is recommended |
| 734 | 734 | @ that the <span class="capability">h</span> (Hyperlinks) capability be |
| @@ -749,13 +749,13 @@ | ||
| 749 | 749 | @ |
| 750 | 750 | @ <li><p> |
| 751 | 751 | @ The <span class="usertype">developer</span> user is intended as a template |
| 752 | 752 | @ for trusted users with check-in privileges. When adding new trusted users, |
| 753 | 753 | @ simply select the <span class="capability">developer</span> privilege to |
| 754 | - @ cause the new user to inherit all privileges of the | |
| 754 | + @ cause the new user to inherit all privileges of the | |
| 755 | 755 | @ <span class="usertype">developer</span> |
| 756 | - @ user. Similarly, the <span class="usertype">reader</span> user is a | |
| 756 | + @ user. Similarly, the <span class="usertype">reader</span> user is a | |
| 757 | 757 | @ template for users who are allowed more access than |
| 758 | 758 | @ <span class="usertype">anonymous</span>, |
| 759 | 759 | @ but less than a <span class="usertype">developer</span>. |
| 760 | 760 | @ </p></li> |
| 761 | 761 | @ </ul> |
| @@ -833,11 +833,11 @@ | ||
| 833 | 833 | z = zQ; |
| 834 | 834 | } |
| 835 | 835 | if( rows>0 && cols>0 ){ |
| 836 | 836 | @ <textarea id="id%s(zQP)" name="%s(zQP)" rows="%d(rows)" |
| 837 | 837 | @ cols="%d(cols)">%h(z)</textarea> |
| 838 | - if (zLabel && *zLabel){ | |
| 838 | + if( zLabel && *zLabel ){ | |
| 839 | 839 | @ <span class="textareaLabel">%s(zLabel)</span> |
| 840 | 840 | } |
| 841 | 841 | } |
| 842 | 842 | } |
| 843 | 843 | |
| @@ -895,11 +895,11 @@ | ||
| 895 | 895 | @ login name of a valid user and no other login credentials are available, |
| 896 | 896 | @ then the REMOTE_USER is accepted as an authenticated user. |
| 897 | 897 | @ </p> |
| 898 | 898 | @ |
| 899 | 899 | @ <hr /> |
| 900 | - entry_attribute("IP address terms used in login cookie", 3, | |
| 900 | + entry_attribute("IP address terms used in login cookie", 3, | |
| 901 | 901 | "ip-prefix-terms", "ipt", "2"); |
| 902 | 902 | @ <p>The number of octets of of the IP address used in the login cookie. |
| 903 | 903 | @ Set to zero to omit the IP address from the login cookie. A value of |
| 904 | 904 | @ 2 is recommended. |
| 905 | 905 | @ </p> |
| @@ -958,23 +958,23 @@ | ||
| 958 | 958 | entry_attribute("Public pages", 30, "public-pages", |
| 959 | 959 | "pubpage", ""); |
| 960 | 960 | @ <p>A comma-separated list of glob patterns for pages that are accessible |
| 961 | 961 | @ without needing a login and using the privileges given by the |
| 962 | 962 | @ "Default privileges" setting below. Example use case: Set this field |
| 963 | - @ to "/doc/trunk/www/*" to give anonymous users read-only permission to the | |
| 963 | + @ to "/doc/trunk/www/*" to give anonymous users read-only permission to the | |
| 964 | 964 | @ latest version of the embedded documentation in the www/ folder without |
| 965 | 965 | @ allowing them to see the rest of the source code. |
| 966 | 966 | @ </p> |
| 967 | 967 | |
| 968 | 968 | @ <hr /> |
| 969 | 969 | onoff_attribute("Allow users to register themselves", |
| 970 | 970 | "self-register", "selfregister", 0); |
| 971 | - @ <p>Allow users to register themselves through the HTTP UI. | |
| 972 | - @ The registration form always requires filling in a CAPTCHA | |
| 971 | + @ <p>Allow users to register themselves through the HTTP UI. | |
| 972 | + @ The registration form always requires filling in a CAPTCHA | |
| 973 | 973 | @ (<em>auto-captcha</em> setting is ignored). Still, bear in mind that anyone |
| 974 | 974 | @ can register under any user name. This option is useful for public projects |
| 975 | - @ where you do not want everyone in any ticket discussion to be named | |
| 975 | + @ where you do not want everyone in any ticket discussion to be named | |
| 976 | 976 | @ "Anonymous".</p> |
| 977 | 977 | |
| 978 | 978 | @ <hr /> |
| 979 | 979 | entry_attribute("Default privileges", 10, "default-perms", |
| 980 | 980 | "defaultperms", "u"); |
| @@ -1128,11 +1128,11 @@ | ||
| 1128 | 1128 | "timeline-utc", "utc", 1); |
| 1129 | 1129 | @ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or |
| 1130 | 1130 | @ Zulu) instead of in local time. On this server, local time is currently |
| 1131 | 1131 | g.fTimeFormat = 2; |
| 1132 | 1132 | tmDiff = db_double(0.0, "SELECT julianday('now')"); |
| 1133 | - tmDiff = db_double(0.0, | |
| 1133 | + tmDiff = db_double(0.0, | |
| 1134 | 1134 | "SELECT (julianday(%.17g,'localtime')-julianday(%.17g))*24.0", |
| 1135 | 1135 | tmDiff, tmDiff); |
| 1136 | 1136 | sqlite3_snprintf(sizeof(zTmDiff), zTmDiff, "%.1f", tmDiff); |
| 1137 | 1137 | if( strcmp(zTmDiff, "0.0")==0 ){ |
| 1138 | 1138 | @ the same as UTC and so this setting will make no difference in |
| @@ -1450,11 +1450,11 @@ | ||
| 1450 | 1450 | onoff_attribute("Moderate ticket changes", |
| 1451 | 1451 | "modreq-tkt", "modreq-tkt", 0); |
| 1452 | 1452 | @ <p>When enabled, any change to tickets is subject to the approval |
| 1453 | 1453 | @ a ticket moderator - a user with the "q" or Mod-Tkt privilege. |
| 1454 | 1454 | @ Ticket changes enter the system and are shown locally, but are not |
| 1455 | - @ synced until they are approved. The moderator has the option to | |
| 1455 | + @ synced until they are approved. The moderator has the option to | |
| 1456 | 1456 | @ delete the change rather than approve it. Ticket changes made by |
| 1457 | 1457 | @ a user who hwas the Mod-Tkt privilege are never subject to |
| 1458 | 1458 | @ moderation. |
| 1459 | 1459 | @ |
| 1460 | 1460 | @ <hr /> |
| @@ -1461,16 +1461,16 @@ | ||
| 1461 | 1461 | onoff_attribute("Moderate wiki changes", |
| 1462 | 1462 | "modreq-wiki", "modreq-wiki", 0); |
| 1463 | 1463 | @ <p>When enabled, any change to wiki is subject to the approval |
| 1464 | 1464 | @ a ticket moderator - a user with the "l" or Mod-Wiki privilege. |
| 1465 | 1465 | @ Wiki changes enter the system and are shown locally, but are not |
| 1466 | - @ synced until they are approved. The moderator has the option to | |
| 1466 | + @ synced until they are approved. The moderator has the option to | |
| 1467 | 1467 | @ delete the change rather than approve it. Wiki changes made by |
| 1468 | 1468 | @ a user who has the Mod-Wiki privilege are never subject to |
| 1469 | 1469 | @ moderation. |
| 1470 | 1470 | @ </p> |
| 1471 | - | |
| 1471 | + | |
| 1472 | 1472 | @ <hr /> |
| 1473 | 1473 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 1474 | 1474 | @ </div></form> |
| 1475 | 1475 | db_end_transaction(0); |
| 1476 | 1476 | style_footer(); |
| 1477 | 1477 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -139,11 +139,11 @@ | |
| 139 | @ <table class="usetupLayoutTable"> |
| 140 | @ <tr><td class="usetupColumnLayout"> |
| 141 | @ <span class="note">Users:</span> |
| 142 | @ <table class="usetupUserList"> |
| 143 | prevLevel = 0; |
| 144 | db_prepare(&s, |
| 145 | "SELECT uid, login, cap, info, 1 FROM user" |
| 146 | " WHERE login IN ('anonymous','nobody','developer','reader') " |
| 147 | " UNION ALL " |
| 148 | "SELECT uid, login, cap, info, 2 FROM user" |
| 149 | " WHERE login NOT IN ('anonymous','nobody','developer','reader') " |
| @@ -250,11 +250,11 @@ | |
| 250 | @ <td><i>Write-Tkt:</i> Edit tickets</td></tr> |
| 251 | @ <tr><td valign="top"><b>x</b></td> |
| 252 | @ <td><i>Private:</i> Push and/or pull private branches</td></tr> |
| 253 | @ <tr><td valign="top"><b>z</b></td> |
| 254 | @ <td><i>Zip download:</i> Download a baseline via the |
| 255 | @ <tt>/zip</tt> URL even without |
| 256 | @ check<span class="capability">o</span>ut |
| 257 | @ and <span class="capability">h</span>istory permissions</td></tr> |
| 258 | @ </table> |
| 259 | @ </li> |
| 260 | @ |
| @@ -357,11 +357,11 @@ | |
| 357 | style_header("User Creation Error"); |
| 358 | @ <span class="loginError">Empty login not allowed.</span> |
| 359 | @ |
| 360 | @ <p><a href="setup_uedit?id=%d(uid)">[Bummer]</a></p> |
| 361 | style_footer(); |
| 362 | return; |
| 363 | } |
| 364 | if( isValidPwString(zPw) ){ |
| 365 | zPw = sha1_shared_secret(zPw, zLogin, 0); |
| 366 | }else{ |
| 367 | zPw = db_text(0, "SELECT pw FROM user WHERE uid=%d", uid); |
| @@ -394,11 +394,11 @@ | |
| 394 | " SELECT %Q WHERE NOT EXISTS(SELECT 1 FROM user WHERE login=%Q);", |
| 395 | zLogin, zLogin |
| 396 | ); |
| 397 | zOldLogin = zLogin; |
| 398 | } |
| 399 | blob_appendf(&sql, |
| 400 | "UPDATE user SET login=%Q," |
| 401 | " pw=coalesce(shared_secret(%Q,%Q," |
| 402 | "(SELECT value FROM config WHERE name='project-code')),pw)," |
| 403 | " info=%Q," |
| 404 | " cap=%Q," |
| @@ -643,11 +643,11 @@ | |
| 643 | @ </p></li> |
| 644 | @ |
| 645 | @ <li><p> |
| 646 | @ The <span class="capability">Delete</span> privilege give the user the |
| 647 | @ ability to erase wiki, tickets, and attachments that have been added |
| 648 | @ by anonymous users. This capability is intended for deletion of spam. |
| 649 | @ The delete capability is only in effect for 24 hours after the item |
| 650 | @ is first posted. The <span class="usertype">Setup</span> user can |
| 651 | @ delete anything at any time. |
| 652 | @ </p></li> |
| 653 | @ |
| @@ -700,11 +700,11 @@ | |
| 700 | @ </p></li> |
| 701 | @ |
| 702 | @ <li><p> |
| 703 | @ The <span class="capability">EMail</span> privilege allows the display of |
| 704 | @ sensitive information such as the email address of users and contact |
| 705 | @ information on tickets. Recommended OFF for |
| 706 | @ <span class="usertype">anonymous</span> and for |
| 707 | @ <span class="usertype">nobody</span> but ON for |
| 708 | @ <span class="usertype">developer</span>. |
| 709 | @ </p></li> |
| 710 | @ |
| @@ -724,11 +724,11 @@ | |
| 724 | @ <ul> |
| 725 | @ <li><p> |
| 726 | @ No login is required for user <span class="usertype">nobody</span>. The |
| 727 | @ capabilities of the <span class="usertype">nobody</span> user are |
| 728 | @ inherited by all users, regardless of whether or not they are logged in. |
| 729 | @ To disable universal access to the repository, make sure no user named |
| 730 | @ <span class="usertype">nobody</span> exists or that the |
| 731 | @ <span class="usertype">nobody</span> user has no capabilities |
| 732 | @ enabled. The password for <span class="usertype">nobody</span> is ignore. |
| 733 | @ To avoid problems with spiders overloading the server, it is recommended |
| 734 | @ that the <span class="capability">h</span> (Hyperlinks) capability be |
| @@ -749,13 +749,13 @@ | |
| 749 | @ |
| 750 | @ <li><p> |
| 751 | @ The <span class="usertype">developer</span> user is intended as a template |
| 752 | @ for trusted users with check-in privileges. When adding new trusted users, |
| 753 | @ simply select the <span class="capability">developer</span> privilege to |
| 754 | @ cause the new user to inherit all privileges of the |
| 755 | @ <span class="usertype">developer</span> |
| 756 | @ user. Similarly, the <span class="usertype">reader</span> user is a |
| 757 | @ template for users who are allowed more access than |
| 758 | @ <span class="usertype">anonymous</span>, |
| 759 | @ but less than a <span class="usertype">developer</span>. |
| 760 | @ </p></li> |
| 761 | @ </ul> |
| @@ -833,11 +833,11 @@ | |
| 833 | z = zQ; |
| 834 | } |
| 835 | if( rows>0 && cols>0 ){ |
| 836 | @ <textarea id="id%s(zQP)" name="%s(zQP)" rows="%d(rows)" |
| 837 | @ cols="%d(cols)">%h(z)</textarea> |
| 838 | if (zLabel && *zLabel){ |
| 839 | @ <span class="textareaLabel">%s(zLabel)</span> |
| 840 | } |
| 841 | } |
| 842 | } |
| 843 | |
| @@ -895,11 +895,11 @@ | |
| 895 | @ login name of a valid user and no other login credentials are available, |
| 896 | @ then the REMOTE_USER is accepted as an authenticated user. |
| 897 | @ </p> |
| 898 | @ |
| 899 | @ <hr /> |
| 900 | entry_attribute("IP address terms used in login cookie", 3, |
| 901 | "ip-prefix-terms", "ipt", "2"); |
| 902 | @ <p>The number of octets of of the IP address used in the login cookie. |
| 903 | @ Set to zero to omit the IP address from the login cookie. A value of |
| 904 | @ 2 is recommended. |
| 905 | @ </p> |
| @@ -958,23 +958,23 @@ | |
| 958 | entry_attribute("Public pages", 30, "public-pages", |
| 959 | "pubpage", ""); |
| 960 | @ <p>A comma-separated list of glob patterns for pages that are accessible |
| 961 | @ without needing a login and using the privileges given by the |
| 962 | @ "Default privileges" setting below. Example use case: Set this field |
| 963 | @ to "/doc/trunk/www/*" to give anonymous users read-only permission to the |
| 964 | @ latest version of the embedded documentation in the www/ folder without |
| 965 | @ allowing them to see the rest of the source code. |
| 966 | @ </p> |
| 967 | |
| 968 | @ <hr /> |
| 969 | onoff_attribute("Allow users to register themselves", |
| 970 | "self-register", "selfregister", 0); |
| 971 | @ <p>Allow users to register themselves through the HTTP UI. |
| 972 | @ The registration form always requires filling in a CAPTCHA |
| 973 | @ (<em>auto-captcha</em> setting is ignored). Still, bear in mind that anyone |
| 974 | @ can register under any user name. This option is useful for public projects |
| 975 | @ where you do not want everyone in any ticket discussion to be named |
| 976 | @ "Anonymous".</p> |
| 977 | |
| 978 | @ <hr /> |
| 979 | entry_attribute("Default privileges", 10, "default-perms", |
| 980 | "defaultperms", "u"); |
| @@ -1128,11 +1128,11 @@ | |
| 1128 | "timeline-utc", "utc", 1); |
| 1129 | @ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or |
| 1130 | @ Zulu) instead of in local time. On this server, local time is currently |
| 1131 | g.fTimeFormat = 2; |
| 1132 | tmDiff = db_double(0.0, "SELECT julianday('now')"); |
| 1133 | tmDiff = db_double(0.0, |
| 1134 | "SELECT (julianday(%.17g,'localtime')-julianday(%.17g))*24.0", |
| 1135 | tmDiff, tmDiff); |
| 1136 | sqlite3_snprintf(sizeof(zTmDiff), zTmDiff, "%.1f", tmDiff); |
| 1137 | if( strcmp(zTmDiff, "0.0")==0 ){ |
| 1138 | @ the same as UTC and so this setting will make no difference in |
| @@ -1450,11 +1450,11 @@ | |
| 1450 | onoff_attribute("Moderate ticket changes", |
| 1451 | "modreq-tkt", "modreq-tkt", 0); |
| 1452 | @ <p>When enabled, any change to tickets is subject to the approval |
| 1453 | @ a ticket moderator - a user with the "q" or Mod-Tkt privilege. |
| 1454 | @ Ticket changes enter the system and are shown locally, but are not |
| 1455 | @ synced until they are approved. The moderator has the option to |
| 1456 | @ delete the change rather than approve it. Ticket changes made by |
| 1457 | @ a user who hwas the Mod-Tkt privilege are never subject to |
| 1458 | @ moderation. |
| 1459 | @ |
| 1460 | @ <hr /> |
| @@ -1461,16 +1461,16 @@ | |
| 1461 | onoff_attribute("Moderate wiki changes", |
| 1462 | "modreq-wiki", "modreq-wiki", 0); |
| 1463 | @ <p>When enabled, any change to wiki is subject to the approval |
| 1464 | @ a ticket moderator - a user with the "l" or Mod-Wiki privilege. |
| 1465 | @ Wiki changes enter the system and are shown locally, but are not |
| 1466 | @ synced until they are approved. The moderator has the option to |
| 1467 | @ delete the change rather than approve it. Wiki changes made by |
| 1468 | @ a user who has the Mod-Wiki privilege are never subject to |
| 1469 | @ moderation. |
| 1470 | @ </p> |
| 1471 | |
| 1472 | @ <hr /> |
| 1473 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 1474 | @ </div></form> |
| 1475 | db_end_transaction(0); |
| 1476 | style_footer(); |
| 1477 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -139,11 +139,11 @@ | |
| 139 | @ <table class="usetupLayoutTable"> |
| 140 | @ <tr><td class="usetupColumnLayout"> |
| 141 | @ <span class="note">Users:</span> |
| 142 | @ <table class="usetupUserList"> |
| 143 | prevLevel = 0; |
| 144 | db_prepare(&s, |
| 145 | "SELECT uid, login, cap, info, 1 FROM user" |
| 146 | " WHERE login IN ('anonymous','nobody','developer','reader') " |
| 147 | " UNION ALL " |
| 148 | "SELECT uid, login, cap, info, 2 FROM user" |
| 149 | " WHERE login NOT IN ('anonymous','nobody','developer','reader') " |
| @@ -250,11 +250,11 @@ | |
| 250 | @ <td><i>Write-Tkt:</i> Edit tickets</td></tr> |
| 251 | @ <tr><td valign="top"><b>x</b></td> |
| 252 | @ <td><i>Private:</i> Push and/or pull private branches</td></tr> |
| 253 | @ <tr><td valign="top"><b>z</b></td> |
| 254 | @ <td><i>Zip download:</i> Download a baseline via the |
| 255 | @ <tt>/zip</tt> URL even without |
| 256 | @ check<span class="capability">o</span>ut |
| 257 | @ and <span class="capability">h</span>istory permissions</td></tr> |
| 258 | @ </table> |
| 259 | @ </li> |
| 260 | @ |
| @@ -357,11 +357,11 @@ | |
| 357 | style_header("User Creation Error"); |
| 358 | @ <span class="loginError">Empty login not allowed.</span> |
| 359 | @ |
| 360 | @ <p><a href="setup_uedit?id=%d(uid)">[Bummer]</a></p> |
| 361 | style_footer(); |
| 362 | return; |
| 363 | } |
| 364 | if( isValidPwString(zPw) ){ |
| 365 | zPw = sha1_shared_secret(zPw, zLogin, 0); |
| 366 | }else{ |
| 367 | zPw = db_text(0, "SELECT pw FROM user WHERE uid=%d", uid); |
| @@ -394,11 +394,11 @@ | |
| 394 | " SELECT %Q WHERE NOT EXISTS(SELECT 1 FROM user WHERE login=%Q);", |
| 395 | zLogin, zLogin |
| 396 | ); |
| 397 | zOldLogin = zLogin; |
| 398 | } |
| 399 | blob_appendf(&sql, |
| 400 | "UPDATE user SET login=%Q," |
| 401 | " pw=coalesce(shared_secret(%Q,%Q," |
| 402 | "(SELECT value FROM config WHERE name='project-code')),pw)," |
| 403 | " info=%Q," |
| 404 | " cap=%Q," |
| @@ -643,11 +643,11 @@ | |
| 643 | @ </p></li> |
| 644 | @ |
| 645 | @ <li><p> |
| 646 | @ The <span class="capability">Delete</span> privilege give the user the |
| 647 | @ ability to erase wiki, tickets, and attachments that have been added |
| 648 | @ by anonymous users. This capability is intended for deletion of spam. |
| 649 | @ The delete capability is only in effect for 24 hours after the item |
| 650 | @ is first posted. The <span class="usertype">Setup</span> user can |
| 651 | @ delete anything at any time. |
| 652 | @ </p></li> |
| 653 | @ |
| @@ -700,11 +700,11 @@ | |
| 700 | @ </p></li> |
| 701 | @ |
| 702 | @ <li><p> |
| 703 | @ The <span class="capability">EMail</span> privilege allows the display of |
| 704 | @ sensitive information such as the email address of users and contact |
| 705 | @ information on tickets. Recommended OFF for |
| 706 | @ <span class="usertype">anonymous</span> and for |
| 707 | @ <span class="usertype">nobody</span> but ON for |
| 708 | @ <span class="usertype">developer</span>. |
| 709 | @ </p></li> |
| 710 | @ |
| @@ -724,11 +724,11 @@ | |
| 724 | @ <ul> |
| 725 | @ <li><p> |
| 726 | @ No login is required for user <span class="usertype">nobody</span>. The |
| 727 | @ capabilities of the <span class="usertype">nobody</span> user are |
| 728 | @ inherited by all users, regardless of whether or not they are logged in. |
| 729 | @ To disable universal access to the repository, make sure no user named |
| 730 | @ <span class="usertype">nobody</span> exists or that the |
| 731 | @ <span class="usertype">nobody</span> user has no capabilities |
| 732 | @ enabled. The password for <span class="usertype">nobody</span> is ignore. |
| 733 | @ To avoid problems with spiders overloading the server, it is recommended |
| 734 | @ that the <span class="capability">h</span> (Hyperlinks) capability be |
| @@ -749,13 +749,13 @@ | |
| 749 | @ |
| 750 | @ <li><p> |
| 751 | @ The <span class="usertype">developer</span> user is intended as a template |
| 752 | @ for trusted users with check-in privileges. When adding new trusted users, |
| 753 | @ simply select the <span class="capability">developer</span> privilege to |
| 754 | @ cause the new user to inherit all privileges of the |
| 755 | @ <span class="usertype">developer</span> |
| 756 | @ user. Similarly, the <span class="usertype">reader</span> user is a |
| 757 | @ template for users who are allowed more access than |
| 758 | @ <span class="usertype">anonymous</span>, |
| 759 | @ but less than a <span class="usertype">developer</span>. |
| 760 | @ </p></li> |
| 761 | @ </ul> |
| @@ -833,11 +833,11 @@ | |
| 833 | z = zQ; |
| 834 | } |
| 835 | if( rows>0 && cols>0 ){ |
| 836 | @ <textarea id="id%s(zQP)" name="%s(zQP)" rows="%d(rows)" |
| 837 | @ cols="%d(cols)">%h(z)</textarea> |
| 838 | if( zLabel && *zLabel ){ |
| 839 | @ <span class="textareaLabel">%s(zLabel)</span> |
| 840 | } |
| 841 | } |
| 842 | } |
| 843 | |
| @@ -895,11 +895,11 @@ | |
| 895 | @ login name of a valid user and no other login credentials are available, |
| 896 | @ then the REMOTE_USER is accepted as an authenticated user. |
| 897 | @ </p> |
| 898 | @ |
| 899 | @ <hr /> |
| 900 | entry_attribute("IP address terms used in login cookie", 3, |
| 901 | "ip-prefix-terms", "ipt", "2"); |
| 902 | @ <p>The number of octets of of the IP address used in the login cookie. |
| 903 | @ Set to zero to omit the IP address from the login cookie. A value of |
| 904 | @ 2 is recommended. |
| 905 | @ </p> |
| @@ -958,23 +958,23 @@ | |
| 958 | entry_attribute("Public pages", 30, "public-pages", |
| 959 | "pubpage", ""); |
| 960 | @ <p>A comma-separated list of glob patterns for pages that are accessible |
| 961 | @ without needing a login and using the privileges given by the |
| 962 | @ "Default privileges" setting below. Example use case: Set this field |
| 963 | @ to "/doc/trunk/www/*" to give anonymous users read-only permission to the |
| 964 | @ latest version of the embedded documentation in the www/ folder without |
| 965 | @ allowing them to see the rest of the source code. |
| 966 | @ </p> |
| 967 | |
| 968 | @ <hr /> |
| 969 | onoff_attribute("Allow users to register themselves", |
| 970 | "self-register", "selfregister", 0); |
| 971 | @ <p>Allow users to register themselves through the HTTP UI. |
| 972 | @ The registration form always requires filling in a CAPTCHA |
| 973 | @ (<em>auto-captcha</em> setting is ignored). Still, bear in mind that anyone |
| 974 | @ can register under any user name. This option is useful for public projects |
| 975 | @ where you do not want everyone in any ticket discussion to be named |
| 976 | @ "Anonymous".</p> |
| 977 | |
| 978 | @ <hr /> |
| 979 | entry_attribute("Default privileges", 10, "default-perms", |
| 980 | "defaultperms", "u"); |
| @@ -1128,11 +1128,11 @@ | |
| 1128 | "timeline-utc", "utc", 1); |
| 1129 | @ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or |
| 1130 | @ Zulu) instead of in local time. On this server, local time is currently |
| 1131 | g.fTimeFormat = 2; |
| 1132 | tmDiff = db_double(0.0, "SELECT julianday('now')"); |
| 1133 | tmDiff = db_double(0.0, |
| 1134 | "SELECT (julianday(%.17g,'localtime')-julianday(%.17g))*24.0", |
| 1135 | tmDiff, tmDiff); |
| 1136 | sqlite3_snprintf(sizeof(zTmDiff), zTmDiff, "%.1f", tmDiff); |
| 1137 | if( strcmp(zTmDiff, "0.0")==0 ){ |
| 1138 | @ the same as UTC and so this setting will make no difference in |
| @@ -1450,11 +1450,11 @@ | |
| 1450 | onoff_attribute("Moderate ticket changes", |
| 1451 | "modreq-tkt", "modreq-tkt", 0); |
| 1452 | @ <p>When enabled, any change to tickets is subject to the approval |
| 1453 | @ a ticket moderator - a user with the "q" or Mod-Tkt privilege. |
| 1454 | @ Ticket changes enter the system and are shown locally, but are not |
| 1455 | @ synced until they are approved. The moderator has the option to |
| 1456 | @ delete the change rather than approve it. Ticket changes made by |
| 1457 | @ a user who hwas the Mod-Tkt privilege are never subject to |
| 1458 | @ moderation. |
| 1459 | @ |
| 1460 | @ <hr /> |
| @@ -1461,16 +1461,16 @@ | |
| 1461 | onoff_attribute("Moderate wiki changes", |
| 1462 | "modreq-wiki", "modreq-wiki", 0); |
| 1463 | @ <p>When enabled, any change to wiki is subject to the approval |
| 1464 | @ a ticket moderator - a user with the "l" or Mod-Wiki privilege. |
| 1465 | @ Wiki changes enter the system and are shown locally, but are not |
| 1466 | @ synced until they are approved. The moderator has the option to |
| 1467 | @ delete the change rather than approve it. Wiki changes made by |
| 1468 | @ a user who has the Mod-Wiki privilege are never subject to |
| 1469 | @ moderation. |
| 1470 | @ </p> |
| 1471 | |
| 1472 | @ <hr /> |
| 1473 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 1474 | @ </div></form> |
| 1475 | db_end_transaction(0); |
| 1476 | style_footer(); |
| 1477 |