larrykollar / tines

Tines is a console-based outliner/planner/notebook. It is a fork of the hnb outliner, which has not been updated in >10 years.
Other
49 stars 7 forks source link

Compile error on Cygwin #7

Closed larrykollar closed 7 years ago

larrykollar commented 8 years ago

Attempting to build Tines on Cygwin fails in prefs.c. The way ESCDELAY is implemented in Cygwin curses is the cause. Not sure what the workaround should be.

$ make
(cd src;make)
make[1]: Entering directory '/home/lkollar/tines/src'
cc -c -I. -Ilibcli -DHAVE_CONFIG_H -Wall -pedantic -g  -o prefs.o prefs.c
In file included from ui_cli.h:4:0,
                 from ui.h:8,
                 from prefs.c:28:
prefs.c: In function ‘init_prefs’:
prefs.c:82:35: error: lvalue required as unary ‘&’ operand
  cli_add_int ("escdelay", (long *)&ESCDELAY,
                                   ^
libcli/cli.h:47:22: note: in definition of macro ‘cli_add_int’
  cli_add_item (name, integer, NULL, NULL, usage)
                      ^
prefs.c: In function ‘write_default_prefs’:
prefs.c:101:3: warning: string length ‘18224’ is greater than the length ‘4095’ ISO C99 compilers are required to support [-Woverlength-strings]
   );
   ^
make[1]: *** [Makefile:8: prefs.o] Error 1
make[1]: Leaving directory '/home/lkollar/tines/src'
make: *** [Makefile:17: src/tines] Error 2

lkollar@LP-LKOLLAR-01 ~/tines
$
larrykollar commented 7 years ago

Fixed this for 1.11.0 by changing escdelay to a CLI command that sets the variable. The change is transparent to RC files.