Re: [fossil-users] some uglifications for diff.tcl

2016-08-01 Thread Kain Abel
Hi David,

Thanks for fixing and pushing it.

With regards,
Kain
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] some uglifications for diff.tcl

2016-08-01 Thread Johan Kuuse
>> Yet another small "problem". The C compiler with -std switch complains
>> about the comment style in file src/attach.c:91:
>>
http://www.fossil-scm.org/fossil/artifact/3d0f4416538b9154333fba4717670584669bf9eb?txt=1&ln=91

On Mon, Aug 1, 2016 at 8:37 AM, David Vines 
wrote:
> The comment style problem in attach.c is my fault - I'll provide a fix
> (I'm far too used to the // style of comment :)
>
> Dave

Kain, when you mention the "-std" switch, I suppose you mean "-std=c89",
right?
When I compile (trunk, 2a5de7ea2e) using "-std=c89", I got a warning
(besides the C++ // comment):

gcc -I. -I./src -Ibld -DFOSSIL_DYNAMIC_BUILD=1 -I/usr/local/include
-std=c89   -g -O2 -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H -O2 -pipe
-o bld/sqlcmd.o -c bld/sqlcmd_.c
./src/sqlcmd.c: In function 'cmd_sqlite3':
./src/sqlcmd.c:207:3: warning: passing argument 1 of
'sqlite3_cancel_auto_extension' from incompatible pointer type [enabled by
default]
   sqlite3_cancel_auto_extension((void(*)(void))sqlcmd_autoinit);
   ^
In file included from ./src/config.h:173:0,
 from ./src/sqlcmd.c:23:
./src/sqlite3.h:5725:31: note: expected 'int (*)(struct sqlite3 *, char
**, const struct sqlite3_api_routines *)' but argument is of type 'void
(*)(void)'
 SQLITE_API int SQLITE_APICALL sqlite3_cancel_auto_extension(
   ^
./src/sqlcmd.c: In function 'fossil_open':
./src/sqlcmd.c:216:3: warning: passing argument 1 of
'sqlite3_auto_extension' from incompatible pointer type [enabled by default]
   sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit);
   ^
In file included from ./src/config.h:173:0,
 from ./src/sqlcmd.c:23:
./src/sqlite3.h:5711:31: note: expected 'int (*)(struct sqlite3 *, char
**, const struct sqlite3_api_routines *)' but argument is of type 'void
(*)(void)'
 SQLITE_API int SQLITE_APICALL sqlite3_auto_extension(
   ^

As a curiosity, when I compile using clang instead of gcc, I get the
following additional warning:

clang -I. -I./src -Ibld -DFOSSIL_DYNAMIC_BUILD=1 -I/usr/local/include
-std=c89   -g -O2 -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H -O2 -pipe
-DNDEBUG=1  -DSQLITE_OMIT_LOAD_EXTENSION=1
-DSQLITE_ENABLE_LOCKING_STYLE=0  -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1
-DSQLITE_THREADSAFE=0  -DSQLITE_DEFAULT_FILE_FORMAT=4
-DSQLITE_OMIT_DEPRECATED  -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-DSQLITE_ENABLE_FTS4  -DSQLITE_ENABLE_FTS3_PARENTHESIS
-DSQLITE_ENABLE_DBSTAT_VTAB  -DSQLITE_ENABLE_JSON1  -DSQLITE_ENABLE_FTS5
-c ./src/sqlite3.c -o bld/sqlite3.o
./src/sqlite3.c:108772:37: warning: redefinition of typedef
'sqlite3_api_routines' is a C11 feature [-Wtypedef-redefinition]
typedef struct sqlite3_api_routines sqlite3_api_routines;
^
./src/sqlite3.c:5970:37: note: previous definition is here
typedef struct sqlite3_api_routines sqlite3_api_routines;

Just my two cents...

BR,

Johan ^
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] some uglifications for diff.tcl

2016-07-31 Thread David Vines

The comment style problem in attach.c is my fault - I'll provide a fix
(I'm far too used to the // style of comment :)

Dave
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] some uglifications for diff.tcl

2016-07-31 Thread Kain Abel
Hi,

Thanks for the enhancements and the diff.tcl widget itself!

Here are some uglifications and "improvements" for src/diff.tcl.
Sorry for the ugly insertions, but maybe there is something useful.
Please note: I do not have great experience with TCL.

- (re)set ttk::style on Windows to winnative (ActiveTCL was used)
- adding a lazy exit on double hitting 
- adding a visual indicator for pressed Invert button
- make Search 'down' & 'up' more clickable
- adding a binding for [Search] (Ctrl+f)
- adding clumsy bindings (via catch {...}) for [Search down] (n) and
[Search up] (p)

Yet another small "problem". The C compiler with -std switch complains
about the comment style in file src/attach.c:91:
http://www.fossil-scm.org/fossil/artifact/3d0f4416538b9154333fba4717670584669bf9eb?txt=1&ln=91

With regards,
Kain


diff.tcl.patch
Description: Binary data
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users