Fossil SCM
Simplify a test when looking for the command tail.
Commit
b273cc99874ab574983f31716a69f0596daa6095e94528a0bed170f484f9192d
Parent
121093b8351de66…
1 file changed
+51
-3
+51
-3
| --- a/src/file.c | ||
| +++ b/src/file.c | ||
| @@ -1,3 +1,51 @@ | ||
| 1 | -if( chQuote && chQuote==z[0] ) | |
| 2 | - chQuote = 0; | |
| 3 | - else chQuote = z[0] | |
| 1 | +/* | |
| 2 | +** Copyright (c) 2006 D. Richard Hipp | |
| 3 | +** | |
| 4 | +** This program is free software; you can redistribute it and/or | |
| 5 | +** modify it under the terms of the Simplified BSD License (also | |
| 6 | +** known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | +** | |
| 8 | +** This program is distributed in the hope that it will be useful, | |
| 9 | +** but without any warranty; without even the implied warranty of | |
| 10 | +** merchantability or fitness for a particular purpose. | |
| 11 | +** | |
| 12 | +** Author contact information: | |
| 13 | +** [email protected] | |
| 14 | +** http://www.hwaci.com/drh/ | |
| 15 | +** | |
| 16 | +******************************************************************************* | |
| 17 | +** | |
| 18 | +** File utilities. | |
| 19 | +*/ | |
| 20 | +#include "config.h" | |
| 21 | +#include <sys/types.h> | |
| 22 | +#include <sys/stat.h> | |
| 23 | +#include <unistd.h> | |
| 24 | +#include <stdio.h> | |
| 25 | +#include <string.h> | |
| 26 | +#include <errno.h> | |
| 27 | +#include <time.h> | |
| 28 | +#include "file.h" | |
| 29 | + | |
| 30 | +/* | |
| 31 | +** On Windows, include the Platform SDK header file. | |
| 32 | +*/ | |
| 33 | +#ifdef _WIN32 | |
| 34 | +# include <direct.h> | |
| 35 | +# include <windows.h> | |
| 36 | +# include <sys/utime.h> | |
| 37 | +#else | |
| 38 | +# include <sys/time.h> | |
| 39 | +# include <pwd.h> | |
| 40 | +# include <grp.h> | |
| 41 | +#endif | |
| 42 | + | |
| 43 | +#if INTERFACE | |
| 44 | + | |
| 45 | +/* Many APIs take an eFType argument which must be one of ExtFILE, RepoFILE, | |
| 46 | +** or SymFILE. | |
| 47 | +** | |
| 48 | +** The difference is in the handling of symbolic links. RepoFILE should be | |
| 49 | +** used for files that are under management by a Fossil repository. ExtFILE | |
| 50 | +** should be used for files that are not under management. SymFILE is for | |
| 51 | +* |
| --- a/src/file.c | |
| +++ b/src/file.c | |
| @@ -1,3 +1,51 @@ | |
| 1 | if( chQuote && chQuote==z[0] ) |
| 2 | chQuote = 0; |
| 3 | else chQuote = z[0] |
| --- a/src/file.c | |
| +++ b/src/file.c | |
| @@ -1,3 +1,51 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | ** |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but without any warranty; without even the implied warranty of |
| 10 | ** merchantability or fitness for a particular purpose. |
| 11 | ** |
| 12 | ** Author contact information: |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** File utilities. |
| 19 | */ |
| 20 | #include "config.h" |
| 21 | #include <sys/types.h> |
| 22 | #include <sys/stat.h> |
| 23 | #include <unistd.h> |
| 24 | #include <stdio.h> |
| 25 | #include <string.h> |
| 26 | #include <errno.h> |
| 27 | #include <time.h> |
| 28 | #include "file.h" |
| 29 | |
| 30 | /* |
| 31 | ** On Windows, include the Platform SDK header file. |
| 32 | */ |
| 33 | #ifdef _WIN32 |
| 34 | # include <direct.h> |
| 35 | # include <windows.h> |
| 36 | # include <sys/utime.h> |
| 37 | #else |
| 38 | # include <sys/time.h> |
| 39 | # include <pwd.h> |
| 40 | # include <grp.h> |
| 41 | #endif |
| 42 | |
| 43 | #if INTERFACE |
| 44 | |
| 45 | /* Many APIs take an eFType argument which must be one of ExtFILE, RepoFILE, |
| 46 | ** or SymFILE. |
| 47 | ** |
| 48 | ** The difference is in the handling of symbolic links. RepoFILE should be |
| 49 | ** used for files that are under management by a Fossil repository. ExtFILE |
| 50 | ** should be used for files that are not under management. SymFILE is for |
| 51 | * |