Differences From Artifact [fe303ecfbb]:
- File src/add.c — part of check-in [2a4ab3b151] at 2010-07-29 19:01:27 on branch benoit — “delete” command, still can use “del” which is shorter and non ambiguous – ignore -wal and -shm files in repository root for adding, computing extras and closing repository, just in case (user: benoit size: 10157) [more...]
To Artifact [eddef3fa44]:
- File src/add.c — part of check-in [f66f414fd3] at 2010-08-28 06:59:10 on branch windowscompilers — This is the first check-in on the windowscompilers branch and it adds the <a href="http://www.digitalmars.com/">Digital Mars C compiler</a> The user should have dmc installed in c:\DM with zlib in c:\DM\extra\lib and c:\DM\extra\include. typing c:\DM\bin\make -f win\Makefile.dmc builds fossil.exe in dmcobj The following files were edited or added: <p>Checks if one of the windows compilers is used. If so we define _WIN32. Defining _WIN32 is normally done by<br>#include <windows.h><br> However most of the time we don't use windows.h. </p> <p>Adding an other windows compiler is done by adding<br> "|| defined(__COMPILER_IDENTIFIER__)"<br> and maybe some special things in the files below. Like <pre> </pre> </p> <p>These have all __MINGW32__ replaced by _WIN32. And in some places special processing for either MINGW32 or DMC <p>In popen2 the _open_osfHandle call first parameter is cast to a long. DMC refused to compile without the cast.</p> <p>DMC complained that it didn't knew of time_t in rss.h. time.h came after rss.h. Switching the two solved it! </p> <p>added tcl code to generate Makefile.dmc. tclsh src/makemake.tcl dmc prints to stdout the makefile. As a convienience to the end-user I added the win/Makefile.dmc to the repository. There are few changeable variables in there for adjusting path, CFLAGS LIBS etc. </p> <p>These are needed because DMC and MSVC doesn't provided them. dirent.h is copied verbatim from the net. unistd.h I found on the net too, but added some defines. <p>The problem with windows it doesn't have AWK standard installed. version.c creates VERSION.h. It is a very simple C-program and doesn't do a lot of checking. </p> (user: renez size: 10159) [more...]
| ︙ | ︙ | |||
51 52 53 54 55 56 57 |
|| blob_compare(&pathname, pOmit)==0
){
fossil_warning("cannot add %s", zPath);
}else{
if( !file_is_simple_pathname(zPath) ){
fossil_fatal("filename contains illegal characters: %s", zPath);
}
| | | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|| blob_compare(&pathname, pOmit)==0
){
fossil_warning("cannot add %s", zPath);
}else{
if( !file_is_simple_pathname(zPath) ){
fossil_fatal("filename contains illegal characters: %s", zPath);
}
#if defined(_WIN32)
if( db_exists("SELECT 1 FROM vfile"
" WHERE pathname=%Q COLLATE nocase", zPath) ){
db_multi_exec("UPDATE vfile SET deleted=0"
" WHERE pathname=%Q COLLATE nocase", zPath);
}
#else
if( db_exists("SELECT 1 FROM vfile WHERE pathname=%Q", zPath) ){
|
| ︙ | ︙ | |||
150 151 152 153 154 155 156 |
fossil_panic("no checkout to add to");
}
db_begin_transaction();
if( !file_tree_name(g.zRepositoryName, &repo, 0) ){
blob_zero(&repo);
}
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
| | | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
fossil_panic("no checkout to add to");
}
db_begin_transaction();
if( !file_tree_name(g.zRepositoryName, &repo, 0) ){
blob_zero(&repo);
}
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
#if defined(_WIN32)
db_multi_exec(
"CREATE INDEX IF NOT EXISTS vfile_pathname "
" ON vfile(pathname COLLATE nocase)"
);
#endif
for(i=2; i<g.argc; i++){
char *zName;
|
| ︙ | ︙ |