Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Unbreak compilation on Cygwin. Allow notepad to be used as unversioned content editor (notepad cannot handle UNIX line-endings) |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
6728970b766f7afff069239177c83dc4 |
| User & Date: | jan.nijtmans 2016-08-24 14:56:14.267 |
| Original Comment: | Unbreak compilation on Cygwin. Allow notpad to be used as unversioned content editor (notepad cannot handle UNIX line-endings) |
Context
|
2016-08-24
| ||
| 15:14 | Simplification to the /test-piechart webpage. Include sample test cases. ... (check-in: 8086dd9612 user: drh tags: trunk) | |
| 14:56 | Unbreak compilation on Cygwin. Allow notepad to be used as unversioned content editor (notepad cannot handle UNIX line-endings) ... (check-in: 6728970b76 user: jan.nijtmans tags: trunk) | |
| 14:08 | In the pie-chart generator, if there is a wedge pointing straight down, make sure its text label flows off to the right, not the left. ... (check-in: bb9c6a6f29 user: drh tags: trunk) | |
Changes
Changes to src/sqlcmd.c.
| ︙ | ︙ | |||
136 137 138 139 140 141 142 |
** database connection to be more useful to the human operator.
*/
static int sqlcmd_autoinit(
sqlite3 *db,
const char **pzErrMsg,
const void *notUsed
){
| < | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
** database connection to be more useful to the human operator.
*/
static int sqlcmd_autoinit(
sqlite3 *db,
const char **pzErrMsg,
const void *notUsed
){
add_content_sql_commands(db);
db_add_aux_functions(db);
re_add_sql_func(db);
search_sql_setup(db);
foci_register(db);
g.repositoryOpen = 1;
g.db = db;
|
| ︙ | ︙ |
Changes to src/unversioned.c.
| ︙ | ︙ | |||
32 33 34 35 36 37 38 | ** SQL code to implement the tables needed by the unversioned. */ static const char zUnversionedInit[] = @ CREATE TABLE IF NOT EXISTS repository.unversioned( @ name TEXT PRIMARY KEY, -- Name of the uv file @ rcvid INTEGER, -- Where received from @ mtime DATETIME, -- timestamp. Seconds since 1970. | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ** SQL code to implement the tables needed by the unversioned. */ static const char zUnversionedInit[] = @ CREATE TABLE IF NOT EXISTS repository.unversioned( @ name TEXT PRIMARY KEY, -- Name of the uv file @ rcvid INTEGER, -- Where received from @ mtime DATETIME, -- timestamp. Seconds since 1970. @ hash TEXT, -- Content hash. NULL if a delete marker @ sz INTEGER, -- size of content after decompression @ encoding INT, -- 0: plaintext. 1: zlib compressed @ content BLOB -- content of the file. NULL if oversized @ ) WITHOUT ROWID; ; /* |
| ︙ | ︙ | |||
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
content_rcvid_init("#!fossil unversioned edit");
if( unversioned_content(zUVFile, &content) ){
fossil_fatal("no such uv-file: %Q", zUVFile);
}
if( looks_like_binary(&content) ){
fossil_fatal("cannot edit binary content");
}
blob_write_to_file(&content, zTFile);
zCmd = mprintf("%s \"%s\"", zEditor, zTFile);
if( fossil_system(zCmd) ){
fossil_fatal("editor aborted: %Q", zCmd);
}
fossil_free(zCmd);
blob_reset(&content);
blob_read_from_file(&content, zTFile);
file_delete(zTFile);
if( zMtime==0 ) mtime = time(0);
unversioned_write(zUVFile, &content, mtime);
db_end_transaction(0);
blob_reset(&content);
}else if( memcmp(zCmd, "export", nCmd)==0 ){
Blob content;
| > > > > > > | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
content_rcvid_init("#!fossil unversioned edit");
if( unversioned_content(zUVFile, &content) ){
fossil_fatal("no such uv-file: %Q", zUVFile);
}
if( looks_like_binary(&content) ){
fossil_fatal("cannot edit binary content");
}
#if defined(_WIN32) || defined(__CYGWIN__)
blob_add_cr(&content);
#endif
blob_write_to_file(&content, zTFile);
zCmd = mprintf("%s \"%s\"", zEditor, zTFile);
if( fossil_system(zCmd) ){
fossil_fatal("editor aborted: %Q", zCmd);
}
fossil_free(zCmd);
blob_reset(&content);
blob_read_from_file(&content, zTFile);
#if defined(_WIN32) || defined(__CYGWIN__)
blob_to_lf_only(&content);
#endif
file_delete(zTFile);
if( zMtime==0 ) mtime = time(0);
unversioned_write(zUVFile, &content, mtime);
db_end_transaction(0);
blob_reset(&content);
}else if( memcmp(zCmd, "export", nCmd)==0 ){
Blob content;
|
| ︙ | ︙ |
Changes to src/util.c.
| ︙ | ︙ | |||
364 365 366 367 368 369 370 |
zEditor = fossil_getenv("EDITOR");
}
#if defined(_WIN32) || defined(__CYGWIN__)
if( zEditor==0 ){
zEditor = mprintf("%s\\notepad.exe", fossil_getenv("SYSTEMROOT"));
#if defined(__CYGWIN__)
zEditor = fossil_utf8_to_path(zEditor, 0);
| < | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
zEditor = fossil_getenv("EDITOR");
}
#if defined(_WIN32) || defined(__CYGWIN__)
if( zEditor==0 ){
zEditor = mprintf("%s\\notepad.exe", fossil_getenv("SYSTEMROOT"));
#if defined(__CYGWIN__)
zEditor = fossil_utf8_to_path(zEditor, 0);
#endif
}
#endif
return zEditor;
}
/*
|
| ︙ | ︙ |