Fossil SCM

unused variable includeDotFiles <p>struct utimbuf -> struct _utimbuf (compiler warning with mingw-w64) <p>a few "const" additions

jan.nijtmans 2012-10-15 05:28 use-utf8-in-win-external-editor
Commit d2e1469d1228db64bebf48d16ac15cc6ebb52a2a
3 files changed +2 -8 +1 -1 +1 -1
+2 -8
--- src/add.c
+++ src/add.c
@@ -21,16 +21,10 @@
2121
#include "config.h"
2222
#include "add.h"
2323
#include <assert.h>
2424
#include <dirent.h>
2525
26
-/*
27
-** Set to true if files whose names begin with "." should be
28
-** included when processing a recursive "add" command.
29
-*/
30
-static int includeDotFiles = 0;
31
-
3226
/*
3327
** This routine returns the names of files in a working checkout that
3428
** are created by Fossil itself, and hence should not be added, deleted,
3529
** or merge, and should be omitted from "clean" and "extra" lists.
3630
**
@@ -39,11 +33,11 @@
3933
*/
4034
const char *fossil_reserved_name(int N){
4135
/* Possible names of the local per-checkout database file and
4236
** its associated journals
4337
*/
44
- static const char *azName[] = {
38
+ static const char *const azName[] = {
4539
"_FOSSIL_",
4640
"_FOSSIL_-journal",
4741
"_FOSSIL_-wal",
4842
"_FOSSIL_-shm",
4943
".fslckout",
@@ -61,11 +55,11 @@
6155
};
6256
6357
/* Names of auxiliary files generated by SQLite when the "manifest"
6458
** properity is enabled
6559
*/
66
- static const char *azManifest[] = {
60
+ static const char *const azManifest[] = {
6761
"manifest",
6862
"manifest.uuid",
6963
};
7064
7165
/* Cached setting "manifest" */
7266
--- src/add.c
+++ src/add.c
@@ -21,16 +21,10 @@
21 #include "config.h"
22 #include "add.h"
23 #include <assert.h>
24 #include <dirent.h>
25
26 /*
27 ** Set to true if files whose names begin with "." should be
28 ** included when processing a recursive "add" command.
29 */
30 static int includeDotFiles = 0;
31
32 /*
33 ** This routine returns the names of files in a working checkout that
34 ** are created by Fossil itself, and hence should not be added, deleted,
35 ** or merge, and should be omitted from "clean" and "extra" lists.
36 **
@@ -39,11 +33,11 @@
39 */
40 const char *fossil_reserved_name(int N){
41 /* Possible names of the local per-checkout database file and
42 ** its associated journals
43 */
44 static const char *azName[] = {
45 "_FOSSIL_",
46 "_FOSSIL_-journal",
47 "_FOSSIL_-wal",
48 "_FOSSIL_-shm",
49 ".fslckout",
@@ -61,11 +55,11 @@
61 };
62
63 /* Names of auxiliary files generated by SQLite when the "manifest"
64 ** properity is enabled
65 */
66 static const char *azManifest[] = {
67 "manifest",
68 "manifest.uuid",
69 };
70
71 /* Cached setting "manifest" */
72
--- src/add.c
+++ src/add.c
@@ -21,16 +21,10 @@
21 #include "config.h"
22 #include "add.h"
23 #include <assert.h>
24 #include <dirent.h>
25
 
 
 
 
 
 
26 /*
27 ** This routine returns the names of files in a working checkout that
28 ** are created by Fossil itself, and hence should not be added, deleted,
29 ** or merge, and should be omitted from "clean" and "extra" lists.
30 **
@@ -39,11 +33,11 @@
33 */
34 const char *fossil_reserved_name(int N){
35 /* Possible names of the local per-checkout database file and
36 ** its associated journals
37 */
38 static const char *const azName[] = {
39 "_FOSSIL_",
40 "_FOSSIL_-journal",
41 "_FOSSIL_-wal",
42 "_FOSSIL_-shm",
43 ".fslckout",
@@ -61,11 +55,11 @@
55 };
56
57 /* Names of auxiliary files generated by SQLite when the "manifest"
58 ** properity is enabled
59 */
60 static const char *const azManifest[] = {
61 "manifest",
62 "manifest.uuid",
63 };
64
65 /* Cached setting "manifest" */
66
+1 -1
--- src/file.c
+++ src/file.c
@@ -402,11 +402,11 @@
402402
memset(tv, 0, sizeof(tv[0])*2);
403403
tv[0].tv_sec = newMTime;
404404
tv[1].tv_sec = newMTime;
405405
utimes(zFilename, tv);
406406
#else
407
- struct utimbuf tb;
407
+ struct _utimbuf tb;
408408
wchar_t *zMbcs = fossil_utf8_to_unicode(zFilename);
409409
tb.actime = newMTime;
410410
tb.modtime = newMTime;
411411
_wutime(zMbcs, &tb);
412412
fossil_mbcs_free(zMbcs);
413413
--- src/file.c
+++ src/file.c
@@ -402,11 +402,11 @@
402 memset(tv, 0, sizeof(tv[0])*2);
403 tv[0].tv_sec = newMTime;
404 tv[1].tv_sec = newMTime;
405 utimes(zFilename, tv);
406 #else
407 struct utimbuf tb;
408 wchar_t *zMbcs = fossil_utf8_to_unicode(zFilename);
409 tb.actime = newMTime;
410 tb.modtime = newMTime;
411 _wutime(zMbcs, &tb);
412 fossil_mbcs_free(zMbcs);
413
--- src/file.c
+++ src/file.c
@@ -402,11 +402,11 @@
402 memset(tv, 0, sizeof(tv[0])*2);
403 tv[0].tv_sec = newMTime;
404 tv[1].tv_sec = newMTime;
405 utimes(zFilename, tv);
406 #else
407 struct _utimbuf tb;
408 wchar_t *zMbcs = fossil_utf8_to_unicode(zFilename);
409 tb.actime = newMTime;
410 tb.modtime = newMTime;
411 _wutime(zMbcs, &tb);
412 fossil_mbcs_free(zMbcs);
413
+1 -1
--- src/vfile.c
+++ src/vfile.c
@@ -385,11 +385,11 @@
385385
386386
/*
387387
** Return TRUE if zFile is a temporary file. Return FALSE if not.
388388
*/
389389
static int is_temporary_file(const char *zName){
390
- static const char *azTemp[] = {
390
+ static const char *const azTemp[] = {
391391
"baseline",
392392
"merge",
393393
"original",
394394
"output",
395395
};
396396
--- src/vfile.c
+++ src/vfile.c
@@ -385,11 +385,11 @@
385
386 /*
387 ** Return TRUE if zFile is a temporary file. Return FALSE if not.
388 */
389 static int is_temporary_file(const char *zName){
390 static const char *azTemp[] = {
391 "baseline",
392 "merge",
393 "original",
394 "output",
395 };
396
--- src/vfile.c
+++ src/vfile.c
@@ -385,11 +385,11 @@
385
386 /*
387 ** Return TRUE if zFile is a temporary file. Return FALSE if not.
388 */
389 static int is_temporary_file(const char *zName){
390 static const char *const azTemp[] = {
391 "baseline",
392 "merge",
393 "original",
394 "output",
395 };
396

Keyboard Shortcuts

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