subdir = .
DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
- INSTALL NEWS compile config.guess config.rpath config.sub \
- depcomp install-sh missing
+ $(srcdir)/config.h.in $(top_srcdir)/configure ABOUT-NLS \
+ AUTHORS COPYING ChangeLog INSTALL NEWS compile config.guess \
+ config.rpath config.sub depcomp install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
README \
README.html
-all: all-recursive
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh: Makefile
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then rm -f stamp-h1; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
mkid -fID $$unique
tags: TAGS
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
fi; \
fi
ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
exit 1; } >&2
check-am: all-am
check: check-recursive
-all-am: Makefile $(DATA)
+all-am: Makefile $(DATA) config.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(docdir)"; do \
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
uninstall-am: uninstall-dist_docDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ ctags-recursive install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-generic distclean-tags \
- distcleancheck distdir distuninstallcheck dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dist_docDATA install-dvi \
+ distcheck distclean distclean-generic distclean-hdr \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dist_docDATA install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
* added --version and --help options.
* added manpage.
* popup error dialog when .taskrc does not exist.
+ * added --debug.
v0.0.3
------
added manpage.\r
</p>\r
</li>\r
+<li>\r
+<p>\r
+popup error dialog when .taskrc does not exist.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+added --debug.\r
+</p>\r
+</li>\r
</ul></div>\r
</div>\r
</div>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2013-03-24 13:47:24 CET\r
+Last updated 2013-10-17 08:59:25 CEST\r
</div>\r
</div>\r
</body>\r
# Files that config.status was made for.
config_files=" Makefile po/Makefile.in src/Makefile src/glade/Makefile tests/Makefile"
+config_headers=" config.h"
config_commands=" depfiles po-directories"
ac_cs_usage="\
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
Configuration files:
$config_files
+Configuration headers:
+$config_headers
+
Configuration commands:
$config_commands
Report bugs to <jeanfi@gmail.com>.
ptask home page: <http://wpitchoune.net/ptask>."
-ac_cs_config=""
+ac_cs_config="'--prefix=/tmp'"
ac_cs_version="\
ptask config.status 0.0.x
configured by ./configure, generated by GNU Autoconf 2.69,
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
fi
if $ac_cs_recheck; then
- set X /bin/bash './configure' $ac_configure_extra_args --no-create --no-recursion
+ set X /bin/bash './configure' '--prefix=/tmp' $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
CONFIG_SHELL='/bin/bash'
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
S["ECHO_T"]=""
S["ECHO_N"]="-n"
S["ECHO_C"]=""
-S["DEFS"]="-DPACKAGE_NAME=\\\"ptask\\\" -DPACKAGE_TARNAME=\\\"ptask\\\" -DPACKAGE_VERSION=\\\"0.0.x\\\" -DPACKAGE_STRING=\\\"ptask\\ 0.0.x\\\" -DPACKAGE_BUGREPORT=\\\"jeanfi@gmai"\
-"l.com\\\" -DPACKAGE_URL=\\\"http://wpitchoune.net/ptask\\\" -DPACKAGE=\\\"ptask\\\" -DVERSION=\\\"0.0.x\\\" -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1"
+S["DEFS"]="-DHAVE_CONFIG_H"
S["mandir"]="${datarootdir}/man"
S["localedir"]="${datarootdir}/locale"
S["libdir"]="${exec_prefix}/lib"
S["sbindir"]="${exec_prefix}/sbin"
S["bindir"]="${exec_prefix}/bin"
S["program_transform_name"]="s,x,x,"
-S["prefix"]="/usr/local"
+S["prefix"]="/tmp"
S["exec_prefix"]="${prefix}"
S["PACKAGE_URL"]="http://wpitchoune.net/ptask"
S["PACKAGE_BUGREPORT"]="jeanfi@gmail.com"
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5
fi # test -n "$CONFIG_FILES"
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+D["PACKAGE_NAME"]=" \"ptask\""
+D["PACKAGE_TARNAME"]=" \"ptask\""
+D["PACKAGE_VERSION"]=" \"0.0.x\""
+D["PACKAGE_STRING"]=" \"ptask 0.0.x\""
+D["PACKAGE_BUGREPORT"]=" \"jeanfi@gmail.com\""
+D["PACKAGE_URL"]=" \"http://wpitchoune.net/ptask\""
+D["PACKAGE"]=" \"ptask\""
+D["VERSION"]=" \"0.0.x\""
+D["ENABLE_NLS"]=" 1"
+D["HAVE_GETTEXT"]=" 1"
+D["HAVE_DCGETTEXT"]=" 1"
+ for (key in D) D_is_set[key] = 1
+ FS = "\a"
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ {
+ line = $ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
-eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
shift
for ac_tag
do
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
-
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
:C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;}
+ac_config_headers="$ac_config_headers config.h"
+
# Checks for programs.
ac_ext=c
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
+DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
+config_headers="$ac_config_headers"
config_commands="$ac_config_commands"
_ACEOF
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
Configuration files:
$config_files
+Configuration headers:
+$config_headers
+
Configuration commands:
$config_commands
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
-eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = "\a"
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
shift
for ac_tag
do
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
-
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
:C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;}
top_srcdir = ..
-prefix = /usr/local
+prefix = /tmp
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
top_srcdir = ..
-prefix = /usr/local
+prefix = /tmp
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
bin_PROGRAMS = ptask
ptask_SOURCES = main.c \
+ log.c log.h \
note.c note.h \
+ ptime.c ptime.h \
tw.c tw.h
dist_man_MANS = ptask.1
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am_ptask_OBJECTS = main.$(OBJEXT) note.$(OBJEXT) tw.$(OBJEXT)
+am_ptask_OBJECTS = main.$(OBJEXT) log.$(OBJEXT) note.$(OBJEXT) \
+ ptime.$(OBJEXT) tw.$(OBJEXT)
ptask_OBJECTS = $(am_ptask_OBJECTS)
ptask_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I.@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
AM_LDFLAGS = -Wl,--as-needed -export-dynamic
AM_CPPFLAGS = -Wall -Werror $(GTK_CFLAGS) $(JSON_CFLAGS)
ptask_SOURCES = main.c \
+ log.c log.h \
note.c note.h \
+ ptime.c ptime.h \
tw.c tw.h
dist_man_MANS = ptask.1
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/note.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tw.Po@am__quote@
.c.o:
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
--- /dev/null
+/*
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#define _LARGEFILE_SOURCE 1
+#include "config.h"
+
+#include <locale.h>
+#include <libintl.h>
+#define _(str) gettext(str)
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include "log.h"
+#include "ptime.h"
+
+static FILE *file;
+int log_level = LOG_WARN;
+
+void log_open(const char *path)
+{
+ file = fopen(path, "a");
+
+ if (!file)
+ log_printf(LOG_ERR, _("Cannot open log file: %s"), path);
+}
+
+void log_close()
+{
+ if (!file)
+ return ;
+
+ fclose(file);
+
+ file = NULL;
+}
+
+
+#define LOG_BUFFER 4096
+static void vlogf(int lvl, const char *fmt, va_list ap)
+{
+ char buffer[1 + LOG_BUFFER];
+ char *lvl_str, *t;
+ FILE *stdf;
+
+ if (lvl > LOG_INFO && (!file || lvl > log_level))
+ return ;
+
+ vsnprintf(buffer, LOG_BUFFER, fmt, ap);
+ buffer[LOG_BUFFER] = '\0';
+
+ switch (lvl) {
+ case LOG_WARN:
+ lvl_str = "[WARN]";
+ break;
+ case LOG_ERR:
+ lvl_str = "[ERR]";
+ break;
+ case LOG_DEBUG:
+ lvl_str = "[DEBUG]";
+ break;
+ case LOG_INFO:
+ lvl_str = "[INFO]";
+ break;
+ default:
+ lvl_str = "[??]";
+ }
+
+ t = get_time_str();
+ if (!t)
+ return ;
+
+ if (file && lvl <= log_level) {
+ fprintf(file, "[%s] %s %s\n", t, lvl_str, buffer);
+ fflush(file);
+ } else {
+ t = NULL;
+ }
+
+ if (lvl <= LOG_INFO) {
+ if (lvl == LOG_WARN || lvl == LOG_ERR)
+ stdf = stderr;
+ else
+ stdf = stdout;
+
+
+ fprintf(stdf, "[%s] %s %s\n", t, lvl_str, buffer);
+ }
+
+ free(t);
+}
+
+void log_printf(int lvl, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vlogf(lvl, fmt, ap);
+ va_end(ap);
+}
+
+void log_debug(const char *fmt, ...)
+{
+ va_list ap;
+
+ if (log_level < LOG_DEBUG)
+ return ;
+
+ va_start(ap, fmt);
+ vlogf(LOG_DEBUG, fmt, ap);
+ va_end(ap);
+}
+
+void log_err(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vlogf(LOG_ERR, fmt, ap);
+ va_end(ap);
+}
+
+void log_warn(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vlogf(LOG_WARN, fmt, ap);
+ va_end(ap);
+}
+
+void log_info(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vlogf(LOG_INFO, fmt, ap);
+ va_end(ap);
+}
--- /dev/null
+/*
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#ifndef _PTASK_LOG_H_
+#define _PTASK_LOG_H_
+
+enum log_level {
+ LOG_ERR ,
+ LOG_WARN,
+ LOG_INFO,
+ LOG_DEBUG
+};
+
+void log_open(const char *path);
+
+void log_printf(int lvl, const char *fmt, ...);
+void log_debug(const char *fmt, ...);
+void log_err(const char *fmt, ...);
+void log_info(const char *fmt, ...);
+void log_warn(const char *fmt, ...);
+
+void log_close();
+
+/* level of the log file. */
+extern int log_level;
+
+#endif
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
+#include <sys/stat.h>
#include <json/json.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <config.h>
+
+#include "log.h"
#include "note.h"
#include "tw.h"
static struct option long_options[] = {
{"version", no_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
+ {"debug", required_argument, 0, 'd'},
{0, 0, 0, 0}
};
puts("");
+ puts(_(" -d, --debug=LEVEL "
+ "set the debug level, integer between 0 and 3"));
+
+ puts("");
+
printf(_("Report bugs to: %s\n"), PACKAGE_BUGREPORT);
puts("");
printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
GValue value = {0,};
const char *uuid;
- printf("get_selected_task\n");
+ log_debug("get_selected_task");
gtk_tree_view_get_cursor(treeview, &path, &cols);
int status;
const char *project;
- printf("refresh\n");
+ log_debug("refresh");
clear_task_panel();
status = gtk_combo_box_get_active(w_status);
- printf("status: %d\n", status);
+ log_debug("status: %d", status);
if (tasks)
tw_task_list_free(tasks);
gtk_list_store_set(GTK_LIST_STORE(model),
&iter,
COL_ID, (*tasks_cur)->id,
- COL_DESCRIPTION,
+ COL_DESCRIPTION,
(*tasks_cur)->description,
COL_PROJECT, project,
COL_UUID, (*tasks_cur)->uuid,
COL_PRIORITY, (*tasks_cur)->priority,
-1);
}
- }
- else {
+ } else {
dialog = gtk_message_dialog_new(NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
"correctly installed, and its"
" configuration file exist."
));
- gtk_dialog_run(GTK_DIALOG (dialog));
+ gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
- printf("refresh done\n");
+ log_debug("refresh done");
}
int taskdone_clicked_cbk(GtkButton *btn, gpointer data)
task = get_selected_task(GTK_TREE_VIEW(w_treeview));
- printf("tasksave_clicked_cbk %d\n", task->id);
+ log_debug("tasksave_clicked_cbk %d", task->id);
buf = gtk_text_view_get_buffer(w_note);
gtk_text_buffer_get_iter_at_offset(buf, &eIter, -1);
txt = gtk_text_buffer_get_text(buf, &sIter, &eIter, TRUE);
- printf("note=%s\n", txt);
+ log_debug("note=%s", txt);
if (!task->note || strcmp(txt, task->note))
note_put(task->uuid, txt);
tw_modify_project(task->uuid, ctxt);
priority = gtk_combo_box_get_active(w_priority);
- printf("priority: %d\n", priority);
+ log_debug("priority: %d", priority);
switch (priority) {
case 3:
int refresh_clicked_cbk(GtkButton *btn, gpointer data)
{
- printf("refresh_clicked_cbk\n");
+ log_debug("refresh_clicked_cbk");
refresh();
return FALSE;
GtkEntry *entry;
const char *ctxt;
- printf("newtask_clicked_cbk\n");
+ log_debug("newtask_clicked_cbk");
builder = gtk_builder_new();
gtk_builder_add_from_file
result = gtk_dialog_run(diag);
if (result == GTK_RESPONSE_ACCEPT) {
- printf("ok\n");
+ log_debug("ok");
entry = GTK_ENTRY(gtk_builder_get_object
(builder, "diag_tasknew_description"));
ctxt = gtk_entry_get_text(entry);
- printf("%s\n", ctxt);
+ log_debug("%s", ctxt);
tw_add(ctxt);
refresh();
} else {
- printf("cancel\n");
+ log_debug("cancel");
}
g_object_unref(G_OBJECT(builder));
static int status_changed_cbk(GtkComboBox *w, gpointer data)
{
- printf("status_changed_cbk\n");
+ log_debug("status_changed_cbk");
refresh();
return FALSE;
GtkTextBuffer *buf;
int priority;
- printf("cursor_changed_cbk\n");
+ log_debug("cursor_changed_cbk");
task = get_selected_task(treeview);
priority = priority_to_int(task->priority);
gtk_combo_box_set_active(w_priority, priority);
} else {
- printf("clear task widgets\n");
+ log_debug("clear task widgets");
clear_task_panel();
- printf("clear task widgets done\n");
+ log_debug("clear task widgets done");
}
return FALSE;
return 0;
}
+static void log_init()
+{
+ char *home, *path, *dir;
+
+ home = getenv("HOME");
+
+ if (!home)
+ return ;
+
+ dir = malloc(strlen(home)+1+strlen(".ptask")+1);
+ sprintf(dir, "%s/%s", home, ".ptask");
+ mkdir(dir, 0777);
+
+ path = malloc(strlen(dir)+1+strlen("log")+1);
+ sprintf(path, "%s/%s", dir, "log");
+
+ log_open(path);
+
+ free(dir);
+ free(path);
+}
+
int main(int argc, char **argv)
{
GtkWidget *window, *btn;
#endif
cmdok = 1;
- while ((optc = getopt_long(argc, argv, "vh", long_options,
+ while ((optc = getopt_long(argc, argv, "vhd:", long_options,
&opti)) != -1) {
switch (optc) {
case 'h':
case 'v':
print_version();
exit(EXIT_SUCCESS);
+ case 'd':
+ log_level = atoi(optarg);
+ log_info(_("Enables debug mode."));
+ break;
default:
cmdok = 0;
break;
exit(EXIT_FAILURE);
}
+ log_init();
+
gtk_init(NULL, NULL);
builder = gtk_builder_new();
gtk_builder_add_from_file
#include <sys/stat.h>
#include <sys/types.h>
+#include <log.h>
#include <note.h>
static char *get_path(const char *uuid)
home = getenv("HOME");
if (!home) {
- fprintf(stderr, "HOME environment variable not defined\n");
+ log_err("HOME environment variable not defined");
return NULL;
}
if (!path)
return ;
- printf("note_put %s %s %s\n", path, uuid, note);
+ log_debug("note_put %s %s %s", path, uuid, note);
f = fopen(path, "w");
fwrite(note, 1, strlen(note), f);
fclose(f);
} else {
- fprintf(stderr, "Failed to open %s\n", path);
+ log_err("Failed to open %s", path);
}
free(path);
}
fclose(f);
} else {
- fprintf(stderr, "Failed to open %s\n", path);
+ log_err("Failed to open %s", path);
}
return str;
--- /dev/null
+/*
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#include <stdlib.h>
+
+#include "ptime.h"
+
+char *time_to_str(time_t *t)
+{
+ struct tm lt;
+ char *str;
+
+ if (!localtime_r(t, <))
+ return NULL;
+
+ str = malloc(64);
+
+ if (strftime(str, 64, "%s", <)) {
+ return str;
+ } else {
+ free(str);
+ return NULL;
+ }
+}
+
+char *get_time_str()
+{
+ time_t t;
+
+ t = time(NULL);
+ return time_to_str(&t);
+}
--- /dev/null
+/*
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#ifndef _P_TIME_H
+#define _P_TIME_H
+
+#include <time.h>
+
+char *get_time_str();
+char *time_to_str(time_t *t);
+
+#endif
#include <json/json.h>
+#include <log.h>
#include "note.h"
#include "tw.h"
home = getenv("HOME");
if (!home) {
- fprintf(stderr, "HOME environment variable not defined\n");
+ log_err("HOME environment variable not defined");
return 0;
}
strcpy(cmd, "task rc.json.array=on ");
strcat(cmd, opts);
- printf("execute: %s\n", cmd);
+ log_debug("execute: %s", cmd);
f = popen(cmd, "r");
ret = pclose(f);
- if (ret == -1) {
- printf("pclose fails\n");
- perror("pclose");
- }
+ if (ret == -1)
+ log_err("pclose fails");
exit_free:
free(cmd);
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =