rofi-1.7.1/0000755000175100001710000000000014150243223007451 500000000000000rofi-1.7.1/m4/0000755000175100001710000000000014150243223007771 500000000000000rofi-1.7.1/m4/ax_compare_version.m40000644000175100001710000001465314150243117014051 00000000000000# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_compare_version.html # =========================================================================== # # SYNOPSIS # # AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # # DESCRIPTION # # This macro compares two version strings. Due to the various number of # minor-version numbers that can exist, and the fact that string # comparisons are not compatible with numeric comparisons, this is not # necessarily trivial to do in a autoconf script. This macro makes doing # these comparisons easy. # # The six basic comparisons are available, as well as checking equality # limited to a certain number of minor-version levels. # # The operator OP determines what type of comparison to do, and can be one # of: # # eq - equal (test A == B) # ne - not equal (test A != B) # le - less than or equal (test A <= B) # ge - greater than or equal (test A >= B) # lt - less than (test A < B) # gt - greater than (test A > B) # # Additionally, the eq and ne operator can have a number after it to limit # the test to that number of minor versions. # # eq0 - equal up to the length of the shorter version # ne0 - not equal up to the length of the shorter version # eqN - equal up to N sub-version levels # neN - not equal up to N sub-version levels # # When the condition is true, shell commands ACTION-IF-TRUE are run, # otherwise shell commands ACTION-IF-FALSE are run. The environment # variable 'ax_compare_version' is always set to either 'true' or 'false' # as well. # # Examples: # # AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) # AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) # # would both be true. # # AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) # AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) # # would both be false. # # AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) # # would be true because it is only comparing two minor versions. # # AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) # # would be true because it is only comparing the lesser number of minor # versions of the two values. # # Note: The characters that separate the version numbers do not matter. An # empty string is the same as version 0. OP is evaluated by autoconf, not # configure, so must be a string, not a variable. # # The author would like to acknowledge Guido Draheim whose advice about # the m4_case and m4_ifvaln functions make this macro only include the # portions necessary to perform the specific comparison specified by the # OP argument in the final configure script. # # LICENSE # # Copyright (c) 2008 Tim Toolan # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 12 dnl ######################################################################### AC_DEFUN([AX_COMPARE_VERSION], [ AC_REQUIRE([AC_PROG_AWK]) # Used to indicate true or false condition ax_compare_version=false # Convert the two version strings to be compared into a format that # allows a simple string comparison. The end result is that a version # string of the form 1.12.5-r617 will be converted to the form # 0001001200050617. In other words, each number is zero padded to four # digits, and non digits are removed. AS_VAR_PUSHDEF([A],[ax_compare_version_A]) A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ -e 's/[[^0-9]]//g'` AS_VAR_PUSHDEF([B],[ax_compare_version_B]) B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ -e 's/[[^0-9]]//g'` dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary dnl # then the first line is used to determine if the condition is true. dnl # The sed right after the echo is to remove any indented white space. m4_case(m4_tolower($2), [lt],[ ax_compare_version=`echo "x$A x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` ], [gt],[ ax_compare_version=`echo "x$A x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` ], [le],[ ax_compare_version=`echo "x$A x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` ], [ge],[ ax_compare_version=`echo "x$A x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` ],[ dnl Split the operator from the subversion count if present. m4_bmatch(m4_substr($2,2), [0],[ # A count of zero means use the length of the shorter version. # Determine the number of characters in A and B. ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'` ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'` # Set A to no more than B's length and B to no more than A's length. A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` ], [[0-9]+],[ # A count greater than zero means use only that many subversions A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` ], [.+],[ AC_WARNING( [illegal OP numeric parameter: $2]) ],[]) # Pad zeros at end of numbers to make same length. ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" B="$B`echo $A | sed 's/./0/g'`" A="$ax_compare_version_tmp_A" # Check for equality or inequality as necessary. m4_case(m4_tolower(m4_substr($2,0,2)), [eq],[ test "x$A" = "x$B" && ax_compare_version=true ], [ne],[ test "x$A" != "x$B" && ax_compare_version=true ],[ AC_WARNING([illegal OP parameter: $2]) ]) ]) AS_VAR_POPDEF([A])dnl AS_VAR_POPDEF([B])dnl dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. if test "$ax_compare_version" = "true" ; then m4_ifvaln([$4],[$4],[:])dnl m4_ifvaln([$5],[else $5])dnl fi ]) dnl AX_COMPARE_VERSION rofi-1.7.1/m4/ax_prog_flex_version.m40000644000175100001710000000374614150243117014411 00000000000000# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_prog_flex_version.html # =========================================================================== # # SYNOPSIS # # AX_PROG_FLEX_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE]) # # DESCRIPTION # # Makes sure that flex version is greater or equal to the version # indicated. If true the shell commands in ACTION-IF-TRUE are executed. If # not the shell commands in commands in ACTION-IF-TRUE are executed. If # not the shell commands in ACTION-IF-FALSE are run. Note if $FLEX is not # set (for example by running AC_CHECK_PROG or AC_PATH_PROG) the macro # will fail. # # Example: # # AC_PATH_PROG([FLEX],[flex]) # AX_PROG_FLEX_VERSION([2.5.39],[ ... ],[ ... ]) # # This will check to make sure that the flex you have is at least version # 2.5.39 or greater. # # NOTE: This macro uses the $FLEX variable to perform the check. # # LICENSE # # Copyright (c) 2015 Jonathan Rajotte-Julien # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 2 AC_DEFUN([AX_PROG_FLEX_VERSION],[ AC_REQUIRE([AC_PROG_SED]) AC_REQUIRE([AC_PROG_GREP]) AS_IF([test -n "$FLEX"],[ ax_flex_version="$1" AC_MSG_CHECKING([for flex version]) changequote(<<,>>) flex_version=`$FLEX --version 2>&1 \ | $SED -n -e '/flex /s/.* (\{0,1\}\([0-9]*\.[0-9]*\.[0-9]*\))\{0,1\}.*/\1/;p'` changequote([,]) AC_MSG_RESULT($flex_version) AC_SUBST([FLEX_VERSION],[$flex_version]) AX_COMPARE_VERSION([$flex_version],[ge],[$ax_flex_version],[ : $2 ],[ : $3 ]) ],[ AC_MSG_WARN([could not find flex]) $3 ]) ]) rofi-1.7.1/aclocal.m40000644000175100001710000017212114150243200011230 00000000000000# generated automatically by aclocal 1.16.1 -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Configure paths for GLIB # Owen Taylor 1997-2001 # Increment this whenever this file is changed. #serial 3 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, dnl gthread, or gio is specified in MODULES, pass to pkg-config dnl AC_DEFUN([AM_PATH_GLIB_2_0], [dnl dnl Get the cflags and libraries from pkg-config dnl dnl We can't use PKG_PREREQ because that needs 0.29. m4_ifndef([PKG_PROG_PKG_CONFIG], [pkg.m4 version 0.28 or later is required]) AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], , enable_glibtest=yes) min_glib_version=ifelse([$1], [], [2.0.0], [$1]) pkg_config_args="glib-2.0 >= $min_glib_version" for module in . $4 do case "$module" in gmodule) pkg_config_args="$pkg_config_args gmodule-2.0" ;; gmodule-no-export) pkg_config_args="$pkg_config_args gmodule-no-export-2.0" ;; gobject) pkg_config_args="$pkg_config_args gobject-2.0" ;; gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; gio*) pkg_config_args="$pkg_config_args $module-2.0" ;; esac done PKG_PROG_PKG_CONFIG([0.16]) no_glib="" if test "x$PKG_CONFIG" = x ; then no_glib=yes PKG_CONFIG=no fi dnl For GLIB_CFLAGS and GLIB_LIBS PKG_CHECK_MODULES([GLIB], [$pkg_config_args], [:], [:]) dnl For the tools PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.0], [glib_genmarshal]) PKG_CHECK_VAR([GOBJECT_QUERY], [glib-2.0], [gobject_query]) PKG_CHECK_VAR([GLIB_MKENUMS], [glib-2.0], [glib_mkenums]) PKG_CHECK_VAR([GLIB_COMPILE_RESOURCES], [gio-2.0], [glib_compile_resources]) AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" enable_glibtest=no fi if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then : else no_glib=yes fi fi if test x"$no_glib" = x ; then glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" dnl dnl Now check if the installed GLIB is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.glibtest AC_TRY_RUN([ #include #include #include int main (void) { unsigned int major, minor, micro; fclose (fopen ("conf.glibtest", "w")); if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://www.freedesktop.org/software/pkgconfig/" else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" AC_TRY_LINK([ #include #include ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" GLIB_GENMARSHAL="" GOBJECT_QUERY="" GLIB_MKENUMS="" GLIB_COMPILE_RESOURCES="" ifelse([$3], , :, [$3]) fi rm -f conf.glibtest ]) dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29.1) dnl dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR # Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _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"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([subprojects/libgwater/libgwater.m4]) m4_include([subprojects/libnkutils/libnkutils.m4]) rofi-1.7.1/include/0000755000175100001710000000000014150243223011074 500000000000000rofi-1.7.1/include/theme.h0000644000175100001710000003037614150243117012302 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef THEME_H #define THEME_H #include "rofi-types.h" #include #include #include /** * Describe the media constraint type. */ typedef enum { /** Minimum width constraint. */ THEME_MEDIA_TYPE_MIN_WIDTH, /** Maximum width constraint. */ THEME_MEDIA_TYPE_MAX_WIDTH, /** Minimum height constraint. */ THEME_MEDIA_TYPE_MIN_HEIGHT, /** Maximum height constraint. */ THEME_MEDIA_TYPE_MAX_HEIGHT, /** Monitor id constraint. */ THEME_MEDIA_TYPE_MON_ID, /** Minimum aspect ratio constraint. */ THEME_MEDIA_TYPE_MIN_ASPECT_RATIO, /** Maximum aspect ratio constraint. */ THEME_MEDIA_TYPE_MAX_ASPECT_RATIO, /** Invalid entry. */ THEME_MEDIA_TYPE_INVALID, } ThemeMediaType; /** * Theme Media description. */ typedef struct ThemeMedia { ThemeMediaType type; double value; } ThemeMedia; /** * ThemeWidget. */ typedef struct ThemeWidget { int set; char *name; unsigned int num_widgets; struct ThemeWidget **widgets; ThemeMedia *media; GHashTable *properties; struct ThemeWidget *parent; } ThemeWidget; /** * Global pointer to the current active theme. */ extern ThemeWidget *rofi_theme; /** * Used to store theme. */ extern ThemeWidget *rofi_theme; /** * Used to store config options. */ extern ThemeWidget *rofi_configuration; /** * @param base Handle to the current level in the theme. * @param name Name of the new element. * * Create a new element in the theme structure. * * @returns handle to the new entry. */ ThemeWidget *rofi_theme_find_or_create_name(ThemeWidget *base, const char *name); /** * @param widget The widget handle. * * Print out the widget to the commandline. */ void rofi_theme_print(ThemeWidget *widget); /** * @param widget The widget handle. * @param index The indenting index. * * Print out the widget to the commandline indented by index. */ void rofi_theme_print_index(ThemeWidget *widget, int index); /** * @param type The type of the property to create. * * Create a theme property of type. * * @returns a new property. */ Property *rofi_theme_property_create(PropertyType type); /** * @param p The property to free. * * Free the content of the property. */ void rofi_theme_property_free(Property *p); /** * @param p The property to free. * * @returns a copy of p */ Property *rofi_theme_property_copy(const Property *p); /** * @param widget * * Free the widget and alll children. */ void rofi_theme_free(ThemeWidget *widget); /** * @param file filename to parse. * * Parse the input theme file. * * @returns returns TRUE when error. */ gboolean rofi_theme_parse_file(const char *file); /** * @param string to parse. * * Parse the input string in addition to theme file. * * @returns returns TRUE when error. */ gboolean rofi_theme_parse_string(const char *string); /** * @param widget The widget handle. * @param table HashTable containing properties set. * * Merge properties with widgets current property. */ void rofi_theme_widget_add_properties(ThemeWidget *widget, GHashTable *table); /** * Public API */ /** * @param widget The widget to query * @param property The property to query. * @param def The default value. * * Obtain the distance of the widget. * * @returns The distance value of this property for this widget. */ RofiDistance rofi_theme_get_distance(const widget *widget, const char *property, int def); /** * @param widget The widget to query * @param property The property to query. * @param def The default value. * * Obtain the integer of the widget. * * @returns The integer value of this property for this widget. */ int rofi_theme_get_integer(const widget *widget, const char *property, int def); /** * @param widget The widget to query * @param property The property to query. * @param def The default value. * * Obtain the position of the widget. * * @returns The position value of this property for this widget. */ int rofi_theme_get_position(const widget *widget, const char *property, int def); /** * @param widget The widget to query * @param property The property to query. * @param def The default value. * * Obtain the boolean of the widget. * * @returns The boolean value of this property for this widget. */ int rofi_theme_get_boolean(const widget *widget, const char *property, int def); /** * @param widget The widget to query * @param property The property to query. * @param def The default value. * * Obtain the orientation indicated by %property of the widget. * * @returns The orientation of this property for this widget or %def not found. */ RofiOrientation rofi_theme_get_orientation(const widget *widget, const char *property, RofiOrientation def); /** * @param widget The widget to query * @param property The property to query. * @param def The default value. * * Obtain the cursor indicated by %property of the widget. * * @returns The cursor for this widget or %def if not found. */ RofiCursorType rofi_theme_get_cursor_type(const widget *widget, const char *property, RofiCursorType def); /** * @param widget The widget to query * @param property The property to query. * @param def The default value. * * Obtain the string of the widget. * * @returns The string value of this property for this widget. */ const char *rofi_theme_get_string(const widget *widget, const char *property, const char *def); /** * @param widget The widget to query * @param property The property to query. * @param def The default value. * * Obtain the double of the widget. * * @returns The double value of this property for this widget. */ double rofi_theme_get_double(const widget *widget, const char *property, double def); /** * @param widget The widget to query * @param property The property to query. * @param d The drawable to apply color. * * Obtain the color of the widget and applies this to the drawable d. * */ void rofi_theme_get_color(const widget *widget, const char *property, cairo_t *d); /** * @param widget The widget to query * @param property The property to query. * @param d The drawable to apply color. * * Obtain the image of the widget and applies this to the drawable d. * * @return true if image is set. */ gboolean rofi_theme_get_image(const widget *widget, const char *property, cairo_t *d); /** * @param widget The widget to query * @param property The property to query. * * Check if a rofi theme has a property set. * */ gboolean rofi_theme_has_property(const widget *widget, const char *property); /** * @param widget The widget to query * @param property The property to query. * @param pad The default value. * * Obtain the padding of the widget. * * @returns The padding of this property for this widget. */ RofiPadding rofi_theme_get_padding(const widget *widget, const char *property, RofiPadding pad); /** * @param widget The widget to query * @param property The property to query. * @param th The default value. * * Obtain the highlight . * * @returns The highlight of this property for this widget. */ RofiHighlightColorStyle rofi_theme_get_highlight(widget *widget, const char *property, RofiHighlightColorStyle th); /** * @param d The distance handle. * @param ori The orientation. * * Convert RofiDistance into pixels. * @returns the number of pixels this distance represents. */ int distance_get_pixel(RofiDistance d, RofiOrientation ori); /** * @param d The distance handle. * @param draw The cairo drawable. * * Set linestyle. */ void distance_get_linestyle(RofiDistance d, cairo_t *draw); /** * Low-level functions. * These can be used by non-widgets to obtain values. */ /** * @param name The name of the element to find. * @param state The state of the element. * @param exact If the match should be exact, or parent can be included. * * Find the theme element. If not exact, the closest specified element is * returned. * * @returns the ThemeWidget if found, otherwise NULL. */ ThemeWidget *rofi_theme_find_widget(const char *name, const char *state, gboolean exact); /** * @param name The name of the element to find. * @param state The state of the element. * @param exact If the match should be exact, or parent can be included. * * Find the configuration element. If not exact, the closest specified element * is returned. * * @returns the ThemeWidget if found, otherwise NULL. */ ThemeWidget *rofi_config_find_widget(const char *name, const char *state, gboolean exact); /** * @param widget The widget to find the property on. * @param type The %PropertyType to find. * @param property The property to find. * @param exact If the property should only be found on this widget, or on * parents if not found. * * Find the property on the widget. If not exact, the parents are searched * recursively until match is found. * * @returns the Property if found, otherwise NULL. */ Property *rofi_theme_find_property(ThemeWidget *widget, PropertyType type, const char *property, gboolean exact); /** * @param widget The widget to query * @param property The property to query. * @param defaults The default value. * * Obtain list of elements (strings) of the widget. * * @returns a GList holding the names in the list of this property for this * widget. */ GList *rofi_theme_get_list(const widget *widget, const char *property, const char *defaults); /** * Checks if a theme is set, or is empty. * @returns TRUE when empty. */ gboolean rofi_theme_is_empty(void); /** * Reset the current theme. */ void rofi_theme_reset(void); /** * @param file File name to prepare. * @param parent_file Filename of parent file. * * Tries to find full path relative to parent file. * * @returns full path to file. */ char *rofi_theme_parse_prepare_file(const char *file, const char *parent_file); /** * Process conditionals. */ void rofi_theme_parse_process_conditionals(void); /** * @param parent target theme tree * @param child source theme three * * Merge all the settings from child into parent. */ void rofi_theme_parse_merge_widgets(ThemeWidget *parent, ThemeWidget *child); /** * @param type the media type to parse. * * Returns the media type described by type. */ ThemeMediaType rofi_theme_parse_media_type(const char *type); /** * @param distance The distance object to copy. * * @returns a copy of the distance. */ RofiDistance rofi_theme_property_copy_distance(RofiDistance const distance); /** * @param filename The file to validate. * * @returns the program exit code. */ int rofi_theme_rasi_validate(const char *filename); #endif rofi-1.7.1/include/view.h0000644000175100001710000002117514150243117012147 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_VIEW_H #define ROFI_VIEW_H #include "mode.h" #include /** * @defgroup View View * * The rofi Menu view. * @{ * @} */ /** * @defgroup ViewHandle ViewHandle * @ingroup View * * @{ */ typedef struct RofiViewState RofiViewState; typedef enum { /** Create a menu for entering text */ MENU_NORMAL = 0, /** Create a menu for entering passwords */ MENU_PASSWORD = 1, /** Create amanaged window. */ MENU_NORMAL_WINDOW = 2, /** ERROR dialog */ MENU_ERROR_DIALOG = 4, /** INDICATOR */ MENU_INDICATOR = 8, } MenuFlags; /** * @param sw the Mode to show. * @param input A pointer to a string where the inputted data is placed. * @param menu_flags Flags indicating state of the menu. * @param finalize the finalize callback * * Main menu callback. * * @returns The command issued (see MenuReturn) */ RofiViewState *rofi_view_create(Mode *sw, const char *input, MenuFlags menu_flags, void (*finalize)(RofiViewState *)); /** * @param state The Menu Handle * * Check if a finalize function is set, and if sets executes it. */ void rofi_view_finalize(RofiViewState *state); /** * @param state the Menu handle * * Get the return value associated to the users action. * * @returns the return value */ MenuReturn rofi_view_get_return_value(const RofiViewState *state); /** * @param state the Menu handle * * Returns the index of the next visible position. * * @return the next position. */ unsigned int rofi_view_get_next_position(const RofiViewState *state); /** * @param state the Menu handle * @param text The text to add to the input box * * Update the state if needed. */ void rofi_view_handle_text(RofiViewState *state, char *text); /** * @param state the Menu handle * @param x The X coordinates of the motion * @param y The Y coordinates of the motion * @param find_mouse_target if we should handle pure mouse motion * * Update the state if needed. */ void rofi_view_handle_mouse_motion(RofiViewState *state, gint x, gint y, gboolean find_mouse_target); /** * @param state the Menu handle * * Update the state if needed. */ void rofi_view_maybe_update(RofiViewState *state); void rofi_view_temp_configure_notify(RofiViewState *state, xcb_configure_notify_event_t *xce); void rofi_view_temp_click_to_exit(RofiViewState *state, xcb_window_t target); /** * Update the state if needed. */ void rofi_view_frame_callback(void); /** * @param state the Menu handle * * @returns returns if this state is completed. */ unsigned int rofi_view_get_completed(const RofiViewState *state); /** * @param state the Menu handle * * @returns the raw user input. */ const char *rofi_view_get_user_input(const RofiViewState *state); /** * @param state The Menu Handle * @param selected_line The line to select. * * Select a line. */ void rofi_view_set_selected_line(RofiViewState *state, unsigned int selected_line); /** * @param state The Menu Handle * * Get the selected line. * * @returns the selected line or UINT32_MAX if none selected. */ unsigned int rofi_view_get_selected_line(const RofiViewState *state); /** * @param state The Menu Handle * * Restart the menu so it can be displayed again. * Resets RofiViewState::quit and RofiViewState::retv. */ void rofi_view_restart(RofiViewState *state); /** * @param state The handle to the view * @param scope The scope of the action * @param action The action * * @returns TRUE if action was handled. */ gboolean rofi_view_check_action(RofiViewState *state, BindingsScope scope, guint action); /** * @param state The handle to the view * @param scope The scope of the action * @param action The action */ void rofi_view_trigger_action(RofiViewState *state, BindingsScope scope, guint action); /** * @param state The handle to the view * * Free's the memory allocated for this handle. * After a call to this function, state is invalid and can no longer be used. */ void rofi_view_free(RofiViewState *state); /** @} */ /** * @defgroup ViewGlobal ViewGlobal * @ingroup View * * Global menu view functions. * These do not work on the view itself but modifies the global state. * @{ */ /** * Get the current active view Handle. * * @returns the active view handle or NULL */ RofiViewState *rofi_view_get_active(void); /** * @param state the new active view handle. * * Set the current active view Handle, If NULL passed a queued view is popped * from stack. * */ void rofi_view_set_active(RofiViewState *state); /** * @param state remove view handle. * * remove state handle from queue, if current view, pop view from * stack. * */ void rofi_view_remove_active(RofiViewState *state); /** * @param msg The error message to show. * @param markup The error message uses pango markup. * * The error message to show. */ int rofi_view_error_dialog(const char *msg, int markup); /** * Queue a redraw. * This triggers a X11 Expose Event. */ void rofi_view_queue_redraw(void); /** * Cleanup internal data of the view. */ void rofi_view_cleanup(void); /** * @param state The handle to the view * * Get the mode currently displayed by the view. * * @returns the mode currently displayed by the view */ Mode *rofi_view_get_mode(RofiViewState *state); /** * Unmap the current view. */ void rofi_view_hide(void); /** * Indicate the current view needs to reload its data. * This can only be done when *more* information is available. * * The reloading happens 'lazy', multiple calls might be handled at once. */ void rofi_view_reload(void); /** * @param state The handle to the view * @param mode The new mode to display * * Change the current view to show a different mode. */ void rofi_view_switch_mode(RofiViewState *state, Mode *mode); /** * @param state The handle to the view * @param text An UTF-8 encoded character array with the text to overlay. * * Overlays text over the current view. Passing NULL for text hides the overlay. */ void rofi_view_set_overlay(RofiViewState *state, const char *text); /** * @param state The handle to the view. * * Clears the user entry box, set selected to 0. */ void rofi_view_clear_input(RofiViewState *state); /** * @param menu_flags The state of the new window. * * Creates the internal 'Cached' window that gets reused between views. * TODO: Internal call to view exposed. */ void __create_window(MenuFlags menu_flags); /** * Get the handle of the main window. * * @returns the xcb_window_t for rofi's view or XCB_WINDOW_NONE. */ xcb_window_t rofi_view_get_window(void); /** @} */ /** * @defgroup ViewThreadPool ViewThreadPool * @ingroup View * * The view can (optionally) keep a set of worker threads around to parallize * work. This includes filtering and sorting. * * @{ */ /** * Initialize the threadpool */ void rofi_view_workers_initialize(void); /** * Stop all threads and free the resources used by the threadpool */ void rofi_view_workers_finalize(void); /** * @param width the width of the monitor. * @param height the height of the monitor. * * Return the current monitor workarea. * */ void rofi_view_get_current_monitor(int *width, int *height); /** * Takes a screenshot. */ void rofi_capture_screenshot(void); /** * Set the window title. */ void rofi_view_set_window_title(const char *title); /** * set ellipsize mode to start. */ void rofi_view_ellipsize_start(RofiViewState *state); /** @} */ #endif rofi-1.7.1/include/keyb.h0000644000175100001710000001026614150243117012126 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_KEYB_H #define ROFI_KEYB_H #include #include /** * @defgroup KEYB KeyboardBindings * * @{ */ /** * List of all scopes the mouse can interact on. */ typedef enum { SCOPE_GLOBAL, SCOPE_MOUSE_LISTVIEW, SCOPE_MOUSE_LISTVIEW_ELEMENT, #define SCOPE_MIN_FIXED SCOPE_MOUSE_EDITBOX SCOPE_MOUSE_EDITBOX, SCOPE_MOUSE_SCROLLBAR, SCOPE_MOUSE_MODE_SWITCHER, #define SCOPE_MAX_FIXED SCOPE_MOUSE_MODE_SWITCHER } BindingsScope; /** * List of all possible actions that can be triggered by a keybinding. */ typedef enum { /** Paste from primary clipboard */ PASTE_PRIMARY = 1, /** Paste from secondary clipboard */ PASTE_SECONDARY, /** Clear the entry box. */ CLEAR_LINE, /** Move to front of text */ MOVE_FRONT, /** Move to end of text */ MOVE_END, /** Move on word back */ MOVE_WORD_BACK, /** Move on word forward */ MOVE_WORD_FORWARD, /** Move character back */ MOVE_CHAR_BACK, /** Move character forward */ MOVE_CHAR_FORWARD, /** Remove previous word */ REMOVE_WORD_BACK, /** Remove next work */ REMOVE_WORD_FORWARD, /** Remove next character */ REMOVE_CHAR_FORWARD, /** Remove previous character */ REMOVE_CHAR_BACK, /** Remove till EOL */ REMOVE_TO_EOL, /** Remove till SOL */ REMOVE_TO_SOL, /** Accept the current selected entry */ ACCEPT_ENTRY, ACCEPT_ALT, ACCEPT_CUSTOM, ACCEPT_CUSTOM_ALT, MODE_NEXT, MODE_COMPLETE, MODE_PREVIOUS, TOGGLE_CASE_SENSITIVITY, DELETE_ENTRY, ROW_LEFT, ROW_RIGHT, ROW_UP, ROW_DOWN, ROW_TAB, PAGE_PREV, PAGE_NEXT, ROW_FIRST, ROW_LAST, ROW_SELECT, CANCEL, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8, CUSTOM_9, CUSTOM_10, CUSTOM_11, CUSTOM_12, CUSTOM_13, CUSTOM_14, CUSTOM_15, CUSTOM_16, CUSTOM_17, CUSTOM_18, CUSTOM_19, SCREENSHOT, CHANGE_ELLIPSIZE, TOGGLE_SORT, SELECT_ELEMENT_1, SELECT_ELEMENT_2, SELECT_ELEMENT_3, SELECT_ELEMENT_4, SELECT_ELEMENT_5, SELECT_ELEMENT_6, SELECT_ELEMENT_7, SELECT_ELEMENT_8, SELECT_ELEMENT_9, SELECT_ELEMENT_10, } KeyBindingAction; /** * Actions mouse can take on the ListView. */ typedef enum { SCROLL_LEFT = 1, SCROLL_RIGHT, SCROLL_DOWN, SCROLL_UP, } MouseBindingListviewAction; /** * Actions mouse can take on the ListView element. */ typedef enum { SELECT_HOVERED_ENTRY = 1, ACCEPT_HOVERED_ENTRY, ACCEPT_HOVERED_CUSTOM, } MouseBindingListviewElementAction; /** * Default mouse actions. */ typedef enum { MOUSE_CLICK_DOWN = 1, MOUSE_CLICK_UP, MOUSE_DCLICK_DOWN, MOUSE_DCLICK_UP, } MouseBindingMouseDefaultAction; /** * Parse the keybindings. * This should be called after the setting system is initialized. */ gboolean parse_keys_abe(NkBindings *bindings); /** * Setup the keybindings * This adds all the entries to the settings system. */ void setup_abe(void); /** * @param name Don't have the name. * * @returns id, or UINT32_MAX if not found. */ guint key_binding_get_action_from_name(const char *name); /**@}*/ #endif // ROFI_KEYB_H rofi-1.7.1/include/css-colors.h0000644000175100001710000000123014150243117013252 00000000000000#ifndef ROFI_INCLUDE_CSS_COLORS_H #define ROFI_INCLUDE_CSS_COLORS_H #include /** * @defgroup CSSCOLORS CssColors * @ingroup HELPERS * * Lookup table for CSS 4.0 named colors. Like `Navo`. * * @{ */ /** * Structure of colors. */ typedef struct CSSColor { /** CSS name of the color. */ char *name; /** BGRA 8 bit color components. */ uint8_t b, g, r, a; } CSSColor; /** * Array with all the named colors. Of type #CSSColor, there are #num_CSSColors * items in this array. */ extern const CSSColor CSSColors[]; /** * Number of named colors. */ extern const unsigned int num_CSSColors; /** @} */ #endif // ROFI_INCLUDE_CSS_COLORS_H rofi-1.7.1/include/rofi-icon-fetcher.h0000644000175100001710000000401714150243117014474 00000000000000#ifndef ROFI_ICON_FETCHER_H #define ROFI_ICON_FETCHER_H #include #include #include /** * @defgroup ICONFETCHER IconFetcher * @ingroup HELPERS * * Small helper of to fetch icons. This makes use of the 'view' threadpool. * @{ */ /** * Initialize the icon fetcher. */ void rofi_icon_fetcher_init(void); /** * Destroy and free the memory used by the icon fetcher. */ void rofi_icon_fetcher_destroy(void); /** * @param name The name of the icon to fetch. * @param size The size of the icon to fetch. * * Query the icon-theme for icon with name and size. * The returned icon will be the best match for the requested size, it should * still be resized to the actual size. * * name can also be a full path, if prefixed with file://. * * @returns the uid identifying the request. */ uint32_t rofi_icon_fetcher_query(const char *name, const int size); /** * @param name The name of the icon to fetch. * @param wsize The width of the icon to fetch. * @param hsize The height of the icon to fetch. * * Query the icon-theme for icon with name and size. * The returned icon will be the best match for the requested size, it should * still be resized to the actual size. For icons it will take the min of wsize * and hsize. * * name can also be a full path, if prefixed with file://. * * @returns the uid identifying the request. */ uint32_t rofi_icon_fetcher_query_advanced(const char *name, const int wsize, const int hsize); /** * @param uid The unique id representing the matching request. * * If the surface is used, the user should reference the surface. * * @returns the surface with the icon, NULL when not found. */ cairo_surface_t *rofi_icon_fetcher_get(const uint32_t uid); /** * @param path the image path to check. * * Checks if a file is a supported image. (by looking at extension). * * @returns true if image, false otherwise. */ gboolean rofi_icon_fetcher_file_is_image(const char *const path); /** @} */ #endif // ROFI_ICON_FETCHER_H rofi-1.7.1/include/widgets/0000755000175100001710000000000014150243223012542 500000000000000rofi-1.7.1/include/widgets/container.h0000644000175100001710000000353314150243117014623 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_CONTAINER_H #define ROFI_CONTAINER_H #include "widget.h" /** * @defgroup container container * @ingroup widget * * * @{ */ /** * Abstract handle to the container widget internal state. */ typedef struct _container container; /** * @param parent The widget's parent * @param name The name of the widget. * * @returns a newly created container, free with #widget_free */ container *container_create(widget *parent, const char *name); /** * @param container Handle to the container widget. * @param child Handle to the child widget to pack. * * Add a widget to the container. */ void container_add(container *container, widget *child); /**@}*/ #endif // ROFI_CONTAINER_H rofi-1.7.1/include/widgets/widget.h0000644000175100001710000002501314150243117014121 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_WIDGET_H #define ROFI_WIDGET_H #include "keyb.h" #include #include #include #include /** * @defgroup widget widget * * Generic abstract widget class. Widgets should 'inherit' from this class * (first structure in there structure should be widget). The generic widget * implements generic functions like get_width, get_height, draw, resize, * update, free and clicked. It also holds information about how the widget * should be packed. * * @{ */ /** * Abstract structure holding internal state of a widget. * Structure is elaborated in widget-internal.h */ typedef struct _widget widget; /** * Type of the widget. It is used to bubble events to the relevant widget. */ typedef enum { /** Default type */ WIDGET_TYPE_UNKNOWN, /** The listview widget */ WIDGET_TYPE_LISTVIEW = SCOPE_MOUSE_LISTVIEW, /** An element in the listview */ WIDGET_TYPE_LISTVIEW_ELEMENT = SCOPE_MOUSE_LISTVIEW_ELEMENT, /** The input bar edit box */ WIDGET_TYPE_EDITBOX = SCOPE_MOUSE_EDITBOX, /** The listview scrollbar */ WIDGET_TYPE_SCROLLBAR = SCOPE_MOUSE_SCROLLBAR, /** A widget allowing user to swithc between modi */ WIDGET_TYPE_MODE_SWITCHER = SCOPE_MOUSE_MODE_SWITCHER, /** Text-only textbox */ WIDGET_TYPE_TEXTBOX_TEXT, } WidgetType; /** * Whether and how the action was handled */ typedef enum { /** The action was ignore and should bubble */ WIDGET_TRIGGER_ACTION_RESULT_IGNORED, /** The action was handled directly */ WIDGET_TRIGGER_ACTION_RESULT_HANDLED, /** The action was handled and should start the grab for motion events */ WIDGET_TRIGGER_ACTION_RESULT_GRAB_MOTION_BEGIN, /** The action was handled and should stop the grab for motion events */ WIDGET_TRIGGER_ACTION_RESULT_GRAB_MOTION_END, } WidgetTriggerActionResult; /** * @param widget The container widget itself * @param type The widget type searched for * @param x The X coordination of the mouse event relative to @param widget * @param y The Y coordination of the mouse event relative to @param widget * * This callback must only iterate over the children of a Widget, and return * NULL if none of them is relevant. * * @returns A child widget if found, NULL otherwise */ typedef widget *(*widget_find_mouse_target_cb)(widget *widget, WidgetType type, gint x, gint y); /** * @param widget The target widget * @param action The action value (which enum it is depends on the widget type) * @param x The X coordination of the mouse event relative to @param widget * @param y The Y coordination of the mouse event relative to @param widget * @param user_data The data passed to widget_set_trigger_action_handler() * * This callback should handle the action if relevant, and returns whether it * did or not. * * @returns Whether the action was handled or not, see enum values for details */ typedef WidgetTriggerActionResult (*widget_trigger_action_cb)(widget *widget, guint action, gint x, gint y, void *user_data); /** Macro to get widget from an implementation (e.g. textbox/scrollbar) */ #define WIDGET(a) ((widget *)(a)) /** * @param widget The widget to check * @param x The X position relative to parent window * @param y the Y position relative to parent window * * Check if x,y falls within the widget. * * @return TRUE if x,y falls within the widget */ int widget_intersect(const widget *widget, int x, int y); /** * @param widget The widget to move * @param x The new X position relative to parent window * @param y The new Y position relative to parent window * * Moves the widget. */ void widget_move(widget *widget, short x, short y); /** * @param widget Handle to widget * * Get the type of the widget. * @returns The type of the widget. */ WidgetType widget_type(widget *widget); /** * @param widget Handle to widget * @param type The widget type. * * Set the widget type. */ void widget_set_type(widget *widget, WidgetType type); /** * @param widget Handle to widget * * Check if widget is enabled. * @returns TRUE when widget is enabled. */ gboolean widget_enabled(widget *widget); /** * @param widget Handle to widget * @param enabled The new state * * Disable the widget. */ void widget_set_enabled(widget *widget, gboolean enabled); /** * @param widget Handle to widget * * Disable the widget. */ static inline void widget_disable(widget *widget) { widget_set_enabled(widget, FALSE); } /** * @param widget Handle to widget * * Enable the widget. */ static inline void widget_enable(widget *widget) { widget_set_enabled(widget, TRUE); } /** * @param widget widget Handle to the widget * @param d The cairo object used to draw itself. * * Render the textbox. */ void widget_draw(widget *widget, cairo_t *d); /** * @param wid Handle to the widget * * Free the widget and all allocated memory. */ void widget_free(widget *wid); /** * @param widget The widget toresize * @param w The new width * @param h The new height * * Resizes the widget. */ void widget_resize(widget *widget, short w, short h); /** * @param widget The widget handle * * @returns the height of the widget. */ int widget_get_height(widget *widget); /** * @param widget The widget handle * * @returns the width of the widget. */ int widget_get_width(widget *widget); /** * @param widget The widget handle * * @returns the y position of the widget relative to its parent. */ int widget_get_y_pos(widget *widget); /** * @param widget The widget handle * * @returns the x position of the widget relative to its parent. */ int widget_get_x_pos(widget *widget); /** * @param widget The widget handle * @param x A pointer to the absolute X coordinates * @param y A pointer to the absolute Y coordinates * * Will modify param x and param y to make them relative to param widget . */ void widget_xy_to_relative(widget *widget, gint *x, gint *y); /** * @param widget The widget handle * * Update the widget, and its parent recursively. * This should be called when size of widget changes. */ void widget_update(widget *widget); /** * @param wid The widget handle * * Indicate that the widget needs to be redrawn. * This is done by setting the redraw flag on the toplevel widget. */ void widget_queue_redraw(widget *wid); /** * @param wid The widget handle * * Check the flag indicating the widget needs to be redrawn. */ gboolean widget_need_redraw(widget *wid); /** * @param wid The widget handle * @param type The type of the wanted widget * @param x The x coordinate of the mouse event * @param y The y coordinate of the mouse event * * Get the widget that should handle a mouse event. * * @returns returns the widget that should handle the mouse event. */ widget *widget_find_mouse_target(widget *wid, WidgetType type, gint x, gint y); /** * @param wid The widget handle * @param action The action to trigger * @param x A pointer to the x coordinate of the click * @param y A pointer to the y coordinate of the click * * Trigger an action on widget. * param x and param y are relative to param wid . * * @returns Whether the action would be handled or not */ WidgetTriggerActionResult widget_check_action(widget *wid, guint action, gint x, gint y); /** * @param wid The widget handle * @param action The action to trigger * @param x A pointer to the x coordinate of the click * @param y A pointer to the y coordinate of the click * * Trigger an action on widget. * param x and param y are relative to param wid . * * @returns Whether the action was handled or not */ WidgetTriggerActionResult widget_trigger_action(widget *wid, guint action, gint x, gint y); /** * @param wid The widget handle * @param cb The widget trigger action callback * @param cb_data the user data to pass to callback * * Override the widget trigger action handler on widget. */ void widget_set_trigger_action_handler(widget *wid, widget_trigger_action_cb cb, void *cb_data); /** * @param wid The widget handle * @param x The x coordinate of the mouse event * @param y The y coordinate of the mouse event * * Motion notify. * * @returns TRUE when handled. */ gboolean widget_motion_notify(widget *wid, gint x, gint y); /** * @param wid The widget handle * @param width The Widget width to get height for * * Get the desired height of this widget recursively. * * @returns the desired height of the widget in pixels. */ int widget_get_desired_height(widget *wid, const int width); /** * @param wid The widget handle * @param height The Widget height to get height for * * Get the desired width of this widget recursively. * * @returns the desired width of the widget in pixels. */ int widget_get_desired_width(widget *wid, const int height); /** * @param wid The widget handle * * Get the absolute x-position on the root widget.. * * @returns the absolute x-position of widget of the widget in pixels. */ int widget_get_absolute_xpos(widget *wid); /** * @param wid The widget handle * * Get the absolute y-position on the root widget.. * * @returns the absolute y-position of widget of the widget in pixels. */ int widget_get_absolute_ypos(widget *wid); /**@}*/ #endif // ROFI_WIDGET_H rofi-1.7.1/include/widgets/icon.h0000644000175100001710000000355714150243117013577 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2018 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_ICON_H #define ROFI_ICON_H #include "widget.h" /** * @defgroup icon icon * @ingroup widget * * * @{ */ /** * Abstract handle to the icon widget internal state. */ typedef struct _icon icon; /** * @param parent The widget's parent * @param name The name of the widget. * * @returns a newly created icon, free with #widget_free */ icon *icon_create(widget *parent, const char *name); /** * @param icon The icon widget handle. * @param size The size of the icon. * */ void icon_set_size(widget *icon, const int size); /** * @param icon The icon widget handle. * @param surf The surface to display. */ void icon_set_surface(icon *icon, cairo_surface_t *surf); /**@}*/ #endif // ROFI_ICON_H rofi-1.7.1/include/widgets/widget-internal.h0000644000175100001710000001236514150243117015741 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef WIDGET_INTERNAL_H #define WIDGET_INTERNAL_H #include "theme.h" /** * Data structure holding the internal state of the Widget */ struct _widget { /** The type of the widget */ WidgetType type; /** X position relative to parent */ short x; /** Y position relative to parent */ short y; /** Width of the widget */ short w; /** Height of the widget */ short h; /** RofiPadding */ RofiPadding def_margin; RofiPadding def_padding; RofiPadding def_border; RofiPadding def_border_radius; RofiPadding margin; RofiPadding padding; RofiPadding border; RofiPadding border_radius; /** Cursor that is set when the widget is hovered */ RofiCursorType cursor_type; /** enabled or not */ gboolean enabled; /** Expand the widget when packed */ gboolean expand; /** Place widget at end of parent */ gboolean end; /** Parent widget */ struct _widget *parent; /** Internal */ gboolean need_redraw; /** get width of widget implementation function */ int (*get_width)(struct _widget *); /** get height of widget implementation function */ int (*get_height)(struct _widget *); /** draw widget implementation function */ void (*draw)(struct _widget *widget, cairo_t *draw); /** resize widget implementation function */ void (*resize)(struct _widget *, short, short); /** update widget implementation function */ void (*update)(struct _widget *); /** Handle mouse motion, used for dragging */ gboolean (*motion_notify)(struct _widget *, gint x, gint y); int (*get_desired_height)(struct _widget *, const int width); int (*get_desired_width)(struct _widget *, const int height); void (*set_state)(struct _widget *, const char *); /** widget find_mouse_target callback */ widget_find_mouse_target_cb find_mouse_target; /** widget trigger_action callback */ widget_trigger_action_cb trigger_action; /** user data for find_mouse_target and trigger_action callback */ void *trigger_action_cb_data; /** Free widget callback */ void (*free)(struct _widget *widget); /** Name of widget (used for theming) */ char *name; const char *state; }; /** * @param wid The widget to initialize. * @param parent The widget's parent. * @param type The type of the widget. * @param name The name of the widget. * * Initializes the widget structure. * */ void widget_init(widget *wid, widget *parent, WidgetType type, const char *name); /** * @param widget The widget handle. * @param state The state of the widget. * * Set the state of the widget. */ void widget_set_state(widget *widget, const char *state); /** * @param wid The widget handle. * * Get the left padding of the widget. * * @returns the left padding in pixels. */ int widget_padding_get_left(const widget *wid); /** * @param wid The widget handle. * * Get the right padding of the widget. * * @returns the right padding in pixels. */ int widget_padding_get_right(const widget *wid); /** * @param wid The widget handle. * * Get the top padding of the widget. * * @returns the top padding in pixels. */ int widget_padding_get_top(const widget *wid); /** * @param wid The widget handle. * * Get the bottom padding of the widget. * * @returns the bottom padding in pixels. */ int widget_padding_get_bottom(const widget *wid); /** * @param wid The widget handle. * * Get width of the content of the widget * * @returns the widget width, excluding padding. */ int widget_padding_get_remaining_width(const widget *wid); /** * @param wid The widget handle. * * Get height of the content of the widget * * @returns the widget height, excluding padding. */ int widget_padding_get_remaining_height(const widget *wid); /** * @param wid The widget handle. * * Get the combined top and bottom padding. * * @returns the top and bottom padding of the widget in pixels. */ int widget_padding_get_padding_height(const widget *wid); /** * @param wid The widget handle. * * Get the combined left and right padding. * * @returns the left and right padding of the widget in pixels. */ int widget_padding_get_padding_width(const widget *wid); #endif // WIDGET_INTERNAL_H rofi-1.7.1/include/widgets/textbox.h0000644000175100001710000002124614150243117014337 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_TEXTBOX_H #define ROFI_TEXTBOX_H #include "keyb.h" #include "widgets/widget-internal.h" #include "widgets/widget.h" #include #include #include #include #include /** * @defgroup Textbox Textbox * @ingroup widget * * @{ */ /** Cache to hold font descriptions. This it to avoid having to lookup each * time. */ typedef struct TBFontConfig { /** Font description */ PangoFontDescription *pfd; /** Font metrics */ PangoFontMetrics *metrics; /** height */ double height; } TBFontConfig; /** * Internal structure of a textbox widget. * TODO make this internal to textbox */ typedef struct { widget widget; unsigned long flags; short cursor; char *text; const char *placeholder; int show_placeholder; PangoLayout *layout; int tbft; int markup; int changed; int blink; guint blink_timeout; double yalign; double xalign; TBFontConfig *tbfc; PangoEllipsizeMode emode; // const char *theme_name; } textbox; /** * Flags for configuring textbox behaviour and looks during creation. */ typedef enum { TB_AUTOHEIGHT = 1 << 0, TB_AUTOWIDTH = 1 << 1, TB_EDITABLE = 1 << 19, TB_MARKUP = 1 << 20, TB_WRAP = 1 << 21, TB_PASSWORD = 1 << 22, TB_INDICATOR = 1 << 23, } TextboxFlags; /** * Flags indicating current state of the textbox. */ typedef enum { /** Normal */ NORMAL = 0, /** Text in box is urgent. */ URGENT = 1, /** Text in box is active. */ ACTIVE = 2, /** Text in box is selected. */ SELECTED = 4, /** Text in box has pango markup. */ MARKUP = 8, /** Text is on an alternate row */ ALT = 16, /** Render font highlighted (inverted colors.) */ HIGHLIGHT = 32, /** Mask for alternate and highlighted */ FMOD_MASK = (ALT | HIGHLIGHT), /** Mask of bits indicating state */ STATE_MASK = ~(SELECTED | MARKUP | ALT | HIGHLIGHT) } TextBoxFontType; /** * @param parent The widget's parent. * @param type The type of the to be created widget. * @param name The name of the to be created widget. * @param flags #TextboxFlags indicating the type of textbox. * @param tbft #TextBoxFontType current state of textbox. * @param text initial text to display. * @param xalign Set the Xalign value. * @param yalign set the yalign value. * * Create a new textbox widget. * * free with #widget_free * @returns a new #textbox */ textbox *textbox_create(widget *parent, WidgetType type, const char *name, TextboxFlags flags, TextBoxFontType tbft, const char *text, double xalign, double yalign); /** * @param tb Handle to the textbox * @param tbft The style of font to render. * * Set the font render style. */ void textbox_font(textbox *tb, TextBoxFontType tbft); /** * @param tb Handle to the textbox * @param text The text to show in the textbox * * Set the text to show. Cursor is moved to end (if visible) */ void textbox_text(textbox *tb, const char *text); /** * @param tb Handle to the textbox * @param action the #KeyBindingAction to execute on textbox * * Execute an action on the textbox. * * @return TRUE if action was taken. */ int textbox_keybinding(textbox *tb, KeyBindingAction action); /** * @param tb Handle to the textbox * @param pad The text to insert * @param pad_len the length of the text * * The text should be one insert from a keypress.. the first gunichar is * validated to be (or not) control return TRUE if inserted */ gboolean textbox_append_text(textbox *tb, const char *pad, const int pad_len); /** * @param tb Handle to the textbox * @param pos New cursor position * * Set the cursor position (string index) */ void textbox_cursor(textbox *tb, int pos); /** * @param tb Handle to the textbox * @param char_pos The position to insert the string at * @param str The string to insert. * @param slen The length of the string. * * Insert the string str at position pos. */ void textbox_insert(textbox *tb, const int char_pos, const char *str, const int slen); /** * Setup the cached fonts. This is required to do * before any of the textbox_ functions is called. * Clean with textbox_cleanup() */ void textbox_setup(void); /** * Cleanup the allocated colors and fonts by textbox_setup(). */ void textbox_cleanup(void); /** * @param tb Handle to the textbox * * Get the height of the textbox * * @returns the height of the textbox in pixels. */ int textbox_get_height(const textbox *tb); /** * @param tb Handle to the textbox * * Get the height of the rendered string. * * @returns the height of the string in pixels. */ int textbox_get_font_height(const textbox *tb); /** * @param tb Handle to the textbox * * Get the width of the rendered string. * * @returns the width of the string in pixels. */ int textbox_get_font_width(const textbox *tb); /** * Estimate the width of a character. * * @returns the width of a character in pixels. */ double textbox_get_estimated_char_width(void); /** * Estimate the width of a 0. * * @returns the width of a 0 in pixels. */ double textbox_get_estimated_ch(void); /** * Estimate the height of a character. * * @returns the height of a character in pixels. */ double textbox_get_estimated_char_height(void); /** * @param tb Handle to the textbox * @param pos The start position * @param dlen The length * * Remove dlen bytes from position pos. */ void textbox_delete(textbox *tb, int pos, int dlen); /** * @param tb Handle to the textbox * @param x The new horizontal position to place with textbox * @param y The new vertical position to place with textbox * @param w The new width of the textbox * @param h The new height of the textbox * * Move and resize the textbox. * TODO remove for #widget_resize and #widget_move */ void textbox_moveresize(textbox *tb, int x, int y, int w, int h); /** * @param tb Handle to the textbox * @param eh The number of rows to display * * Get the (estimated) with of a character, can be used to calculate window * width. This includes padding. * * @returns the estimated width of a character. */ int textbox_get_estimated_height(const textbox *tb, int eh); /** * @param font The name of the font used. * @param p The new default PangoContext * * Set the default pango context (with font description) for all textboxes. */ void textbox_set_pango_context(const char *font, PangoContext *p); /** * @param tb Handle to the textbox * @param list New pango attributes * * Sets list as active pango attributes. */ void textbox_set_pango_attributes(textbox *tb, PangoAttrList *list); /** * @param tb Handle to the textbox * * Get the list of currently active pango attributes. * * @returns the pango attributes */ PangoAttrList *textbox_get_pango_attributes(textbox *tb); /** * @param tb Handle to the textbox * * @returns the visible text. */ const char *textbox_get_visible_text(const textbox *tb); /** * @param wid The handle to the textbox. * @param height The height we want the desired width for * * TODO: is this deprecated by widget::get_desired_width * * @returns the desired width of the textbox. */ int textbox_get_desired_width(widget *wid, const int height); /** * @param tb Handle to the textbox * * Move the cursor to the end of the string. */ void textbox_cursor_end(textbox *tb); /** * @param tb Handle to the textbox * @param mode The PangoEllipsizeMode to use displaying the text in the textbox * * Set the ellipsizing mode used on the string. */ void textbox_set_ellipsize(textbox *tb, PangoEllipsizeMode mode); /**@}*/ #endif // ROFI_TEXTBOX_H rofi-1.7.1/include/widgets/scrollbar.h0000644000175100001710000000506614150243117014627 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_SCROLLBAR_H #define ROFI_SCROLLBAR_H #include "widgets/widget-internal.h" #include "widgets/widget.h" #include /** * @defgroup Scrollbar Scrollbar * @ingroup widget * * @{ */ /** * Internal structure for the scrollbar. */ typedef struct _scrollbar { widget widget; unsigned int length; unsigned int pos; unsigned int pos_length; RofiDistance width; } scrollbar; /** * @param parent The parent widget. * @param name The name of the widget. * * Create a new scrollbar * * @returns the scrollbar object. */ scrollbar *scrollbar_create(widget *parent, const char *name); /** * @param sb scrollbar object * @param pos_length new length * * set the length of the handle relative to the max value of bar. */ void scrollbar_set_handle_length(scrollbar *sb, unsigned int pos_length); /** * @param sb scrollbar object * @param pos new position * * set the position of the handle relative to the set max value of bar. */ void scrollbar_set_handle(scrollbar *sb, unsigned int pos); /** * @param sb scrollbar object * @param max the new max * * set the max value of the bar. */ void scrollbar_set_max_value(scrollbar *sb, unsigned int max); /** * @param sb scrollbar object * @param y clicked position * * Calculate the position of the click relative to the max value of bar */ guint scrollbar_scroll_get_line(const scrollbar *sb, int y); /**@}*/ #endif // ROFI_SCROLLBAR_H rofi-1.7.1/include/widgets/box.h0000644000175100001710000000436314150243117013433 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_HBOX_H #define ROFI_HBOX_H #include "rofi-types.h" #include "widget.h" /** * @defgroup box box * @ingroup widget * * Widget used to pack multiple widgets either horizontally or vertically. * It supports packing widgets horizontally or vertically. Child widgets are * always expanded to the maximum size in the opposite direction of the packing * direction. e.g. vertically packed widgets use the full box width. * * @{ */ /** * Abstract handle to the box widget internal state. */ typedef struct _box box; /** * @param parent The widgets parent. * @param name The name of the widget. * @param type The packing direction of the newly created box. * * @returns a newly created box, free with #widget_free */ box *box_create(widget *parent, const char *name, RofiOrientation type); /** * @param box Handle to the box widget. * @param child Handle to the child widget to pack. * @param expand If the child widget should expand and use all available space. * * Add a widget to the box. */ void box_add(box *box, widget *child, gboolean expand); /**@}*/ #endif // ROFI_HBOX_H rofi-1.7.1/include/widgets/listview.h0000644000175100001710000001546614150243117014517 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_LISTVIEW_H #define ROFI_LISTVIEW_H #include "widgets/textbox.h" /** * @defgroup listview listview * @ingroup widget * * @{ */ /** * Handle to the listview. * No internal fields should be accessed directly. */ typedef struct _listview listview; /** * The scrolling type used in the list view */ typedef enum { /** Flip through the pages. */ LISTVIEW_SCROLL_PER_PAGE, /** keep selected item centered */ LISTVIEW_SCROLL_CONTINIOUS } ScrollType; /** * @param tb The textbox to set * @param entry The position of the textbox * @param udata User data * @param type The textbox font style to apply to this entry (normal, selected, * alternative row) * @param full If true Set both text and style. * * Update callback, this is called to set the value of each (visible) element. */ typedef void (*listview_update_callback)(textbox *tb, icon *ico, unsigned int entry, void *udata, TextBoxFontType *type, gboolean full); /** * Callback when a element is activated. */ typedef void (*listview_mouse_activated_cb)(listview *, gboolean, void *); /** * @param parent The widget's parent. * @param name The name of the to be created widget. * @param cb The update callback. * @param udata The user data to pass to the callback * @param eh The height of one element * @param reverse Reverse the listview order. * * @returns a new listview */ listview *listview_create(widget *parent, const char *name, listview_update_callback cb, void *udata, unsigned int eh, gboolean reverse); /** * @param lv The listview handle * @param rows Number of elements * * Set the maximum number of elements to display. */ void listview_set_num_elements(listview *lv, unsigned int rows); /** * @param lv The listview handle * @param selected The row index to select * * Select the row, if selected > the number of rows, it selects the last one. */ void listview_set_selected(listview *lv, unsigned int selected); /** * @param lv The listview handle * * Returns the selected row. * * @returns the selected row. */ unsigned int listview_get_selected(listview *lv); /** * @param lv The listview handle * * Move the selection one row up. * - Wrap around. */ void listview_nav_up(listview *lv); /** * @param lv listview handle. * * Move the selection one row down. * - Wrap around. */ void listview_nav_down(listview *lv); /** * @param lv The listview handle * * Move the selection one column to the right. * - No wrap around. * - Do not move to top row when at start. */ void listview_nav_right(listview *lv); /** * @param lv The listview handle * * Move the selection one column to the left. * - No wrap around. */ void listview_nav_left(listview *lv); /** * @param lv The listview handle * * Move the selection one page down. * - No wrap around. * - Clip at top/bottom */ void listview_nav_page_next(listview *lv); /** * @param lv The listview handle * * Move the selection one page up. * - No wrap around. * - Clip at top/bottom */ void listview_nav_page_prev(listview *lv); /** * @param lv Handler to the listview object * @param enabled enable * * Hide the scrollbar. */ void listview_set_show_scrollbar(listview *lv, gboolean enabled); /** * @param lv Handler to the listview object * @param width Width in pixels * * Set the width of the scrollbar */ void listview_set_scrollbar_width(listview *lv, unsigned int width); /** * @param lv Handler to the listview object * @param cycle True for cycle mode * * Set cycle mode. On last entry go to first. */ void listview_set_cycle(listview *lv, gboolean cycle); /** * @param lv Handler to the listview object * @param type ScrollType * * Set the scroll type ScrollType::LISTVIEW_SCROLL_CONTINIOUS or * ScrollType::LISTVIEW_SCROLL_PER_PAGE */ void listview_set_scroll_type(listview *lv, ScrollType type); /** * @param lv Handler to the listview object * @param cb The callback * @param udata User data * * Set the mouse activated callback. */ void listview_set_mouse_activated_cb(listview *lv, listview_mouse_activated_cb cb, void *udata); /** * @param lv Handler to the listview object * @param enable boolean to enable/disable multi-select * * Enable,disable multi-select. */ void listview_set_multi_select(listview *lv, gboolean enable); /** * @param lv Handler to the listview object. * @param num_lines the maximum number of lines to display. * * Set the maximum number of lines to display. */ void listview_set_num_lines(listview *lv, unsigned int num_lines); /** * @param lv Handler to the listview object. * * Get the maximum number of lines to display. * * @returns get the number of lines to display. */ unsigned int listview_get_num_lines(listview *lv); /** * @param lv Handler to the listview object. * * Get the fixed-height property. * * @returns get fixed-height. */ gboolean listview_get_fixed_num_lines(listview *lv); /** * @param lv Handler to the listview object. * * Set fixed num lines mode. */ void listview_set_fixed_num_lines(listview *lv); /** * @param lv Handler to the listview object. * @param max_lines the maximum number of lines to display. * * Set the maximum number of lines to display. */ void listview_set_max_lines(listview *lv, unsigned int max_lines); /** * @param lv Handler to the listview object. * * Set ellipsize mode. */ void listview_toggle_ellipsizing(listview *lv); /** * @param lv Handler to the listview object. * * Set ellipsize mode to start. */ void listview_set_ellipsize_start(listview *lv); /** @} */ #endif // ROFI_LISTVIEW_H rofi-1.7.1/include/xrmoptions.h0000644000175100001710000001060714150243117013415 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_XRMOPTIONS_H #define ROFI_XRMOPTIONS_H #include "theme.h" #include "xcb.h" // Big thanks to Sean Pringle for this code. /** * @defgroup CONFXResources XResources Configuration * @ingroup CONFIGURATION * * Configuration described in Xresource format. This can be loaded from the X * server or file. * * @defgroup CONFXServer XServer Configuration * @ingroup CONFXResources * * Loads the configuration directly from the X server using the XResources * system. * * @defgroup CONFCommandline Commandline Configuration * @ingroup CONFIGURATION * * Modified the configuration based on commandline arguments * * @defgroup CONFFile File Configuration * @ingroup CONFXResources * * Loads the configuration from a config file that uses the XResource file * format. * * @defgroup CONFIGURATION Configuration * * This provides rofi configuration system, supports: * * Compiled defaults. * * XResource parsing * * Config file parsing * * Commandline options. * * @{ */ /** * Type of the config options. */ typedef enum { /** Config option is string */ xrm_String = 0, /** Config option is an unsigned number */ xrm_Number = 1, /** Config option is a signed number */ xrm_SNumber = 2, /** Config option is a boolean (true/false) value*/ xrm_Boolean = 3, /** Config option is a character */ xrm_Char = 4 } XrmOptionType; /** * Parse commandline options. * @ingroup CONFCommandline */ void config_parse_cmd_options(void); /** * Free any allocated memory. * * @ingroup CONFXResources */ void config_xresource_free(void); /** * @param type The type of the value * @param key The key referring to this configuration option * @param value The value to update based [out][in] * @param comment Description of this configuration option * * Add option (at runtime) to the dynamic option parser. */ void config_parser_add_option(XrmOptionType type, const char *key, void **value, const char *comment); /** * Print the current configuration to stdout. Uses bold/italic when printing to * terminal. */ void print_options(void); /** * @param option The name of the option * @param type String describing the type * @param text Description of the option * @param def Current value of the option * @param isatty If printed to a terminal * * Function that does the markup for printing an configuration option to stdout. */ void print_help_msg(const char *option, const char *type, const char *text, const char *def, int isatty); /** * @param length the length of the returned array * * Creates an array with a strings describing each keybinding. * * @returns an array of string with length elements */ char **config_parser_return_display_help(unsigned int *length); /** * @brief Set config option. * * Sets both the static as dynamic config option. * * @param p Property to set * @param error Error msg when not found. * * @returns true when failed to set property. */ gboolean config_parse_set_property(const Property *p, char **error); /** * @param out The destination. * @param changes Only print the changed options. * * @brief Dump configuration in rasi format. */ void config_parse_dump_config_rasi_format(FILE *out, gboolean changes); /** @}*/ #endif rofi-1.7.1/include/xcb.h0000644000175100001710000001414414150243117011747 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_XCB_H #define ROFI_XCB_H #include #include /** * xcb data structure type declaration. */ typedef struct _xcb_stuff xcb_stuff; /** * Global pointer to xcb_stuff instance. */ extern xcb_stuff *xcb; /** * Get the root window. * * @returns the root window. */ xcb_window_t xcb_stuff_get_root_window(void); /** * @param w The xcb_window_t to read property from. * @param atom The property identifier * * Get text property defined by atom from window. * Support utf8. * * @returns a newly allocated string with the result or NULL */ char *window_get_text_prop(xcb_window_t w, xcb_atom_t atom); /** * @param w The xcb_window_t to set property on * @param prop Atom of the property to change * @param atoms List of atoms to change the property too * @param count The length of the atoms list. * * Set property on window. */ void window_set_atom_prop(xcb_window_t w, xcb_atom_t prop, xcb_atom_t *atoms, int count); /** For getting the atoms in an enum */ #define ATOM_ENUM(x) x /** Get the atoms as strings. */ #define ATOM_CHAR(x) #x /** Atoms we want to pre-load */ #define EWMH_ATOMS(X) \ X(_NET_WM_WINDOW_OPACITY), X(I3_SOCKET_PATH), X(UTF8_STRING), X(STRING), \ X(CLIPBOARD), X(WM_WINDOW_ROLE), X(_XROOTPMAP_ID), X(_MOTIF_WM_HINTS), \ X(WM_TAKE_FOCUS), X(ESETROOT_PMAP_ID) /** enumeration of the atoms. */ enum { EWMH_ATOMS(ATOM_ENUM), NUM_NETATOMS }; /** atoms as string */ extern const char *netatom_names[]; /** atoms */ extern xcb_atom_t netatoms[NUM_NETATOMS]; /** * Structure describing a workarea/monitor. */ typedef struct _workarea { /** numeric monitor id. */ int monitor_id; /** if monitor is set as primary monitor. */ int primary; /** Horizontal location (in pixels) of the monitor. */ int x; /** Vertical location (in pixels) of the monitor. */ int y; /** Width of the monitor. */ int w; /** Height of the monitor */ int h; int mw, mh; /** Output name of the monitor, e.g. eDP1 or VGA-1 */ char *name; /** Pointer to next monitor */ struct _workarea *next; } workarea; /** * @param mon workarea to be filled in. * * Fills in #mon with the information about the monitor rofi should show on. * * @returns TRUE if monitor is found, FALSE if no monitor could be detected. */ int monitor_active(workarea *mon); /** * @param w rofis window * * Stores old input focus for reverting and set focus to rofi. */ void rofi_xcb_set_input_focus(xcb_window_t w); /** * IF set, revert the focus back to the original applications. */ void rofi_xcb_revert_input_focus(void); /** * Depth of visual */ extern xcb_depth_t *depth; /** * Visual to use for creating window */ extern xcb_visualtype_t *visual; /** * Color map to use for creating window */ extern xcb_colormap_t map; /** * Gets a surface containing the background image of the desktop. * * @returns a cairo surface with the background image of the desktop. */ cairo_surface_t *x11_helper_get_bg_surface(void); /** * Gets a surface for the root window of the desktop. * * Can be used to take screenshot. * * @returns a cairo surface for the root window of the desktop. */ cairo_surface_t *x11_helper_get_screenshot_surface(void); /** * @param window The X11 window to modify * * Set the right hints to disable the window decoration. * (Set MOTIF_WM_HINTS, decoration field) */ void x11_disable_decoration(xcb_window_t window); /** * List of cursor types. */ typedef enum { /** Default arrow cursor */ CURSOR_DEFAULT = 0, /** Cursor denoting a clickable area */ CURSOR_POINTER, /** Cursor denoting an input field / selectable text */ CURSOR_TEXT, NUM_CURSORS } X11CursorType; /** * @param window * @param type * * Change mouse cursor */ void x11_set_cursor(xcb_window_t window, X11CursorType type); /** * List of window managers that need different behaviour to functioning. */ typedef enum { /** Default EWHM compatible window manager */ WM_EWHM = 0, /** I3 Window manager */ WM_DO_NOT_CHANGE_CURRENT_DESKTOP = 1, /** PANGO WORKSPACE NAMES */ WM_PANGO_WORKSPACE_NAMES = 2, /** Root window offset (for bspwm) */ WM_ROOT_WINDOW_OFFSET = 4, } WindowManagerQuirk; /** * Indicates the current window manager. * This is used for work-arounds. */ extern WindowManagerQuirk current_window_manager; /** * @param window the window the screenshot * @param size Size of the thumbnail * * Creates a thumbnail of the window. * * @returns NULL if window was not found, or unmapped, otherwise returns a * cairo_surface. */ cairo_surface_t *x11_helper_get_screenshot_surface_window(xcb_window_t window, int size); /** * @param surface * @param radius * @param deviation * * Blur the content of the surface with radius and deviation. */ void cairo_image_surface_blur(cairo_surface_t *surface, double radius, double deviation); #endif rofi-1.7.1/include/dialogs/0000755000175100001710000000000014150243223012516 500000000000000rofi-1.7.1/include/dialogs/drun.h0000644000175100001710000000270114150243117013561 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_DRUN_H #define ROFI_DIALOG_DRUN_H #include "mode.h" /** * @defgroup DRUNMode DRun * @ingroup MODES * @{ */ #ifdef ENABLE_DRUN /** #Mode object representing the desktop menu run dialog. */ extern Mode drun_mode; #endif // ENABLE_DRUN /**@}*/ #endif // ROFI_DIALOG_DRUN_H rofi-1.7.1/include/dialogs/dmenuscriptshared.h0000644000175100001710000000160314150243117016335 00000000000000#ifndef ROFI_DIALOGS_DMENU_SCRIPT_SHARED_H #define ROFI_DIALOGS_DMENU_SCRIPT_SHARED_H #include #include #include typedef struct { /** Entry content. (visible part) */ char *entry; /** Icon name to display. */ char *icon_name; /** Async icon fetch handler. */ uint32_t icon_fetch_uid; /** Hidden meta keywords. */ char *meta; /** info */ char *info; /** non-selectable */ gboolean nonselectable; } DmenuScriptEntry; /** * @param sw Unused * @param entry The entry to update. * @param buffer The buffer to parse. * @param length The buffer length. * * Updates entry with the parsed values from buffer. */ void dmenuscript_parse_entry_extras(G_GNUC_UNUSED Mode *sw, DmenuScriptEntry *entry, char *buffer, size_t length); #endif // ROFI_DIALOGS_DMENU_SCRIPT_SHARED_H rofi-1.7.1/include/dialogs/window.h0000644000175100001710000000276614150243117014133 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_WINDOW_H #define ROFI_DIALOG_WINDOW_H #include "mode.h" /** * @defgroup WINDOWMode Window * @ingroup MODES * * @{ */ #ifdef WINDOW_MODE extern Mode window_mode; extern Mode window_mode_cd; void window_client_handle_signal(xcb_window_t win, gboolean create); #endif // WINDOW_MODE /** @}*/ #endif // ROFI_DIALOG_WINDOW_H rofi-1.7.1/include/dialogs/help-keys.h0000644000175100001710000000275614150243117014524 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_HELPKEYS_H #define ROFI_DIALOG_HELPKEYS_H #include "mode.h" /** * @defgroup HELPKEYSMode KeysHelp * @ingroup MODES * * Displays the different keybindings available in *rofi* * * @{ */ /** * #Mode object representing the help key mode view */ extern Mode help_keys_mode; /**@}*/ #endif // ROFI_DIALOG_HELPKEYS_H rofi-1.7.1/include/dialogs/run.h0000644000175100001710000000305214150243117013415 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_RUN_H #define ROFI_DIALOG_RUN_H #include "mode.h" /** * @defgroup RUNMode Run * @ingroup MODES * * This mode uses the following options from the #config object: * * #Settings::run_command * * #Settings::run_shell_command * * #Settings::run_list_command * * @{ */ /** #Mode object representing the run dialog. */ extern Mode run_mode; /**@}*/ #endif // DIALOG_RUN_H rofi-1.7.1/include/dialogs/script.h0000644000175100001710000000346614150243117014126 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_SCRIPT_H #define ROFI_DIALOG_SCRIPT_H #include "mode.h" /** * @defgroup SCRIPTMode Script * @ingroup MODES * * @{ */ /** * @param str The input string to parse * * Parse an argument string into the right ScriptOptions data object. * This is off format: \:\ * * @returns NULL when it fails, a newly allocated ScriptOptions when successful. */ Mode *script_switcher_parse_setup(const char *str); /** * @param token The modi str to check * * Check if token could be a valid script modi. * * @returns true when valid. */ gboolean script_switcher_is_valid(const char *token); /**@}*/ #endif // ROFI_DIALOG_SCRIPT_H rofi-1.7.1/include/dialogs/combi.h0000644000175100001710000000316714150243117013711 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_COMBI_H #define ROFI_DIALOG_COMBI_H #include "mode.h" /** * @defgroup COBIMode Combi * @ingroup MODES * * Dialog that can combine multiple #Mode into one view. * * This mode uses the following options from the #config object: * * #Settings::combi_modi * * It creates the following option: * * Settings::display_combi * * @{ */ /** #Mode object representing the combi dialog. */ extern Mode combi_mode; /**@}*/ #endif // ROFI_DIALOG_COMBI_H rofi-1.7.1/include/dialogs/dialogs.h0000644000175100001710000000307314150243117014236 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOGS_DIALOGS_H #define ROFI_DIALOGS_DIALOGS_H /** * @defgroup MODES Modes */ /** * List of available dialogs. */ #include "dialogs/combi.h" #include "dialogs/dmenu.h" #include "dialogs/drun.h" #include "dialogs/filebrowser.h" #include "dialogs/help-keys.h" #include "dialogs/run.h" #include "dialogs/script.h" #include "dialogs/ssh.h" #include "dialogs/window.h" #endif // ROFI_DIALOGS_DIALOGS_H rofi-1.7.1/include/dialogs/dmenu.h0000644000175100001710000000302214150243117013716 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_DMENU_H #define ROFI_DIALOG_DMENU_H /** * @defgroup DMENU DMenu * @ingroup MODES * * * @{ */ /** * dmenu dialog. * * @returns TRUE if script was successful. */ int dmenu_switcher_dialog(void); /** * Print dmenu mode commandline options to stdout, for use in help menu. */ void print_dmenu_options(void); /**@}*/ #endif // ROFI_DIALOG_DMENU_H rofi-1.7.1/include/dialogs/filebrowser.h0000644000175100001710000000367514150243117015147 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_FILE_BROWSER_H #define ROFI_DIALOG_FILE_BROWSER_H #include "mode.h" /** * @defgroup FileBrowserMode FileBrowser * @ingroup MODES * * * @{ */ /** #Mode object representing the run dialog. */ extern Mode file_browser_mode; /** * Create a new filebrowser. * @returns a new filebrowser structure. */ Mode *create_new_file_browser(void); /** * @param sw Mode object. * @param mretv return value passed in. * @param input The user input string. * @param selected_line The user selected line. * @param path The full path as output. * * @returns the state the user selected. */ ModeMode file_browser_mode_completer(Mode *sw, int mretv, char **input, unsigned int selected_line, char **path); /**@}*/ #endif // ROFI_DIALOG_FILE_BROWSER_H rofi-1.7.1/include/dialogs/ssh.h0000644000175100001710000000337614150243117013417 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DIALOG_SSH_H #define ROFI_DIALOG_SSH_H #include "mode.h" /** * @defgroup SSHMode SSH * @ingroup MODES * * SSH Mode, returns a list of known SSH hosts the user can log into. * It does this by parsing the SSH config file and optional the known host and * host list It also keeps history of the last chosen hosts. * * This mode uses the following options from the #config object: * * #Settings::ssh_command * * #Settings::parse_known_hosts * * #Settings::parse_hosts * * @{ */ /** #Mode object representing the ssh dialog. */ extern Mode ssh_mode; /**@}*/ #endif // ROFI_DIALOG_SSH_H rofi-1.7.1/include/mode.h0000644000175100001710000001510114150243117012111 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_MODE_H #define ROFI_MODE_H #include "rofi-types.h" #include G_BEGIN_DECLS /** * @defgroup MODE Mode * * The 'object' that makes a mode in rofi. * @{ */ /** * Type of a mode. * Access should be done via mode_* functions. */ typedef struct rofi_mode Mode; /** * Enum used to sum the possible states of ROFI. */ typedef enum { /** Exit. */ MODE_EXIT = 1000, /** Skip to the next cycle-able dialog. */ NEXT_DIALOG = 1001, /** Reload current DIALOG */ RELOAD_DIALOG = 1002, /** Previous dialog */ PREVIOUS_DIALOG = 1003, /** Reloads the dialog and unset user input */ RESET_DIALOG = 1004, } ModeMode; /** * State returned by the rofi window. */ typedef enum { /** Entry is selected. */ MENU_OK = 0x00010000, /** User canceled the operation. (e.g. pressed escape) */ MENU_CANCEL = 0x00020000, /** User requested a mode switch */ MENU_NEXT = 0x00040000, /** Custom (non-matched) input was entered. */ MENU_CUSTOM_INPUT = 0x00080000, /** User wanted to delete entry from history. */ MENU_ENTRY_DELETE = 0x00100000, /** User wants to jump to another switcher. */ MENU_QUICK_SWITCH = 0x00200000, /** User wants to jump to custom command. */ MENU_CUSTOM_COMMAND = 0x00800000, /** Go to the previous menu. */ MENU_PREVIOUS = 0x00400000, /** Go to the complete. */ MENU_COMPLETE = 0x01000000, /** Bindings specifics */ MENU_CUSTOM_ACTION = 0x10000000, /** Mask */ MENU_LOWER_MASK = 0x0000FFFF } MenuReturn; /** * @param mode The mode to initialize * * Initialize mode * * @returns FALSE if there was a failure, TRUE if successful */ int mode_init(Mode *mode); /** * @param mode The mode to destroy * * Destroy the mode */ void mode_destroy(Mode *mode); /** * @param mode The mode to query * * Get the number of entries in the mode. * * @returns an unsigned int with the number of entries. */ unsigned int mode_get_num_entries(const Mode *mode); /** * @param mode The mode to query * @param selected_line The entry to query * @param state The state of the entry [out] * @param attribute_list List of extra (pango) attribute to apply when * displaying. [out][null] * @param get_entry If the should be returned. * * Returns the string as it should be displayed for the entry and the state of * how it should be displayed. * * @returns allocated new string and state when get_entry is TRUE otherwise just * the state. */ char *mode_get_display_value(const Mode *mode, unsigned int selected_line, int *state, GList **attribute_list, int get_entry); /** * @param mode The mode to query * @param selected_line The entry to query * @param height The desired height of the icon. * * Returns the icon for the selected_line * * @returns allocated new cairo_surface_t if applicable */ cairo_surface_t *mode_get_icon(const Mode *mode, unsigned int selected_line, int height); /** * @param mode The mode to query * @param selected_line The entry to query * * Return a string that can be used for completion. It has should have no * markup. * * @returns allocated string. */ char *mode_get_completion(const Mode *mode, unsigned int selected_line); /** * @param mode The mode to query * @param menu_retv The menu return value. * @param input Pointer to the user input string. [in][out] * @param selected_line the line selected by the user. * * Acts on the user interaction. * * @returns the next #ModeMode. */ ModeMode mode_result(Mode *mode, int menu_retv, char **input, unsigned int selected_line); /** * @param mode The mode to query * @param tokens The set of tokens to match against * @param selected_line The index of the entry to match * * Match entry against the set of tokens. * * @returns TRUE if matches */ int mode_token_match(const Mode *mode, rofi_int_matcher **tokens, unsigned int selected_line); /** * @param mode The mode to query * * Get the name of the mode. * * @returns the name of the mode. */ const char *mode_get_name(const Mode *mode); /** * @param mode The mode to query * * Free the resources allocated for this mode. */ void mode_free(Mode **mode); /** * @param mode The mode to query * * Helper functions for mode. * Get the private data object. */ void *mode_get_private_data(const Mode *mode); /** * @param mode The mode to query * @param pd Pointer to private data to attach to the mode. * * Helper functions for mode. * Set the private data object. */ void mode_set_private_data(Mode *mode, void *pd); /** * @param mode The mode to query * * Get the name of the mode as it should be presented to the user. * * @return the user visible name of the mode */ const char *mode_get_display_name(const Mode *mode); /** * @param mode The mode to query * * Should be called once for each mode. This adds the display-name configuration * option for the mode. */ void mode_set_config(Mode *mode); /** * @param mode The mode to query * @param input The input to process * * This processes the input so it can be used for matching and sorting. * This includes removing pango markup. * * @returns a newly allocated string */ char *mode_preprocess_input(Mode *mode, const char *input); /** * @param mode The mode to query * * Query the mode for a user display. * * @return a new allocated (valid pango markup) message to display (user should * free). */ char *mode_get_message(const Mode *mode); /**@}*/ G_END_DECLS #endif rofi-1.7.1/include/timings.h0000644000175100001710000000475714150243117012656 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ /** * @defgroup TIMINGS Timings * @ingroup HELPERS * @{ */ #ifndef ROFI_TIMINGS_H #define ROFI_TIMINGS_H /** * Init the timestamping mechanism . * implementation. */ void rofi_timings_init(void); /** * @param file filename tick originates from * @param str function name. * @param line line number * @param msg message * * Report a tick. */ void rofi_timings_tick(const char *file, char const *str, int line, char const *msg); /** * Stop the timestamping mechanism */ void rofi_timings_quit(void); /** * Start timestamping mechanism. * Call to this function is time 0. */ #define TIMINGS_START() rofi_timings_init() /** * Report current time since TIMINGS_START */ #define TICK() rofi_timings_tick(__FILE__, __func__, __LINE__, "") /** * @param a an string * Report current time since TIMINGS_START */ #define TICK_N(a) rofi_timings_tick(__FILE__, __func__, __LINE__, a) /** * Stop timestamping mechanism. */ #define TIMINGS_STOP() rofi_timings_quit() #else /** * Start timestamping mechanism. * Call to this function is time 0. */ #define TIMINGS_START() /** * Stop timestamping mechanism. */ #define TIMINGS_STOP() /** * Report current time since TIMINGS_START */ #define TICK() /** * @param a an string * Report current time since TIMINGS_START */ #define TICK_N(a) #endif // ROFI_TIMINGS_H /**@}*/ rofi-1.7.1/include/helper.h0000644000175100001710000003033714150243117012454 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_HELPER_H #define ROFI_HELPER_H #include "rofi-types.h" #include G_BEGIN_DECLS /** * @defgroup HELPERS Helpers */ /** * @defgroup HELPER Helper * @ingroup HELPERS * * @{ */ /** * @param string The input string. * @param output Pointer to 2 dimensional array with parsed string. * @param length Length of 2 dimensional array. * @param ... Key, value parse. Replaces the string Key with value. * * Parses a string into arguments. While replacing keys with values. * * @returns TRUE when successful, FALSE when failed. */ int helper_parse_setup(char *string, char ***output, int *length, ...); /** * @param input The input string. * @param case_sensitive Whether case is significant. * * Tokenize the string on spaces. * * @returns a newly allocated array of matching objects */ rofi_int_matcher **helper_tokenize(const char *input, int case_sensitive); /** * @param tokens Array of regex objects * * Frees the array of matching objects. */ void helper_tokenize_free(rofi_int_matcher **tokens); /** * @param key The key to search for * @param val Pointer to the string to set to the key value (if found) * * Parse command line argument 'key' to character. * This one supports character escaping. * * @returns TRUE if key was found and val was set. */ int find_arg_char(const char *const key, char *val); /** * @param key The key to search for * @param val Pointer to the string to set to the key value (if found) * * Parse command line argument 'key' to unsigned int. * * @returns TRUE if key was found and val was set. */ int find_arg_uint(const char *const key, unsigned int *val); /** * @param key The key to search for * @param val Pointer to the string to set to the key value (if found) * * Parse command line argument 'key' to int. * * @returns TRUE if key was found and val was set. */ int find_arg_int(const char *const key, int *val); /** * @param key The key to search for * @param val Pointer to the string to set to the key value (if found) * * Parse command line argument 'key' to string. * * @returns TRUE if key was found and val was set. */ int find_arg_str(const char *const key, char **val); /** * @param key The key to search for * * Parse all command line options 'key' to string vector. * * @returns str vector. user should free array. */ const char **find_arg_strv(const char *const key); /** * @param key The key to search for * * Check if key is passed as argument. * * @returns return position of string or -1 if not found. */ int find_arg(const char *const key); /** * @param tokens List of (input) tokens to match. * @param input The entry to match against. * * Tokenized match, match tokens to line input. * * @returns TRUE when matches, FALSE otherwise */ int helper_token_match(rofi_int_matcher *const *tokens, const char *input); /** * @param cmd The command to execute. * * Execute cmd using config.run_command and outputs the result (stdout) to the * opened file descriptor. * * @returns a valid file descriptor on success, or -1 on failure. */ int execute_generator(const char *cmd) __attribute__((nonnull)); /** * @param pidfile The pidfile to create. * * returns file descriptor (or -1 when failed) */ int create_pid_file(const char *pidfile); /** * Remove pid file */ void remove_pid_file(int fd); /** * Do some input validation, especially the first few could break things. * It is good to catch them beforehand. * * This functions exits the program with 1 when it finds an invalid * configuration. */ int config_sanity_check(void); /** * @param arg string to parse. * * Parses a string into an character. * * @returns character. */ char helper_parse_char(const char *arg); /** * @param argc number of arguments. * @param argv Array of arguments. * * Set the application arguments. */ void cmd_set_arguments(int argc, char **argv); /** * @param input The path to expand * * Expand path, both `~` and `~` * * @returns path */ char *rofi_expand_path(const char *input); /** * @param needle The string to find match weight off * @param needlelen The length of the needle * @param haystack The string to match against * @param haystacklen The length of the haystack * * UTF-8 aware levenshtein distance calculation * * @returns the levenshtein distance between needle and haystack */ unsigned int levenshtein(const char *needle, const glong needlelen, const char *haystack, const glong haystacklen); /** * @param data the unvalidated character array holding possible UTF-8 data * @param length the length of the data array * * Convert string to valid utf-8, replacing invalid parts with replacement * character. * * @returns the converted UTF-8 string */ char *rofi_force_utf8(const gchar *data, ssize_t length); /** * @param input the char array holding latin text * @param length the length of the data array * * Converts latin to UTF-8. * * @return the UTF-8 representation of data */ char *rofi_latin_to_utf8_strdup(const char *input, gssize length); /** * @param text the string to escape * * Escape XML markup from the string. text is freed. * * @return the escaped string */ gchar *rofi_escape_markup(gchar *text); /** * @param pattern The user input to match against. * @param plen Pattern length. * @param str The input to match against pattern. * @param slen Length of str. * * rofi_scorer_fuzzy_evaluate implements a global sequence alignment algorithm * to find the maximum accumulated score by aligning `pattern` to `str`. It * applies when `pattern` is a subsequence of `str`. * * Scoring criteria * - Prefer matches at the start of a word, or the start of subwords in * CamelCase/camelCase/camel123 words. See WORD_START_SCORE/CAMEL_SCORE. * - Non-word characters matter. See NON_WORD_SCORE. * - The first characters of words of `pattern` receive bonus because they * usually have more significance than the rest. See * PATTERN_START_MULTIPLIER/PATTERN_NON_START_MULTIPLIER. * - Superfluous characters in `str` will reduce the score (gap penalty). See * GAP_SCORE. * - Prefer early occurrence of the first character. See * LEADING_GAP_SCORE/GAP_SCORE. * * The recurrence of the dynamic programming: * dp[i][j]: maximum accumulated score by aligning pattern[0..i] to str[0..j] * dp[0][j] = leading_gap_penalty(0, j) + score[j] * dp[i][j] = max(dp[i-1][j-1] + CONSECUTIVE_SCORE, max(dp[i-1][k] + * gap_penalty(k+1, j) + score[j] : k < j)) * * The first dimension can be suppressed since we do not need a matching * scheme, which reduces the space complexity from O(N*M) to O(M) * * @returns the sorting weight. */ int rofi_scorer_fuzzy_evaluate(const char *pattern, glong plen, const char *str, glong slen); /*@}*/ /** * @param a UTF-8 string to compare * @param b UTF-8 string to compare * @param n Maximum number of characters to compare * * Compares the `G_NORMALIZE_ALL_COMPOSE` forms of the two strings. * * @returns less than, equal to, or greater than zero if the first `n` * characters (not bytes) of `a` are found, respectively, to be less than, to * match, or be greater than the first `n` characters (not bytes) of `b`. */ int utf8_strncmp(const char *a, const char *b, size_t n) __attribute__((nonnull(1, 2))); /** * The startup notification context of the application to launch */ typedef struct { /** The name of the application */ const gchar *name; /** The binary name of the application */ const gchar *binary; /** The description of the launch */ const gchar *description; /** The icon name of the application */ const gchar *icon; /** The application id (desktop file with the .desktop suffix) */ const gchar *app_id; /** The window manager class of the application */ const gchar *wmclass; /** The command we run */ const gchar *command; } RofiHelperExecuteContext; /** * @param wd The working directory. * @param args The arguments of the command to exec. * @param error_precmd Prefix to error message command. * @param error_cmd Error message command * @param context The startup notification context, if any * * Executes the command * * @returns TRUE when successful, FALSE when failed. */ gboolean helper_execute(const char *wd, char **args, const char *error_precmd, const char *error_cmd, RofiHelperExecuteContext *context); /** * @param wd The work directory (optional) * @param cmd The cmd to execute * @param run_in_term Indicate if command should be run in a terminal * @param context The startup notification context, if any * * Execute command. * If needed members of context are NULL, they will be filled. * * @returns FALSE On failure, TRUE on success */ gboolean helper_execute_command(const char *wd, const char *cmd, gboolean run_in_term, RofiHelperExecuteContext *context); /** * @param file The file path * @param height The wanted height * Gets a surface from an svg path * * @returns a cairo surface from an svg path */ cairo_surface_t *cairo_image_surface_create_from_svg(const gchar *file, int height); /** * Ranges. */ /** * @param input String to parse * @param list List of ranges * @param length Length of list. * * ranges */ void parse_ranges(char *input, rofi_range_pair **list, unsigned int *length); /** * @param format The format string used. See below for possible syntax. * @param string The selected entry. * @param selected_line The selected line index. * @param filter The entered filter. * * Function that outputs the selected line in the user-specified format. * Currently the following formats are supported: * * i: Print the index (0-(N-1)) * * d: Print the index (1-N) * * s: Print input string. * * q: Print quoted input string. * * f: Print the entered filter. * * F: Print the entered filter, quoted * * This functions outputs the formatted string to stdout, appends a newline (\n) * character and calls flush on the file descriptor. */ void rofi_output_formatted_line(const char *format, const char *string, int selected_line, const char *filter); /** * @param string The string with elements to be replaced * @param ... Set of {key}, value that will be replaced, terminated by a * NULL * * Items {key} are replaced by the value if '{key}' is passed as key/value pair, * otherwise removed from string. If the {key} is in between [] all the text * between [] are removed if {key} is not found. Otherwise key is replaced and [ * & ] removed. * * This allows for optional replacement, f.e. '{ssh-client} [-t {title}] -e * "{cmd}"' the '-t {title}' is only there if {title} is set. * * @returns a new string with the keys replaced. */ char *helper_string_replace_if_exists(char *string, ...); /** * @param file File name passed to option. * @param ext File extension passed to option. * * @returns path to theme or copy of filename if not found. */ char *helper_get_theme_path(const char *file, const char *ext); G_END_DECLS /**@} */ #endif // ROFI_HELPER_H rofi-1.7.1/include/settings.h0000644000175100001710000001204314150243117013027 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_SETTINGS_H #define ROFI_SETTINGS_H #include /** * Enumeration indicating the matching method to use. * * @ingroup CONFIGURATION */ typedef enum { MM_NORMAL = 0, MM_REGEX = 1, MM_GLOB = 2, MM_FUZZY = 3, MM_PREFIX = 4 } MatchingMethod; /** * Possible sorting methods for listview. */ typedef enum { SORT_NORMAL = 0, SORT_FZF = 1 } SortingMethod; /** * Settings structure holding all (static) configurable options. * @ingroup CONFIGURATION */ typedef struct { /** List of enabled modi */ char *modi; /** Font string (pango format) */ char *menu_font; /** Whether to load and show icons */ gboolean show_icons; /** Terminal to use */ char *terminal_emulator; /** SSH client to use */ char *ssh_client; /** Command to execute when ssh session is selected */ char *ssh_command; /** Command for executing an application */ char *run_command; /** Command for executing an application in a terminal */ char *run_shell_command; /** Command for listing executables */ char *run_list_command; /** Command for window */ char *window_command; /** Window fields to match in window mode */ char *window_match_fields; /** Theme for icons */ char *icon_theme; /** Windows location/gravity */ WindowLocation location; /** Y offset */ int y_offset; /** X offset */ int x_offset; /** Always should config.menu_lines lines, even if less lines are available */ unsigned int fixed_num_lines; /** Do not use history */ unsigned int disable_history; /** Programs ignored for history */ char *ignored_prefixes; /** Toggle to enable sorting. */ unsigned int sort; /** Sorting method. */ SortingMethod sorting_method_enum; /** Sorting method. */ char *sorting_method; /** Desktop entries to match in drun */ char *drun_match_fields; /** Only show entries in this category */ char *drun_categories; /** Desktop entry show actions */ unsigned int drun_show_actions; /** Desktop format display */ char *drun_display_format; /** Desktop Link launch command */ char *drun_url_launcher; /** Search case sensitivity */ unsigned int case_sensitive; /** Cycle through in the element list */ unsigned int cycle; /** Height of an element in number of rows */ int element_height; /** Sidebar mode, show the modi */ unsigned int sidebar_mode; /** Mouse hover automatically selects */ gboolean hover_select; /** Lazy filter limit. */ unsigned int lazy_filter_limit; /** Auto select. */ unsigned int auto_select; /** Hosts file parsing */ unsigned int parse_hosts; /** Knonw_hosts file parsing */ unsigned int parse_known_hosts; /** Combi Modes */ char *combi_modi; char *matching; MatchingMethod matching_method; unsigned int tokenize; /** Monitors */ char *monitor; /** filter */ char *filter; /** dpi */ int dpi; /** Number threads (1 to disable) */ unsigned int threads; unsigned int scroll_method; char *window_format; /** Click outside the window to exit */ int click_to_exit; char *theme; /** Path where plugins can be found. */ char *plugin_path; /** Maximum history length per mode. */ unsigned int max_history_size; gboolean combi_hide_mode_prefix; char matching_negate_char; /** Cache directory. */ char *cache_dir; /** Window Thumbnails */ gboolean window_thumbnail; /** drun cache */ gboolean drun_use_desktop_cache; gboolean drun_reload_desktop_cache; /** Benchmark */ gboolean benchmark_ui; gboolean normalize_match; /** Steal focus */ gboolean steal_focus; /** fallback icon */ char *application_fallback_icon; } Settings; /** Default number of lines in the list view */ #define DEFAULT_MENU_LINES 15 /** Default number of columns in the list view */ #define DEFAULT_MENU_COLUMNS 1 /** Default window width */ #define DEFAULT_MENU_WIDTH 50.0f /** Global Settings structure. */ extern Settings config; #endif // ROFI_SETTINGS_H rofi-1.7.1/include/display.h0000644000175100001710000000456214150243117012643 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_DISPLAY_H #define ROFI_DISPLAY_H #include "helper.h" #include "nkutils-bindings.h" #include /** * @param main_loop The GMainLoop * @param bindings The bindings object * * Setup the display backend * * @returns Whether the setup succeeded or not */ gboolean display_setup(GMainLoop *main_loop, NkBindings *bindings); /** * Do some late setup of the display backend * * @returns Whether the setup succeeded or not */ gboolean display_late_setup(void); /** * Do some early cleanup, like unmapping the surface */ void display_early_cleanup(void); /** * Cleanup any remaining display related stuff */ void display_cleanup(void); /** * Dumps the display layout for -help output */ void display_dump_monitor_layout(void); /** * @param context The startup notification context for the application to launch * @param child_setup A pointer to return the child setup function * @param user_data A pointer to return the child setup function user_data * * Provides the needed child setup function */ void display_startup_notification(RofiHelperExecuteContext *context, GSpawnChildSetupFunc *child_setup, gpointer *user_data); #endif rofi-1.7.1/include/rofi-types.h0000644000175100001710000001337314150243117013277 00000000000000#ifndef INCLUDE_ROFI_TYPES_H #define INCLUDE_ROFI_TYPES_H #include #include G_BEGIN_DECLS /** * Type of property */ typedef enum { /** Integer */ P_INTEGER, /** Double */ P_DOUBLE, /** String */ P_STRING, /** Character */ P_CHAR, /** Boolean */ P_BOOLEAN, /** Color */ P_COLOR, /** Image */ P_IMAGE, /** RofiPadding */ P_PADDING, /** Link to global setting */ P_LINK, /** Position */ P_POSITION, /** Highlight */ P_HIGHLIGHT, /** List */ P_LIST, /** Orientation */ P_ORIENTATION, /** Cursor */ P_CURSOR, /** Inherit */ P_INHERIT, /** Number of types. */ P_NUM_TYPES, } PropertyType; /** * This array maps PropertyType to a user-readable name. * It is important this is kept in sync. */ extern const char *const PropertyTypeName[P_NUM_TYPES]; /** Style of text highlight */ typedef enum { /** no highlight */ ROFI_HL_NONE = 0, /** bold */ ROFI_HL_BOLD = 1, /** underline */ ROFI_HL_UNDERLINE = 2, /** strikethrough */ ROFI_HL_STRIKETHROUGH = 16, /** small caps */ ROFI_HL_SMALL_CAPS = 32, /** italic */ ROFI_HL_ITALIC = 4, /** color */ ROFI_HL_COLOR = 8 } RofiHighlightStyle; /** Style of line */ typedef enum { /** Solid line */ ROFI_HL_SOLID, /** Dashed line */ ROFI_HL_DASH } RofiLineStyle; /** * Distance unit type. */ typedef enum { /** PixelWidth in pixels. */ ROFI_PU_PX, /** PixelWidth in millimeters. */ ROFI_PU_MM, /** PixelWidth in EM. */ ROFI_PU_EM, /** PixelWidget in percentage */ ROFI_PU_PERCENT, /** PixelWidth in CH. */ ROFI_PU_CH, } RofiPixelUnit; /** * Structure representing a distance. */ typedef enum { ROFI_DISTANCE_MODIFIER_NONE, ROFI_DISTANCE_MODIFIER_ADD, ROFI_DISTANCE_MODIFIER_SUBTRACT, ROFI_DISTANCE_MODIFIER_DIVIDE, ROFI_DISTANCE_MODIFIER_MULTIPLY, ROFI_DISTANCE_MODIFIER_MODULO, ROFI_DISTANCE_MODIFIER_GROUP, ROFI_DISTANCE_MODIFIER_MIN, ROFI_DISTANCE_MODIFIER_MAX, } RofiDistanceModifier; typedef struct RofiDistanceUnit { /** Distance */ double distance; /** Unit type of the distance */ RofiPixelUnit type; /** Type */ RofiDistanceModifier modtype; /** Modifier */ struct RofiDistanceUnit *left; /** Modifier */ struct RofiDistanceUnit *right; } RofiDistanceUnit; typedef struct { /** Base */ RofiDistanceUnit base; /** Style of the line (optional)*/ RofiLineStyle style; } RofiDistance; /** * Type of orientation. */ typedef enum { ROFI_ORIENTATION_VERTICAL, ROFI_ORIENTATION_HORIZONTAL } RofiOrientation; /** * Cursor type. */ typedef enum { ROFI_CURSOR_DEFAULT, ROFI_CURSOR_POINTER, ROFI_CURSOR_TEXT } RofiCursorType; /** * Represent the color in theme. */ typedef struct { /** red channel */ double red; /** green channel */ double green; /** blue channel */ double blue; /** alpha channel */ double alpha; } ThemeColor; /** * Theme Image */ typedef enum { ROFI_IMAGE_URL, ROFI_IMAGE_LINEAR_GRADIENT } RofiImageType; typedef enum { ROFI_DIRECTION_LEFT, ROFI_DIRECTION_RIGHT, ROFI_DIRECTION_TOP, ROFI_DIRECTION_BOTTOM, ROFI_DIRECTION_ANGLE, } RofiDirection; typedef enum { ROFI_SCALE_NONE, ROFI_SCALE_BOTH, ROFI_SCALE_HEIGHT, ROFI_SCALE_WIDTH, } RofiScaleType; typedef struct { RofiImageType type; char *url; RofiScaleType scaling; int wsize; int hsize; RofiDirection dir; double angle; /** colors */ GList *colors; /** cached image */ uint32_t surface_id; } RofiImage; /** * RofiPadding */ typedef struct { RofiDistance top; RofiDistance right; RofiDistance bottom; RofiDistance left; } RofiPadding; /** * Theme highlight. */ typedef struct { /** style to display */ RofiHighlightStyle style; /** Color */ ThemeColor color; } RofiHighlightColorStyle; /** * Enumeration indicating location or gravity of window. * * \verbatim WL_NORTH_WEST WL_NORTH WL_NORTH_EAST \endverbatim * \verbatim WL_EAST WL_CENTER WL_EAST \endverbatim * \verbatim WL_SOUTH_WEST WL_SOUTH WL_SOUTH_EAST\endverbatim * * @ingroup CONFIGURATION */ typedef enum { /** Center */ WL_CENTER = 0, /** Top middle */ WL_NORTH = 1, /** Middle right */ WL_EAST = 2, /** Bottom middle */ WL_SOUTH = 4, /** Middle left */ WL_WEST = 8, /** Left top corner. */ WL_NORTH_WEST = WL_NORTH | WL_WEST, /** Top right */ WL_NORTH_EAST = WL_NORTH | WL_EAST, /** Bottom right */ WL_SOUTH_EAST = WL_SOUTH | WL_EAST, /** Bottom left */ WL_SOUTH_WEST = WL_SOUTH | WL_WEST, } WindowLocation; typedef union _PropertyValue { /** integer */ int i; /** Double */ double f; /** String */ char *s; /** Character */ char c; /** boolean */ gboolean b; /** Color */ ThemeColor color; /** RofiPadding */ RofiPadding padding; /** Reference */ struct { /** Name */ char *name; /** Cached looked up ref */ struct Property *ref; /** Property default */ struct Property *def_value; } link; /** Highlight Style */ RofiHighlightColorStyle highlight; /** Image */ RofiImage image; /** List */ GList *list; } PropertyValue; /** * Property structure. */ typedef struct Property { /** Name of property */ char *name; /** Type of property. */ PropertyType type; /** Value */ PropertyValue value; } Property; /** * Structure to hold a range. */ typedef struct rofi_range_pair { int start; int stop; } rofi_range_pair; /** * Internal structure for matching. */ typedef struct rofi_int_matcher_t { GRegex *regex; gboolean invert; } rofi_int_matcher; /** * Structure with data to process by each worker thread. * TODO: Make this more generic wrapper. */ typedef struct _thread_state { void (*callback)(struct _thread_state *t, gpointer data); } thread_state; extern GThreadPool *tpool; G_END_DECLS #endif // INCLUDE_ROFI_TYPES_H rofi-1.7.1/include/view-internal.h0000644000175100001710000001007714150243117013760 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_VIEW_INTERNAL_H #define ROFI_VIEW_INTERNAL_H #include "keyb.h" #include "mode.h" #include "theme.h" #include "widgets/box.h" #include "widgets/container.h" #include "widgets/icon.h" #include "widgets/listview.h" #include "widgets/textbox.h" #include "widgets/widget.h" #include "xcb.h" /** * @ingroup ViewHandle * * @{ */ // State of the menu. struct RofiViewState { /** #Mode bound to to this view. */ Mode *sw; /** Flag indicating if view needs to be refiltered. */ int refilter; /** Widget representing the main container. */ box *main_window; /** #textbox showing the prompt in the input bar. */ textbox *prompt; /** #textbox with the user input in the input bar. */ textbox *text; /** #textbox showing the state of the case sensitive and sortng. */ textbox *case_indicator; /** #listview holding the displayed elements. */ listview *list_view; /** #textbox widget showing the overlay. */ textbox *overlay; /** #container holding the message box */ container *mesg_box; /** #textbox containing the message entry */ textbox *mesg_tb; /** Array with the levenshtein distance for each element. */ int *distance; /** Array with the translation between the filtered and unfiltered list. */ unsigned int *line_map; /** number of (unfiltered) elements to show. */ unsigned int num_lines; /** number of (filtered) elements to show. */ unsigned int filtered_lines; /** Previously called key action. */ KeyBindingAction prev_action; /** Time previous key action was executed. */ xcb_timestamp_t last_button_press; /** Indicate view should terminate */ int quit; /** Indicate if we should absorb the key release */ int skip_absorb; /** The selected line (in the unfiltered list) */ unsigned int selected_line; /** The return state of the view */ MenuReturn retv; /** Monitor #workarea the view is displayed on */ workarea mon; /** #box holding the different modi buttons */ box *sidebar_bar; /** number of modi to display */ unsigned int num_modi; /** Array of #textbox that act as buttons for switching modi */ textbox **modi; /** Total rows. */ textbox *tb_total_rows; /** filtered rows */ textbox *tb_filtered_rows; /** Settings of the menu */ MenuFlags menu_flags; /** If mouse was within view previously */ int mouse_seen; /** Flag indicating if view needs to be reloaded. */ int reload; /** The function to be called when finalizing this view */ void (*finalize)(struct RofiViewState *state); /** Width of the view */ int width; /** Height of the view */ int height; /** X position of the view */ int x; /** Y position of the view */ int y; /** Position and target of the mouse. */ struct { /** X position */ int x; /** Y position */ int y; /** Widget being targeted. */ widget *motion_target; } mouse; /** Regexs used for matching */ rofi_int_matcher **tokens; }; /** @} */ #endif rofi-1.7.1/include/rofi.h0000644000175100001710000000710514150243117012131 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_MAIN_H #define ROFI_MAIN_H #include "keyb.h" #include "mode.h" #include "rofi-types.h" #include "view.h" #include #include #include #include #include /** * @defgroup Main Main * @{ */ /** * Pointer to xdg cache directory. */ extern const char *cache_dir; /** * Get the number of enabled modi. * * @returns the number of enabled modi. */ unsigned int rofi_get_num_enabled_modi(void); /** * @param index The mode to return. (should be smaller then * rofi_get_num_enabled_mode) * * Get an enabled mode handle. * * @returns a Mode handle. */ const Mode *rofi_get_mode(unsigned int index); /** * @param str A GString with an error message to display. * * Queue an error. */ void rofi_add_error_message(GString *str); /** * Clear the list of stored error messages. */ void rofi_clear_error_messages(void); /** * @param code the code to return * * Return value are used for integrating dmenu rofi in scripts. * This function sets the code that rofi will return on exit. */ void rofi_set_return_code(int code); void rofi_quit_main_loop(void); /** * @param name Search for mode with this name. * * @return returns Mode * when found, NULL if not. */ Mode *rofi_collect_modi_search(const char *name); /** Reset terminal */ #define color_reset "\033[0m" /** Set terminal text bold */ #define color_bold "\033[1m" /** Set terminal text italic */ #define color_italic "\033[2m" /** Set terminal foreground text green */ #define color_green "\033[0;32m" /** Set terminal foreground text red */ #define color_red "\033[0;31m" /** Appends instructions on how to report an error. */ #define ERROR_MSG(a) \ a "\n" \ "If you suspect this is caused by a bug in rofi,\n" \ "please report the following information to rofi's github page:\n" \ " * The generated commandline output when the error occurred.\n" \ " * Output of -dump-xresource\n" \ " * Steps to reproduce\n" \ " * The version of rofi you are running\n\n" \ " https://github.com/davatorium/rofi/" /** Indicates if ERROR_MSG uses pango markup */ #define ERROR_MSG_MARKUP TRUE /**@}*/ #endif rofi-1.7.1/include/history.h0000644000175100001710000000451014150243117012670 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_HISTORY_H #define ROFI_HISTORY_H /** * @defgroup HISTORY History * @ingroup HELPERS * * Implements a very simple history module that can be used by a #Mode. * * This uses the following options from the #config object: * * #Settings::disable_history * * #Settings::ignored_prefixes * * @{ */ /** * @param filename The filename of the history cache. * @param entry The entry to add/increment * * Sets the entry in the history, if it exists its use-count is incremented. * */ void history_set(const char *filename, const char *entry) __attribute__((nonnull)); /** * @param filename The filename of the history cache. * @param entry The entry to remove * * Removes the entry from the history. */ void history_remove(const char *filename, const char *entry) __attribute__((nonnull)); /** * @param filename The filename of the history cache. * @param length The length of the returned list. * * Gets the entries in the list (in order of usage) * @returns a list of entries length long. (and NULL terminated). */ char **history_get_list(const char *filename, unsigned int *length) __attribute__((nonnull)); /**@}*/ #endif // ROFI_HISTORY_H rofi-1.7.1/include/helper-theme.h0000644000175100001710000000425214150243117013551 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_HELPER_THEME_H #define ROFI_HELPER_THEME_H #include "theme.h" #include /** * @defgroup HELPERS Helpers * @{ */ /** * @param th The RofiHighlightColorStyle * @param tokens Array of regexes used for matching * @param input The input string to find the matches on * @param retv The Attribute list to update with matches * * Creates a set of pango attributes highlighting the matches found in the input * string. * * @returns the updated retv list. */ PangoAttrList *helper_token_match_get_pango_attr(RofiHighlightColorStyle th, rofi_int_matcher **tokens, const char *input, PangoAttrList *retv); /** * @param pfd Pango font description to validate. * @param font The name of the font to check. * * @returns true if font is valid. */ gboolean helper_validate_font(PangoFontDescription *pfd, const char *font); /** @} */ #endif // ROFI_HELPER_THEME_H rofi-1.7.1/include/xcb-internal.h0000644000175100001710000000401514150243117013555 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_XCB_INTERNAL_H #define ROFI_XCB_INTERNAL_H /** Indication we accept that startup notification api is not yet frozen */ #define SN_API_NOT_YET_FROZEN #include #include #include #include #include #include /** * Structure to keep xcb stuff around. */ struct _xcb_stuff { GMainLoop *main_loop; GWaterXcbSource *source; xcb_connection_t *connection; xcb_ewmh_connection_t ewmh; xcb_screen_t *screen; int screen_nbr; SnDisplay *sndisplay; SnLauncheeContext *sncontext; struct _workarea *monitors; struct { /** Flag indicating first event */ uint8_t first_event; /** Keyboard device id */ int32_t device_id; } xkb; xcb_timestamp_t last_timestamp; NkBindingsSeat *bindings_seat; gboolean mouse_seen; xcb_window_t focus_revert; }; #endif rofi-1.7.1/include/mode-private.h0000644000175100001710000001320314150243117013562 00000000000000/* * rofi * * MIT/X11 License * Copyright © 2013-2021 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef ROFI_MODE_PRIVATE_H #define ROFI_MODE_PRIVATE_H #include G_BEGIN_DECLS /** ABI version to check if loaded plugin is compatible. */ #define ABI_VERSION 6u /** * @param data Pointer to #Mode object. * * Mode free function. */ typedef void (*_mode_free)(Mode *data); /** * @param sw The #Mode pointer * @param selected_line The selected line * @param state The state to display [out] * @param attribute_list List of extra (pango) attribute to apply when * displaying. [out][null] * @param get_entry if it should only return the state * * Get the value for displaying. * * @return the string and state for displaying. */ typedef char *(*_mode_get_display_value)(const Mode *sw, unsigned int selected_line, int *state, GList **attribute_list, int get_entry); /** * @param sw The #Mode pointer * @param selected_line The selected line * * Obtains the icon if available * * @return Get the icon */ typedef cairo_surface_t *(*_mode_get_icon)(const Mode *sw, unsigned int selected_line, int height); /** * @param sw The #Mode pointer * @param selected_line The selected line * * Obtains the string to complete. * * @return Get the completion string */ typedef char *(*_mode_get_completion)(const Mode *sw, unsigned int selected_line); /** * @param tokens List of (input) tokens to match. * @param input The entry to match against. * @param case_sensitive Whether case is significant. * @param index The current selected index. * @param data User data. * * Function prototype for the matching algorithm. * * @returns 1 when it matches, 0 if not. */ typedef int (*_mode_token_match)(const Mode *data, rofi_int_matcher **tokens, unsigned int index); /** * @param sw The #Mode pointer * * Initialize the mode. * * @returns TRUE is successful */ typedef int (*__mode_init)(Mode *sw); /** * @param sw The #Mode pointer * * Get the number of entries. * * @returns the number of entries */ typedef unsigned int (*__mode_get_num_entries)(const Mode *sw); /** * @param sw The #Mode pointer * * Destroy the current mode. Still ready to restart. * */ typedef void (*__mode_destroy)(Mode *sw); /** * @param sw The #Mode pointer * @param menu_retv The return value * @param input The input string * @param selected_line The selected line * * Handle the user accepting an entry. * * @returns the next action to take */ typedef ModeMode (*_mode_result)(Mode *sw, int menu_retv, char **input, unsigned int selected_line); /** * @param sw The #Mode pointer * @param input The input string * * Preprocess the input for sorting. * * @returns Entry stripped from markup for sorting */ typedef char *(*_mode_preprocess_input)(Mode *sw, const char *input); /** * @param sw The #Mode pointer * * Message to show in the message bar. * * @returns the (valid pango markup) message to display. */ typedef char *(*_mode_get_message)(const Mode *sw); /** * Structure defining a switcher. * It consists of a name, callback and if enabled * a textbox for the sidebar-mode. */ struct rofi_mode { /** Used for external plugins. */ unsigned int abi_version; /** Name (max 31 char long) */ char *name; char cfg_name_key[128]; char *display_name; /** * A switcher normally consists of the following parts: */ /** Initialize the Mode */ __mode_init _init; /** Destroy the switcher, e.g. free all its memory. */ __mode_destroy _destroy; /** Get number of entries to display. (unfiltered). */ __mode_get_num_entries _get_num_entries; /** Process the result of the user selection. */ _mode_result _result; /** Token match. */ _mode_token_match _token_match; /** Get the string to display for the entry. */ _mode_get_display_value _get_display_value; /** Get the icon for the entry. */ _mode_get_icon _get_icon; /** Get the 'completed' entry. */ _mode_get_completion _get_completion; _mode_preprocess_input _preprocess_input; _mode_get_message _get_message; /** Pointer to private data. */ void *private_data; /** * Free SWitcher * Only to be used when the switcher object itself is dynamic. * And has data in `ed` */ _mode_free free; /** Extra fields for script */ void *ed; /** Module */ GModule *module; }; G_END_DECLS #endif // ROFI_MODE_PRIVATE_H rofi-1.7.1/config.h.in0000644000175100001710000000544514150243200011417 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Enable libasan */ #undef ENABLE_ASAN /* Enable desktop file run dialog */ #undef ENABLE_DRUN /* Enable gcov profiling */ #undef ENABLE_GCOV /* The highest GLib version supported */ #undef GLIB_VERSION_MAX_ALLOWED /* The lower GLib version supported */ #undef GLIB_VERSION_MIN_REQUIRED /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* b */ #undef NK_XKBCOMMON_HAS_COMPOSE /* b */ #undef NK_XKBCOMMON_HAS_CONSUMED2 /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Enable the window mode */ #undef WINDOW_MODE /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE #include "gitconfig.h" rofi-1.7.1/AUTHORS0000644000175100001710000000147414150243117010451 00000000000000Aaron Ash Adrià Farrés Anton Löfgren Avatar bendem Benjamin Cremer Benjamin R. Haskell Bruno Braga Buglloc Chris Salzberg daemoni Dan Beste Daniel Hahler DanteFireX Dave Davenport Deiwin Sarjas Dimitar Yordanov Edwin Pujols eigengrau Eric Engeström Fangrui Song fice-t Florian Franzen Gabriel Holodak Gareth Poole Georgios Bitzes Greg Fitzgerald Guy Hughes Hexchain Tong Ian Remmler James Vaughan Jason Pleau Jasper Lievisse Adriaanse Klemens Schölhorn koppa lbonn Marcin Sedlak marduk Michael Vetter Moritz Maxeiner Nick87720z Niklas Haas N. Izumi Paulo Flabiano Smorigo Peter Cannici qedi Quentin Glidic Rasmus Steinke RaZ0rr-Two Roomcays seanpringle Sebastian Reuße Simon Hanna Stanislav Seletskiy Thomas Adam Thorsten Wißmann Tilman Blumenbach Tobias Kortkamp Tom Hinton TonCherAmi vimeitor Wieland Hoffmann Yaroslav rofi-1.7.1/Changelog0000644000175100001710000006224414150243117011215 00000000000000v1.7.1: Turtley amazing! - [Theme] Fix highlight with only theme. - Updated documentation and landing page (Thanks to RaZ0rr-Two) - [Combi] Fix nesting combi modi (#1510) - [DMenu] Fix crash dmenu mode when no entry is available. (#1504) - [Run|Drun] Only initialize file-completer on first use. - [FileBrowser] Reduce number of re-allocs. - [Readme] Remove generating readme.html for dist. - [Dmenu] Fix uninitialized memory (non-selectable) - [FileBrowser] Try to convert invalid encoded text. (#1471) - [FileBrowser] Don't crash on invalid file filenames. (#1471) - [Theme] print known colors as its color name. - [CMD] If failed to convert commandline to new option, do not stop. (#1425) - [Theme] Fix parsing of nested media blocks. (#1442) - [Widgets] Fix sizing logic widgets. (#1437) - [Window] Try to fix auto-sizing of desktop names for non-i3 desktops. (#1439) - [Window] Fix broken close-on-delete. (#1421) - [Listview] Correctly check if selected item is highlighted. (#1423) - [Entry] Allow action to be taken on input change. (#1405) - [Theme] Don't truncate double values. (#1419) - [Grammar] Add support for env(ENV,default). - [Documentation] documentation fixes. - [Theme] fix dmenu theme ( #1396). v1.7.0: Iggy 2024 - ADD: -steal-focus option. - ADD: [Config] Add nested configuration option support. - ADD: [Config] Support for handling dynamic config options. - ADD: [IconFetcher] Find images shipped with the theme. - ADD: [DRun] Add support for passing file (using file-browser) completer for desktop files that support his. - ADD: [DRun] Support for service files. - ADD: [FileBrowser] Allow setting startup directory (#1325) - ADD: [FileBrowser]: Add sorting-method. (#1340) - ADD: [FileBrowser] Add option to group directories ahead of files. (#1352) - ADD: [Filtering] Add prefix matching method. (#1237) - ADD: [Icon] Add option to square the widget. - ADD: [Icon|Button] Make action available on icon, button and keybinding name. - ADD: [KeyBinding] Add Ctrl-Shift-Enter option. (#874) - ADD: [ListView]-hover-select option. (#1234) - ADD: [Run] Add support for passing file (using file-browser) completer. - ADD: [Textbox] Allow theme to force markup on text widget. - ADD: [Theme] theme validation option. (`-rasi-validate`) - ADD: [View] Add support for user timeout and keybinding action. - ADD: [Widget] Add cursor property (#1313) - ADD: [Widget] Add scaling option to background-image. - ADD: [Widget] Add support background-image and lineair gradient option. - ADD: [Window] Add pango markup for window format (#1288) - ADD: [Window] Allow rofi to stay open after closing window. - FIX: [DSL] Move theme reset into grammar parser from lexer. - FIX: [Drun]: fix sorting on broken desktop files. (thanks to nick87720z) - FIX: [File Browser]: Fix escaping of paths. - FIX: [ListView] Fix wrong subwidget name. - FIX: [Script] Don't enable custom keybindings by default. - FIX: [TextBox] Fix height estimation. - FIX: [Theme] widget state and inherited properties. This should help fixing some old themes with changes from 1.6.1. - FIX: [Widget] Fix rendering of border and dashes. (Thanks to nick87720z) - FIX: [Build] Fix CI. - FIX: [Theme] Discard old theme, when explicitly passing one on command line. - REMOVE: -dump-xresources - REMOVE: -fullscreen - REMOVE: -show-match - REMOVE: Old xresources based configuration file. - REMOVE: fake transparency/background option, part of theme now. - REMOVE: xresources parsing via Xserver - Remove: [Theme] Remove backwards compatiblity hack. - DOC: Update changes to manpages v1.6.1: Tortoise Power - Use GdkPixbuf for Icon parsing. - Add FileBrowser to default mode. - Fix parsing dicts in config file (with " in middle of string.) - Add -normalize-match option, that tries to o match ö, é match e. (#1119) - [Theme] Add min/max operator support to calc() (#1172) - Show error message and return to list instead of closing (#1187) - [Theme] Add nested media support. (#1189) - [Textbox] Try to fix estimated font height. (#1190) - [DRun] Fix broken caching mechanism. v1.6.0: The Masked Launcher - Add `themes/` directory in the users rofi config directory to the theme search path. (#1001) - Split listview element into box widget holding icon and textbox. Supporting more dynamic themes. (#949) - Fix default theme. - Add -upgrade-config option. - Add `ROFI_PLUGIN_PATH` variable. - Add check for running rofi inside a Script mode. - Remove gnome-terminal from rofi-sensible-terminal (#1074) - Set window title based on mode name. (#969) - Subpixel rendering workaround. (#303) - Support character type in configuration {} block . (#1131) - Use `XDG_CONFIG_DIRS` (#1133) - [Box] Bug fix update propagation. - [Build] Fix meson build with meson 0.55. - [DMenu] Add `-keep-right` flag. (#1089) - [DMenu] Don't match markup when filtering. (#579,#1128) - [DRUN] Support Type=Link (#1166) - [DRun] Add % to escape variable. - [DRun] Add an optional cache for desktop files. (#1040) - [DRun] Add keywords as default match item. (#1061) - [DRun] Don't run custom commands. - [DRun] Match keywords field. - [DRun] Only show selected categories. (#817) - [Dmenu|Script] Add non-selectable entries. (#1024) - [Doc] Update documentation. - [IconFetcher] Add jpeg support. - [Icon] Set default size to 1.2 CH. - [Icon] support distance for size. - [Listview] Add widget to show keybinding index. (#1050) - [Listview] Fix distribution of remaining space. - [Listview] Fix left-to-right scrolling. (#1028) - [Listview] Fix updating elements. (#1032) - [Matching] Make Fuzzy matching non greedy. - [Script] Add delimiter option. (#1041) - [Script] Add environment variable indicating state. - [Script] Add extra matchign field (meta). (#1052) - [Script] Add info option, hidden field that gets passed to script via `ROFI_INFO` environment. - [Script] Add no-custom option. - [Textbox] Add cursor blinking option. - [Textbox] Add placeholder. (#1020) - [Theme] Add `calc()` support. (#1105) - [Theme] Add alpha channel to highlight color. (#1033) - [Theme] Add sidebar as mode-switcher alias. - [Theme] Add some initial @media support. (#893) - [Theme] Support buttons in the UI. - [View] Add two widgets. One showing number of rows, other number of filtered rows. (#1026) - [Window] Add window thumbnail option. - [Window] Remove arbitrary # window limit. (#1047) - [Window] check buffer overflow. v1.5.5: v1.5.4: Painful tardiness - SSH: Fix wrong malloc size, causing crash. v1.5.3: Time delayed progress - Update manpage with missing entry. (#937) - Rename sidebar widget to mode-switcher and allow configuration from theme. - Timing: Moving timing output to glib debug system. - SSH: Fix unitialized variable issue. - SSH: resolve ':' conflict in history entries. - RASI Lexer: Fix nested () in variable default field. - USABILITY: When mode not found, show in gui not just on commandline. - ICON: Allow aligning image in icon widget. - Meson build system: cleanups and improvements. - Meson build system: add documentation (#943) - Window: Fix default formatting and remove (invalid) deprecation warning. - DMenu: Add support for showing icons infront of displayed list. - Overlay: Fix overlay widget to correctly integrate in new theme format. - Update libnkutils, libgwater. - SSH: be case-insensitive when parsing keywords. - DMENU: Add format option to strip pango markup from return value. - ListView: allow user to change ellipsizing displayed value at run-time. v1.5.2: Procrastination in progress - Clearify Check dependency. (#879) - Add option to change negate character. (#877) - Fix assert and update test. (#875) - Add missing example Script (#869) - Add drun-display-format option. (#858) - Fixing typos (#867,#837,#831,#804) - Fix loading icons that are in cache (#860) - Improve ssh known_host parser. (#820) - Add terminals to rofi-sensible-terminal (#808) - Lexer Fix several ambiguity and handling of empty input. - IconFetcher preload the user set icon theme. - IconFetcher use generic threadpool. - Lexer support environment variables. - Cleanup syntax for sorting. (#816) - Documents update. - Fix how borders are drawn. (#792, #783) v1.5.1: - Egor Zvorykin: Fix typos in theme manpage. (#760) - Ben: Fix README config file location. (#761) - [SSH] Reload when ssh entry is deleted. - Add support for randr 1.5 monitors. (#749) - Diki Anata: Fix border layout structure. - Remove duplicate tests. (#543) - Fix make test in libnkutils. v1.5.0: - [Theme] Accept integer notation for double properties. (#752) - [View] Theme textboxes are vertically sized and horizontal wrapped. (#754) - Rofi 1.4.2 doesn't capture ←, ↑, →, ↓ binding to keys to work in combination with Mode_switch (#744) - Add konsole to list of sensible terminals. (#739) - Allow drun to filter based on comment field. (#733) - Add prompt widget to default theme. - Add manpage for rofi-theme-selector. - Dump theme without # prefix and separator . - Fix issue with xnomad and -4 placing. (#683) - DRun obey OnlyShowIn and NotShowIn properties. - Store default theme in rofi binary using GResources. - Add extra margin between prompt and entry. - Remove colon from prompt. (#637) - Add support for passing extra properties in script mode. - Better error message on invalid argb syntax. - Fix default theme border. - Make '#' in the parser optional. - Update themes. - Add -drun/window-match-fields option (thx to Askrenteam) for drun/window menu. (#690/#656) - Implement negated match. (#665) - Fix parsing of non-existing fields. (#700) - rofi-theme-selector fixes. - Fix spelling error (thx to jmkjaer) - Fix test on i686/arm. (#692) - Fix error in theme manpage. (#686) - Allow history size to be specified. (#613) - Fix drun history implementation. (#579) - Add gentoo install instruction. (#685) v1.4.2: - Add sort to manpage. (#682) - Add tranaparent to theme manpage. (#688) - Re-add theme headers. (#679) - Fix super key. (#684) - Unknown option libnkutils:uuid. (#677) - Mode window is not found. (#686) - Fix meson build in dist file. v1.4.1: All Hail Rasi - Bump meson release version v1.4.0: I reject your truth and substitute my own New Features: - FZF style sorting for fuzzy matching (thanks to MaskRay) (#533) - Improve error messages. - Theme parsing. - Keybinding. - invalid commandline options. - etc. - Customizable highlight. - Give up when keyboard is not grabbed in first 5 seconds. - Improved manpage - rofi (1) - rofi-themes (5) - Super-{1..10} hotkey for first 10 rows. - Allow x-align/y-align for textbox. - Support matching bangs on multiple characters in combi mode. (#542) - Set WM_CLASS (#549) - Async pre-read 25 rows for improving user experience. (#550) - Improve handling in floating window manager by always setting window size. - DRun speedup. - Make lazy-grab defualt. - Remove extra layer in textbox. (#553) - Ignore fonts that result in a family name or size 0. (#554) - [Combi] Allow bang to match multiple modes. (#552) - Add detection of window manager and work around quirks. - Support dynamic plugins. - DMENU tty detection. - Support for icons in drun, combi and window mode. - Startup notification of launched application support. - Meson support. - Fuzzy matching with fzf based sorting algorithm. - Auto-detect DPI. - Set cursor at the end of the input field. (#662) - Meson support (thx to SardemFF7). - [Script] parse the command as if it was commandline. (#650) - Don't enable asan by meson. (#642) - Allow text widgets to be added in theme and string to be set. - [Dmenu] Support the -w flag. - Allow window (via window id) to be location for rofi window. - [Dmenu] Allow multi-select mode in `-no-custom` mode. v1.3.1: Dan vs. Greg: The never ending story, reloaded. New Features - [DRun] Search categories. (#449) Improvements - Fix exit when failed to grab keyboard. (#524) - Introduce lazy keyboard grab mode for people who want rofi to show on key-down in i3. - Add copyrights to theme (needed for debian packaging). - DMENU: Correctly detect end-of-file (#518) - Directly queue redraw on overlay change. - Remove pango markup from workspace names in I3. (#507) v1.3.0: Dan vs. Greg: The never ending story. New Features - Use randr for getting monitor layout. Fallback to xinerama if not available. - Re-add fuzzy matcher. - Restructure internal code to use dynamic sizing widgets. (hbox, vbox and lists) - Async mode for dmenu. - Add theme selector script. - Include 21 themes. - Dynamically sizing window with content. - When placed at bottom of screen re-order screen to have entry at bottom. Improvements - Fix pasting secondary clipboard. (#516) - By default use all cores to filter entries. - Make sure drawing priority is higher then reading input data. - Improve resizing of window, don't make X whipe background. - Improve close window (shift-delete) action, by sending NET_WM_CLOSE instead of destroying window. - Create cache and run directory on startup. (#497) - Fix uneeded redraws on cursor blinking. (#491) - Improve time till grabbing keyboard. (#494) - Better error message when failing to parse keybindings, also continue parsing on error. - Fix problem with custom layouts (#485) - Speedup drawing of screen. Works well now for 4k and 8k screens. (factor 1000+ speedup for the flipping of buffer) (#496) - DRun mode more compatible with specification. - Debug output via g_log. - Fix password entry cursor position. - Use bash instead of sh for get_git_rev.sh (#445) - Add Control+G for cancel (#452) - Add padding option to textbox (#449) - Ctrl-click does alternate accept entry. (#429) - Hide window decoration in normal window mode. - Click to exit option. (#460) - Fix cursor blinking on moving. (#462) - Remove entry from history if fails to execute (#466) - Fix margins. (#467) - Improved documentation of functions in code. - DRun: Set work directory when executing file. (#482) - Memory leak fixes. - Improve scrollbar behaviour. Removals - opacity option. The transparency support in the theme can do the same and more. v1.2.0 New Features - Highlight matched part of the string. - Make window switcher string customizable. Improvements - Improved selection mode in dmenu with selection counter. - Improved selection mode with 'dot' indicator. - Fix Current Desktop window switcher. - Fix launching in terminal. - Supports include in config. - Add Control+k remove till eol keybinding. - Change clear line to Control+w and make Control+u remove till sol (matching readline) - Track origin of option value e.g. who set the option. - Comment default values in dump-xresources. - Fix displaying on 30bit 10bpc X setup. Removals: - Remove xlib dependency (xcb-xrm) - Remove fuzzy option - Remove i3 workaround as it no longer needed since I3 v4.9. (Feb. 2015) v1.1.0 New Features - Keys mode, showing keybindings. - Stop cycling option (#407) (Thx to Yaroslav) - Kill window on delete entry (#316) Improvements - Add Control+Backspace as remove word back keybinding. - Allow user to use X11 background for fake transparency (#390) - Allow user to specify background image. - Improved keybinding handling, allowing on-release and modifier only (#384). - Use display name for prompt (#409) - Parse subdirectories in drun parser (#416) - Switch to stop cycling (#407) Bug fixes - Grab mouse pointer with keyboard 1.0.1 Bug fixes - Fix typo in manpage. - Return old behaviour for rofi placement (#395, #389) - Switch desktop when switching window (#393) - Remove unneeded use of bash (#391) - Make history parser more robust against corrupted files. (#388) - Fix desktop number (#386) 1.0.0 New Features - Blinking cursor - BliSeparate configuration file - BliHistory in drun mode (#343) - BliContext menu mode, show rofi at the mouse pointer Improvement - auto select and single item on dmenu mode (#281) - Unlimited window title length. - Correctly follow the active desktop, instead of active window. - If requesting modi that is not enabled, show it anyway. - DMenu password mode. (#315) - Levenshtein sort is now UTF-8 aware. - Use xcb instead of large xlib library. - Use GLib mainloop for cleaner code and easier external event based - handling in future. - Run dialog: Try to convert between locale, fs encoding and utf8. - Fixing problems with non-utf8 filesystem encodings. - Try to display non-utf8 strings as good as possible. - Autocomplete bang hint in combi mode (#380) - Remove magic line length limits by switching to getline - from fgets. - Print git version for git builds in version string. Bug fixes - Fix subpixel rendering. (#303) - Fix basic tests on OpenBSD (#272) - Fix wrong use of memcpy (thx to Jasperia). - Work around for sigwaitinfo on OpenBSD. - Ignore invalid entries (non-utf8) in dmenu mode. - Glib signal handling. - Fix connecting to i3 on bsd. - Be able to distinguish between empty and cancel in dmenu mode. (#323) - Fix memcpy on single memory region. (#312) - Fix opening file with mode a+ and using fseek to overwrite on bsd. 0.15.12: New features: - Initial `-dump` command for dmenu mode. (#216) - Threading support. - Parallel checking for ASCII. - Parallel string matching. - Autodetect number of HW-threads. - Disabled by default. - Highlight multiple selected rows (#287,#293) - Dmenu can read from file instead of stdin. - Regex matching (#113) - Take Screenshot of rofi using keybinding. - Hotkey for sorting: (#298) - Option to set scrollbar width. Improvements: - Fix return code of multi-select. - Update manpage (#289, #291) - Improve speed of reading stdin in dmenu mode. - Correctly handle modifier keys now. Should now support most weird keyboard layouts and switching between them. (#268, #265, #286) - Correctly set locale, fixing issues with entering special characters. (#282) - DRun mode support `NoDisplay` setting (#283) - Pango markup is matched when filtering. (#273) Bug fixes: - Improve error message (#290) - Correctly switch to next entry on multi-select when list is filtered (#292) - Switch __FUNCTION__ for __func__. (#288) - Fix segfault on empty list and moving through it. (#256,#275) - Fix one off of colors (#269) - Drun fix uninitialized memory (#285) 0.15.11: New features: - (Experimental) Desktop file support Improvement: - Add xdg-terminal to rofi-sensible-terminal Bug fixes: - manpage fixes (#261) - Crash in error mesg on invalid config - Fix urgent and active being activated at same time - Fix crasher on empty list 0.15.10: New feature: - Support for Startup Notification - Standalone mode in dmenu - ssh: known_hosts parsing - Full screen support - Glob style matching - Cairo drawing - Fast ascii filtering (thx to Tom Hinton) - Combi bang support - normal window mode for dmenu - Startup notification support - Current desktop window mode Improvements: - Keep same line selected - Cleanup menu code by re-using Switcher - Fix drawing on resize - Fix rofi -h output - allow disabling of tokenizing - Dragging scrollbar - Allow none type on separator - Dmenu support markup in fields Bug fixes: - dmenu use switcher system - release keyboard on focus out event, regrab it on focus in event - Support `\0` separator 0.15.8: New feature: - Scrollbar. - More custom keybindings. Improvements: - dmenu compatibility. - Don't refilter on all keypresses. - Hide Docks and desktops from the window list. (remove i3bar hack) Bug fixes: - Fix Desktop numbering. - Mis-alignment of arrow down box with message (#189) - Fix issue with mouse interaction needing keyboard press to complete. - Fix -no-custom still allows escape to quit. - Fix compiler warnings. - Fix dmenu mode. (#200) - Break CMD AI to have dmenu compatibility. - Fix processing of signals. 0.15.7: Bug fixes: - Auto-wrap text in message dialog. - Fix ellipsiziing in entry box. - Fix crash on empty list with custom input (#175). - SSH: Ignore comments in Host line (#178). - Fix issues with BSD (#180) New feature: - Markup support error message. - Implement -no-custom as alternative to -only-select (#176). - Fuzzy match option. (#133) Improvements: - Make more keys user-configurable. (#66) 0.15.5: Bug fixes: - Reduce time waiting for keyboard grab (#153) - Also grab Key Release on exit. (#167) - Fix failing font size estimation code. New feature: - [DMENU] Allow to select line matching pattern from cmdline.(#165) - [DMENU] Allow to set filter from cmdline. (#164) - [DMENU] Allow output to be formatted (string, filter, index, index 1 based) - [DMENU] Only match input lines mode. - [DMENU] Custom keybinding for return value.(#154,#156) - [DMENU] Allow additional message line. (#166) Improvements: - (Start) adding keybinding support (#131) - Cleanup warnings from clang checkers. - Fix keybindings on Russian layout (#169) Open bugs: - Urgency hint not always working (#162) 0.15.4: New feature: - Number mode for dmenu. allows user to get index back instead of content. - Combi mode. Combine multiple views into one. - Highlight current window. - Highlight urgent and active row in window view. - DMenu allow rows to be highlighted. (single, multiple, ranges) - New color specification based on I3. (Can be enabled by settings) (#147) - /etc/hosts support for ssh mode. (#137) Bug fixes: - On a single item in list disable auto-select. - Fix cursor position (#140) - Resolving manpage. (#142) - Fix pasting cursor one off. (#150) - Fix grave key -> ctrl+grave (#151) Improvements: - Better handle input methods.. Now international keyboard layout works as expected: `e ->è - Be more verbose about starting in daemon mode. - Print a user-understandable error when launching in daemon mode without a key bound. - Add Ctrl(Shift)Tab to switch modi's. - Auto size number of columns based on available columns. - Better way to determine font height. - Fix font vertical centering. - One-off when pasting text. - Improve rendering of boxes (fixed height and margins) - Fix modi switcher boxes size+layout. - Reduce work on redraws (do not always calculate new size/position), set text, etc. - OO-ify the switchers. - Remove unneeded filtered array. Cleanup: - Do not lug argc,argv around everywhere. 0.15.2: Removed features: - Remove (broken) hmode - Old style key binding and mode launcher. - Old TIMING code. New features: - Word movement in entry box. (#126) - PID file to avoid duplicate Rofi. - Generic keybinding and launching for modi. (#128) - Auto select mode (previously called zeltak mode) Bug fixes: - Shift left/right movement between modi (#125) - Document updates (#123,#116,#124,etc.) - DMenu mode based on executable name with full path (#119) - Fix missing keystrokes. - On broken UTF-8 show everything up to the broken character. (#121) Others: - Significant code refactoring. - Rewriting of config parser, Commandline Parser uses structure from Xresource parser. Avoiding duplication and making it easier to maintain. Performance improvements: - Fix blocking on grabbing keyboard. 0.15.1: New features: - Improved transparency - Changelog - Case sensitivity support, with indicator. (Edwin Pujols) - Mouse scroll wheel support - Alternate Row colors - Run-list command for adding entries to run-dialog - Dmenu: preselect line. Bug fixes: - Manpage fixes - SSH viewer, support lists of hostnames (Tblue) - SSH improve parsing of odly indented host files - Do not loose keypresses when system under load - Cleanups, small fixes. (Edwin Pujols, blueyed ) Performance improvements: - Lazy refilter for large lists rofi-1.7.1/configure0000755000175100001710000106717614150243200011315 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for rofi 1.7.1. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: https://github.com/davatorium/rofi/ about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='rofi' PACKAGE_TARNAME='rofi' PACKAGE_VERSION='1.7.1' PACKAGE_STRING='rofi 1.7.1' PACKAGE_BUGREPORT='https://github.com/davatorium/rofi/' PACKAGE_URL='https://reddit.com/r/qtools/' ac_unique_file="source/rofi.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='NK_ENABLE_BINDINGS_FALSE NK_ENABLE_BINDINGS_TRUE NK_ENABLE_XDG_THEME_FALSE NK_ENABLE_XDG_THEME_TRUE NK_ENABLE_XDG_DE_FALSE NK_ENABLE_XDG_DE_TRUE NK_ENABLE_GTK_SETTINGS_FALSE NK_ENABLE_GTK_SETTINGS_TRUE NK_ENABLE_COLOUR_FALSE NK_ENABLE_COLOUR_TRUE NK_ENABLE_FORMAT_STRING_FALSE NK_ENABLE_FORMAT_STRING_TRUE NK_ENABLE_ENUM_FALSE NK_ENABLE_ENUM_TRUE NK_ENABLE_UUID_FALSE NK_ENABLE_UUID_TRUE _NKUTILS_INTERNAL_TEST_LIBS _NKUTILS_INTERNAL_TEST_CFLAGS _NKUTILS_INTERNAL_GLIB_LIBS _NKUTILS_INTERNAL_GLIB_CFLAGS am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS AM_CFLAGS GLIB_COMPILE_RESOURCES GLIB_MKENUMS GOBJECT_QUERY GLIB_GENMARSHAL GLIB_LIBS GLIB_CFLAGS USE_CHECK_FALSE USE_CHECK_TRUE check_LIBS check_CFLAGS gdkpixbuf_LIBS gdkpixbuf_CFLAGS libsn_LIBS libsn_CFLAGS cairo_LIBS cairo_CFLAGS pango_LIBS pango_CFLAGS GW_XCB_INTERNAL_LIBS GW_XCB_INTERNAL_CFLAGS glib_LIBS glib_CFLAGS NK_ENABLE_UUID_APR_UTIL_FALSE NK_ENABLE_UUID_APR_UTIL_TRUE NK_ENABLE_UUID_LIBUUID_FALSE NK_ENABLE_UUID_LIBUUID_TRUE _NKUTILS_INTERNAL_GOBJECT_LIBS _NKUTILS_INTERNAL_GOBJECT_CFLAGS _NKUTILS_INTERNAL_GIO_LIBS _NKUTILS_INTERNAL_GIO_CFLAGS _NKUTILS_INTERNAL_XKBCOMMON_LIBS _NKUTILS_INTERNAL_XKBCOMMON_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG ac_ct_AR AR RANLIB CPP AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM AWK FLEX_VERSION SED FLEX EGREP GREP YFLAGS YACC LEXLIB OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LEX_OUTPUT_ROOT LEX target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_silent_rules enable_gcov enable_asan enable_drun enable_windowmode enable_check enable_glibtest ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS YACC YFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR _NKUTILS_INTERNAL_XKBCOMMON_CFLAGS _NKUTILS_INTERNAL_XKBCOMMON_LIBS _NKUTILS_INTERNAL_GIO_CFLAGS _NKUTILS_INTERNAL_GIO_LIBS _NKUTILS_INTERNAL_GOBJECT_CFLAGS _NKUTILS_INTERNAL_GOBJECT_LIBS glib_CFLAGS glib_LIBS GW_XCB_INTERNAL_CFLAGS GW_XCB_INTERNAL_LIBS pango_CFLAGS pango_LIBS cairo_CFLAGS cairo_LIBS libsn_CFLAGS libsn_LIBS gdkpixbuf_CFLAGS gdkpixbuf_LIBS check_CFLAGS check_LIBS GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS GLIB_COMPILE_RESOURCES _NKUTILS_INTERNAL_GLIB_CFLAGS _NKUTILS_INTERNAL_GLIB_LIBS _NKUTILS_INTERNAL_TEST_CFLAGS _NKUTILS_INTERNAL_TEST_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures rofi 1.7.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/rofi] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of rofi 1.7.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") (--enable-gcov,Enable source code coverage testing using gcov) (--enable-asan,Enable asan support) --disable-drun Disable desktop file run dialog --disable-windowmode Disable window mode --disable-check Build with checks using check library (default: enabled) --disable-glibtest do not try to compile and run a test GLIB program Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path _NKUTILS_INTERNAL_XKBCOMMON_CFLAGS C compiler flags for _NKUTILS_INTERNAL_XKBCOMMON, overriding pkg-config _NKUTILS_INTERNAL_XKBCOMMON_LIBS linker flags for _NKUTILS_INTERNAL_XKBCOMMON, overriding pkg-config _NKUTILS_INTERNAL_GIO_CFLAGS C compiler flags for _NKUTILS_INTERNAL_GIO, overriding pkg-config _NKUTILS_INTERNAL_GIO_LIBS linker flags for _NKUTILS_INTERNAL_GIO, overriding pkg-config _NKUTILS_INTERNAL_GOBJECT_CFLAGS C compiler flags for _NKUTILS_INTERNAL_GOBJECT, overriding pkg-config _NKUTILS_INTERNAL_GOBJECT_LIBS linker flags for _NKUTILS_INTERNAL_GOBJECT, overriding pkg-config glib_CFLAGS C compiler flags for glib, overriding pkg-config glib_LIBS linker flags for glib, overriding pkg-config GW_XCB_INTERNAL_CFLAGS C compiler flags for GW_XCB_INTERNAL, overriding pkg-config GW_XCB_INTERNAL_LIBS linker flags for GW_XCB_INTERNAL, overriding pkg-config pango_CFLAGS C compiler flags for pango, overriding pkg-config pango_LIBS linker flags for pango, overriding pkg-config cairo_CFLAGS C compiler flags for cairo, overriding pkg-config cairo_LIBS linker flags for cairo, overriding pkg-config libsn_CFLAGS C compiler flags for libsn, overriding pkg-config libsn_LIBS linker flags for libsn, overriding pkg-config gdkpixbuf_CFLAGS C compiler flags for gdkpixbuf, overriding pkg-config gdkpixbuf_LIBS linker flags for gdkpixbuf, overriding pkg-config check_CFLAGS C compiler flags for check, overriding pkg-config check_LIBS linker flags for check, overriding pkg-config GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config GLIB_GENMARSHAL value of glib_genmarshal for glib-2.0, overriding pkg-config GOBJECT_QUERY value of gobject_query for glib-2.0, overriding pkg-config GLIB_MKENUMS value of glib_mkenums for glib-2.0, overriding pkg-config GLIB_COMPILE_RESOURCES value of glib_compile_resources for gio-2.0, overriding pkg-config _NKUTILS_INTERNAL_GLIB_CFLAGS C compiler flags for _NKUTILS_INTERNAL_GLIB, overriding pkg-config _NKUTILS_INTERNAL_GLIB_LIBS linker flags for _NKUTILS_INTERNAL_GLIB, overriding pkg-config _NKUTILS_INTERNAL_TEST_CFLAGS C compiler flags for _NKUTILS_INTERNAL_TEST, overriding pkg-config _NKUTILS_INTERNAL_TEST_LIBS linker flags for _NKUTILS_INTERNAL_TEST, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . rofi home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF rofi configure 1.7.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------------------------- ## ## Report this to https://github.com/davatorium/rofi/ ## ## -------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by rofi $as_me 1.7.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bison is the parser generator" >&5 $as_echo_n "checking if bison is the parser generator... " >&6; } if ${ax_cv_prog_bison+:} false; then : $as_echo_n "(cached) " >&6 else if $YACC --version 2>/dev/null | $EGREP -q '^bison '; then : ax_cv_prog_bison=yes else ax_cv_prog_bison=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_bison" >&5 $as_echo "$ax_cv_prog_bison" >&6; } if test "$ax_cv_prog_bison" = "yes"; then : YACC="${YACC% -y} -o y.tab.c" else as_fn_error $? "\"Failed to find bison\"" "$LINENO" 5 fi # =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_prog_flex_version.html # =========================================================================== # # SYNOPSIS # # AX_PROG_FLEX_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE]) # # DESCRIPTION # # Makes sure that flex version is greater or equal to the version # indicated. If true the shell commands in ACTION-IF-TRUE are executed. If # not the shell commands in commands in ACTION-IF-TRUE are executed. If # not the shell commands in ACTION-IF-FALSE are run. Note if $FLEX is not # set (for example by running AC_CHECK_PROG or AC_PATH_PROG) the macro # will fail. # # Example: # # AC_PATH_PROG([FLEX],[flex]) # AX_PROG_FLEX_VERSION([2.5.39],[ ... ],[ ... ]) # # This will check to make sure that the flex you have is at least version # 2.5.39 or greater. # # NOTE: This macro uses the $FLEX variable to perform the check. # # LICENSE # # Copyright (c) 2015 Jonathan Rajotte-Julien # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 2 # =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_compare_version.html # =========================================================================== # # SYNOPSIS # # AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # # DESCRIPTION # # This macro compares two version strings. Due to the various number of # minor-version numbers that can exist, and the fact that string # comparisons are not compatible with numeric comparisons, this is not # necessarily trivial to do in a autoconf script. This macro makes doing # these comparisons easy. # # The six basic comparisons are available, as well as checking equality # limited to a certain number of minor-version levels. # # The operator OP determines what type of comparison to do, and can be one # of: # # eq - equal (test A == B) # ne - not equal (test A != B) # le - less than or equal (test A <= B) # ge - greater than or equal (test A >= B) # lt - less than (test A < B) # gt - greater than (test A > B) # # Additionally, the eq and ne operator can have a number after it to limit # the test to that number of minor versions. # # eq0 - equal up to the length of the shorter version # ne0 - not equal up to the length of the shorter version # eqN - equal up to N sub-version levels # neN - not equal up to N sub-version levels # # When the condition is true, shell commands ACTION-IF-TRUE are run, # otherwise shell commands ACTION-IF-FALSE are run. The environment # variable 'ax_compare_version' is always set to either 'true' or 'false' # as well. # # Examples: # # AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) # AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) # # would both be true. # # AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) # AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) # # would both be false. # # AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) # # would be true because it is only comparing two minor versions. # # AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) # # would be true because it is only comparing the lesser number of minor # versions of the two values. # # Note: The characters that separate the version numbers do not matter. An # empty string is the same as version 0. OP is evaluated by autoconf, not # configure, so must be a string, not a variable. # # The author would like to acknowledge Guido Draheim whose advice about # the m4_case and m4_ifvaln functions make this macro only include the # portions necessary to perform the specific comparison specified by the # OP argument in the final configure script. # # LICENSE # # Copyright (c) 2008 Tim Toolan # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 12 FLEX=${LEX} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done if test -n "$FLEX"; then : ax_flex_version="2.5.39" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex version" >&5 $as_echo_n "checking for flex version... " >&6; } flex_version=`$FLEX --version 2>&1 \ | $SED -n -e '/flex /s/.* (\{0,1\}\([0-9]*\.[0-9]*\.[0-9]*\))\{0,1\}.*/\1/;p'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flex_version" >&5 $as_echo "$flex_version" >&6; } FLEX_VERSION=$flex_version # Used to indicate true or false condition ax_compare_version=false # Convert the two version strings to be compared into a format that # allows a simple string comparison. The end result is that a version # string of the form 1.12.5-r617 will be converted to the form # 0001001200050617. In other words, each number is zero padded to four # digits, and non digits are removed. ax_compare_version_A=`echo "$flex_version" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` ax_compare_version_B=`echo "$ax_flex_version" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/[^0-9]//g'` ax_compare_version=`echo "x$ax_compare_version_A x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` if test "$ax_compare_version" = "true" ; then : else : as_fn_error $? "\"Require flex version 2.5.39 or higher\"" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find flex" >&5 $as_echo "$as_me: WARNING: could not find flex" >&2;} as_fn_error $? "\"Require flex version 2.5.39 or higher\"" "$LINENO" 5 fi # am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 $as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='rofi' VERSION='1.7.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in clang gcc cc do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in clang gcc cc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac AM_CFLAGS="-Wall -Wextra -Wparentheses -Winline -pedantic -Wunreachable-code" # Check whether --enable-gcov was given. if test "${enable_gcov+set}" = set; then : enableval=$enable_gcov; AM_CFLAGS="${AM_CFLAGS} -coverage" fi if test "x${enable_gcov}" = "xyes" ; then : $as_echo "#define ENABLE_GCOV 1" >>confdefs.h fi # Check whether --enable-asan was given. if test "${enable_asan+set}" = set; then : enableval=$enable_asan; fi if test "x${enable_asan}" = "xyes" ; then : $as_echo "#define ENABLE_ASAN 1" >>confdefs.h AM_CFLAGS="${AM_CFLAGS} -fsanitize=address -fno-omit-frame-pointer -g3" ] fi # Check whether --enable-drun was given. if test "${enable_drun+set}" = set; then : enableval=$enable_drun; fi if test "x${enable_drun}" != "xno"; then : $as_echo "#define ENABLE_DRUN 1" >>confdefs.h fi # Check whether --enable-windowmode was given. if test "${enable_windowmode+set}" = set; then : enableval=$enable_windowmode; fi if test "x$enable_windowmode" != "xno"; then : $as_echo "#define WINDOW_MODE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" if test "x$ac_cv_func_getline" = xyes; then : else as_fn_error $? "\"Could not find getline in c library\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "open" "ac_cv_func_open" if test "x$ac_cv_func_open" = xyes; then : else as_fn_error $? "\"Could not find open in c library\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" if test "x$ac_cv_func_sysconf" = xyes; then : else as_fn_error $? "\"Could not find sysconf\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" if test "x$ac_cv_func_strtok_r" = xyes; then : else as_fn_error $? "\"Could not find strtok_r\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" if test "x$ac_cv_func_flock" = xyes; then : else as_fn_error $? "\"Could not find flock\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" if test "x$ac_cv_func_ftruncate" = xyes; then : else as_fn_error $? "\"Could not find ftruncate\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" if test "x$ac_cv_func_fcntl" = xyes; then : else as_fn_error $? "\"Could not find fcntl\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes; then : else as_fn_error $? "\"Could not find setlocale\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "atexit" "ac_cv_func_atexit" if test "x$ac_cv_func_atexit" = xyes; then : else as_fn_error $? "\"Could not find atexit in c library\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob" if test "x$ac_cv_func_glob" = xyes; then : else as_fn_error $? "\"Could not find glob in c library\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir" if test "x$ac_cv_func_readdir" = xyes; then : else as_fn_error $? "\"Could not find readdir in c library\"" "$LINENO" 5 fi ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" if test "x$ac_cv_header_math_h" = xyes; then : else as_fn_error $? "\"Could not find math.h header file\"" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 $as_echo_n "checking for library containing floor... " >&6; } if ${ac_cv_search_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char floor (); int main () { return floor (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_floor=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_floor+:} false; then : break fi done if ${ac_cv_search_floor+:} false; then : else ac_cv_search_floor=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 $as_echo "$ac_cv_search_floor" >&6; } ac_res=$ac_cv_search_floor if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "\"Could not find floor in math library\"" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ceil" >&5 $as_echo_n "checking for library containing ceil... " >&6; } if ${ac_cv_search_ceil+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ceil (); int main () { return ceil (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_ceil=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_ceil+:} false; then : break fi done if ${ac_cv_search_ceil+:} false; then : else ac_cv_search_ceil=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ceil" >&5 $as_echo "$ac_cv_search_ceil" >&6; } ac_res=$ac_cv_search_ceil if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "\"Could not find ceil in math library\"" "$LINENO" 5 fi ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default" if test "x$ac_cv_header_sysexits_h" = xyes; then : else as_fn_error $? "\"Could not find the sysexists.h header file\"" "$LINENO" 5 fi ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default" if test "x$ac_cv_header_setjmp_h" = xyes; then : else as_fn_error $? "\"Could not find the setjmp.h header file\"" "$LINENO" 5 fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi glib_min_major="2" glib_min_minor="40" glib_min_version="${glib_min_major}.${glib_min_minor}" nk_glib_min_version="2.40" nk_xkbcommon_min_version="0.4.1" nk_module_uuid_enable=no nk_module_enum_enable=no nk_module_format_string_enable=no nk_module_colour_enable=no nk_module_gtk_settings_enable=no nk_module_xdg_de_enable=no nk_module_xdg_theme_enable=no nk_module_bindings_enable=no pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _NKUTILS_INTERNAL_XKBCOMMON" >&5 $as_echo_n "checking for _NKUTILS_INTERNAL_XKBCOMMON... " >&6; } if test -n "$_NKUTILS_INTERNAL_XKBCOMMON_CFLAGS"; then pkg_cv__NKUTILS_INTERNAL_XKBCOMMON_CFLAGS="$_NKUTILS_INTERNAL_XKBCOMMON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xkbcommon >= \${nk_xkbcommon_min_version}\""; } >&5 ($PKG_CONFIG --exists --print-errors "xkbcommon >= ${nk_xkbcommon_min_version}") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_XKBCOMMON_CFLAGS=`$PKG_CONFIG --cflags "xkbcommon >= ${nk_xkbcommon_min_version}" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$_NKUTILS_INTERNAL_XKBCOMMON_LIBS"; then pkg_cv__NKUTILS_INTERNAL_XKBCOMMON_LIBS="$_NKUTILS_INTERNAL_XKBCOMMON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xkbcommon >= \${nk_xkbcommon_min_version}\""; } >&5 ($PKG_CONFIG --exists --print-errors "xkbcommon >= ${nk_xkbcommon_min_version}") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_XKBCOMMON_LIBS=`$PKG_CONFIG --libs "xkbcommon >= ${nk_xkbcommon_min_version}" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then _NKUTILS_INTERNAL_XKBCOMMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xkbcommon >= ${nk_xkbcommon_min_version}" 2>&1` else _NKUTILS_INTERNAL_XKBCOMMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xkbcommon >= ${nk_xkbcommon_min_version}" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$_NKUTILS_INTERNAL_XKBCOMMON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (xkbcommon >= ${nk_xkbcommon_min_version}) were not met: $_NKUTILS_INTERNAL_XKBCOMMON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_XKBCOMMON_CFLAGS and _NKUTILS_INTERNAL_XKBCOMMON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_XKBCOMMON_CFLAGS and _NKUTILS_INTERNAL_XKBCOMMON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else _NKUTILS_INTERNAL_XKBCOMMON_CFLAGS=$pkg_cv__NKUTILS_INTERNAL_XKBCOMMON_CFLAGS _NKUTILS_INTERNAL_XKBCOMMON_LIBS=$pkg_cv__NKUTILS_INTERNAL_XKBCOMMON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xkbcommon >= 0.7.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "xkbcommon >= 0.7.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then $as_echo "#define NK_XKBCOMMON_HAS_COMPOSE 1" >>confdefs.h $as_echo "#define NK_XKBCOMMON_HAS_CONSUMED2 1" >>confdefs.h else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xkbcommon >= 0.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "xkbcommon >= 0.5.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then $as_echo "#define NK_XKBCOMMON_HAS_COMPOSE 1" >>confdefs.h fi fi nk_module_bindings_enable=yes pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _NKUTILS_INTERNAL_GIO" >&5 $as_echo_n "checking for _NKUTILS_INTERNAL_GIO... " >&6; } if test -n "$_NKUTILS_INTERNAL_GIO_CFLAGS"; then pkg_cv__NKUTILS_INTERNAL_GIO_CFLAGS="$_NKUTILS_INTERNAL_GIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$_NKUTILS_INTERNAL_GIO_LIBS"; then pkg_cv__NKUTILS_INTERNAL_GIO_LIBS="$_NKUTILS_INTERNAL_GIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then _NKUTILS_INTERNAL_GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0" 2>&1` else _NKUTILS_INTERNAL_GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$_NKUTILS_INTERNAL_GIO_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gio-2.0) were not met: $_NKUTILS_INTERNAL_GIO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_GIO_CFLAGS and _NKUTILS_INTERNAL_GIO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_GIO_CFLAGS and _NKUTILS_INTERNAL_GIO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else _NKUTILS_INTERNAL_GIO_CFLAGS=$pkg_cv__NKUTILS_INTERNAL_GIO_CFLAGS _NKUTILS_INTERNAL_GIO_LIBS=$pkg_cv__NKUTILS_INTERNAL_GIO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _NKUTILS_INTERNAL_GOBJECT" >&5 $as_echo_n "checking for _NKUTILS_INTERNAL_GOBJECT... " >&6; } if test -n "$_NKUTILS_INTERNAL_GOBJECT_CFLAGS"; then pkg_cv__NKUTILS_INTERNAL_GOBJECT_CFLAGS="$_NKUTILS_INTERNAL_GOBJECT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$_NKUTILS_INTERNAL_GOBJECT_LIBS"; then pkg_cv__NKUTILS_INTERNAL_GOBJECT_LIBS="$_NKUTILS_INTERNAL_GOBJECT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then _NKUTILS_INTERNAL_GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gobject-2.0" 2>&1` else _NKUTILS_INTERNAL_GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gobject-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$_NKUTILS_INTERNAL_GOBJECT_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gobject-2.0) were not met: $_NKUTILS_INTERNAL_GOBJECT_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_GOBJECT_CFLAGS and _NKUTILS_INTERNAL_GOBJECT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_GOBJECT_CFLAGS and _NKUTILS_INTERNAL_GOBJECT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else _NKUTILS_INTERNAL_GOBJECT_CFLAGS=$pkg_cv__NKUTILS_INTERNAL_GOBJECT_CFLAGS _NKUTILS_INTERNAL_GOBJECT_LIBS=$pkg_cv__NKUTILS_INTERNAL_GOBJECT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi nk_module_xdg_theme_enable=yes AM_XSLTPROCFLAGS="${AM_XSLTPROCFLAGS} "'${NKUTILS_XSLTPROCFLAGS}' if test x${nk_uuid_libuuid} = xyes; then NK_ENABLE_UUID_LIBUUID_TRUE= NK_ENABLE_UUID_LIBUUID_FALSE='#' else NK_ENABLE_UUID_LIBUUID_TRUE='#' NK_ENABLE_UUID_LIBUUID_FALSE= fi if test x${nk_uuid_apr_util} = xyes; then NK_ENABLE_UUID_APR_UTIL_TRUE= NK_ENABLE_UUID_APR_UTIL_FALSE='#' else NK_ENABLE_UUID_APR_UTIL_TRUE='#' NK_ENABLE_UUID_APR_UTIL_FALSE= fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib" >&5 $as_echo_n "checking for glib... " >&6; } if test -n "$glib_CFLAGS"; then pkg_cv_glib_CFLAGS="$glib_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \${glib_min_version} gio-unix-2.0 gmodule-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_glib_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$glib_LIBS"; then pkg_cv_glib_LIBS="$glib_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \${glib_min_version} gio-unix-2.0 gmodule-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_glib_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then glib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0" 2>&1` else glib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$glib_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0) were not met: $glib_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables glib_CFLAGS and glib_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables glib_CFLAGS and glib_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else glib_CFLAGS=$pkg_cv_glib_CFLAGS glib_LIBS=$pkg_cv_glib_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi cat >>confdefs.h <<_ACEOF #define GLIB_VERSION_MIN_REQUIRED (G_ENCODE_VERSION(${glib_min_major},${glib_min_minor})) _ACEOF cat >>confdefs.h <<_ACEOF #define GLIB_VERSION_MAX_ALLOWED (G_ENCODE_VERSION(${glib_min_major},${glib_min_minor})) _ACEOF gw_glib_min_version="2.36" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GW_XCB_INTERNAL" >&5 $as_echo_n "checking for GW_XCB_INTERNAL... " >&6; } if test -n "$GW_XCB_INTERNAL_CFLAGS"; then pkg_cv_GW_XCB_INTERNAL_CFLAGS="$GW_XCB_INTERNAL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= ${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GW_XCB_INTERNAL_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= ${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GW_XCB_INTERNAL_LIBS"; then pkg_cv_GW_XCB_INTERNAL_LIBS="$GW_XCB_INTERNAL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= ${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GW_XCB_INTERNAL_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= ${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GW_XCB_INTERNAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= ${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama" 2>&1` else GW_XCB_INTERNAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= ${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GW_XCB_INTERNAL_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0 >= ${gw_glib_min_version} xcb xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama) were not met: $GW_XCB_INTERNAL_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GW_XCB_INTERNAL_CFLAGS and GW_XCB_INTERNAL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GW_XCB_INTERNAL_CFLAGS and GW_XCB_INTERNAL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GW_XCB_INTERNAL_CFLAGS=$pkg_cv_GW_XCB_INTERNAL_CFLAGS GW_XCB_INTERNAL_LIBS=$pkg_cv_GW_XCB_INTERNAL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi gw_xcb_missing_headers="" for ac_header in stdlib.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " #ifdef HAVE_STDLIB_H #include #endif " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test x${ac_cv_header_stdlib_h} != xyes; then : gw_xcb_missing_headers="${gw_xcb_missing_headers} stdlib.h" fi if test -n "${gw_xcb_missing_headers}"; then : as_fn_error $? "Missing headers for libgwater-xcb: ${gw_xcb_missing_headers}" "$LINENO" 5 fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pango" >&5 $as_echo_n "checking for pango... " >&6; } if test -n "$pango_CFLAGS"; then pkg_cv_pango_CFLAGS="$pango_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pango pangocairo\""; } >&5 ($PKG_CONFIG --exists --print-errors "pango pangocairo") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_pango_CFLAGS=`$PKG_CONFIG --cflags "pango pangocairo" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$pango_LIBS"; then pkg_cv_pango_LIBS="$pango_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pango pangocairo\""; } >&5 ($PKG_CONFIG --exists --print-errors "pango pangocairo") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_pango_LIBS=`$PKG_CONFIG --libs "pango pangocairo" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then pango_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pango pangocairo" 2>&1` else pango_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pango pangocairo" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$pango_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (pango pangocairo) were not met: $pango_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables pango_CFLAGS and pango_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables pango_CFLAGS and pango_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else pango_CFLAGS=$pkg_cv_pango_CFLAGS pango_LIBS=$pkg_cv_pango_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cairo" >&5 $as_echo_n "checking for cairo... " >&6; } if test -n "$cairo_CFLAGS"; then pkg_cv_cairo_CFLAGS="$cairo_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo cairo-xcb\""; } >&5 ($PKG_CONFIG --exists --print-errors "cairo cairo-xcb") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_cairo_CFLAGS=`$PKG_CONFIG --cflags "cairo cairo-xcb" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$cairo_LIBS"; then pkg_cv_cairo_LIBS="$cairo_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo cairo-xcb\""; } >&5 ($PKG_CONFIG --exists --print-errors "cairo cairo-xcb") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_cairo_LIBS=`$PKG_CONFIG --libs "cairo cairo-xcb" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then cairo_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cairo cairo-xcb" 2>&1` else cairo_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cairo cairo-xcb" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$cairo_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (cairo cairo-xcb) were not met: $cairo_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables cairo_CFLAGS and cairo_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables cairo_CFLAGS and cairo_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else cairo_CFLAGS=$pkg_cv_cairo_CFLAGS cairo_LIBS=$pkg_cv_cairo_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsn" >&5 $as_echo_n "checking for libsn... " >&6; } if test -n "$libsn_CFLAGS"; then pkg_cv_libsn_CFLAGS="$libsn_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libstartup-notification-1.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors "libstartup-notification-1.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libsn_CFLAGS=`$PKG_CONFIG --cflags "libstartup-notification-1.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libsn_LIBS"; then pkg_cv_libsn_LIBS="$libsn_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libstartup-notification-1.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors "libstartup-notification-1.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libsn_LIBS=`$PKG_CONFIG --libs "libstartup-notification-1.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libsn_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libstartup-notification-1.0 " 2>&1` else libsn_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libstartup-notification-1.0 " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libsn_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libstartup-notification-1.0 ) were not met: $libsn_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables libsn_CFLAGS and libsn_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables libsn_CFLAGS and libsn_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else libsn_CFLAGS=$pkg_cv_libsn_CFLAGS libsn_LIBS=$pkg_cv_libsn_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdkpixbuf" >&5 $as_echo_n "checking for gdkpixbuf... " >&6; } if test -n "$gdkpixbuf_CFLAGS"; then pkg_cv_gdkpixbuf_CFLAGS="$gdkpixbuf_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gdkpixbuf_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$gdkpixbuf_LIBS"; then pkg_cv_gdkpixbuf_LIBS="$gdkpixbuf_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gdkpixbuf_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then gdkpixbuf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gdk-pixbuf-2.0" 2>&1` else gdkpixbuf_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gdk-pixbuf-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$gdkpixbuf_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gdk-pixbuf-2.0) were not met: $gdkpixbuf_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables gdkpixbuf_CFLAGS and gdkpixbuf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables gdkpixbuf_CFLAGS and gdkpixbuf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else gdkpixbuf_CFLAGS=$pkg_cv_gdkpixbuf_CFLAGS gdkpixbuf_LIBS=$pkg_cv_gdkpixbuf_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # Check whether --enable-check was given. if test "${enable_check+set}" = set; then : enableval=$enable_check; fi if test "x${enable_check}" != "xno"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for check" >&5 $as_echo_n "checking for check... " >&6; } if test -n "$check_CFLAGS"; then pkg_cv_check_CFLAGS="$check_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.11.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "check >= 0.11.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_check_CFLAGS=`$PKG_CONFIG --cflags "check >= 0.11.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$check_LIBS"; then pkg_cv_check_LIBS="$check_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.11.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "check >= 0.11.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_check_LIBS=`$PKG_CONFIG --libs "check >= 0.11.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then check_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "check >= 0.11.0" 2>&1` else check_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "check >= 0.11.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$check_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (check >= 0.11.0) were not met: $check_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables check_CFLAGS and check_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables check_CFLAGS and check_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else check_CFLAGS=$pkg_cv_check_CFLAGS check_LIBS=$pkg_cv_check_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_CHECK=1 fi fi if test "x${enable_check}" != "xno" && test "$HAVE_CHECK" -eq 1; then USE_CHECK_TRUE= USE_CHECK_FALSE='#' else USE_CHECK_TRUE='#' USE_CHECK_FALSE= fi # Check whether --enable-glibtest was given. if test "${enable_glibtest+set}" = set; then : enableval=$enable_glibtest; else enable_glibtest=yes fi min_glib_version=2.0.0 pkg_config_args="glib-2.0 >= $min_glib_version" for module in . do case "$module" in gmodule) pkg_config_args="$pkg_config_args gmodule-2.0" ;; gmodule-no-export) pkg_config_args="$pkg_config_args gmodule-no-export-2.0" ;; gobject) pkg_config_args="$pkg_config_args gobject-2.0" ;; gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; gio*) pkg_config_args="$pkg_config_args $module-2.0" ;; esac done if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.16 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi no_glib="" if test "x$PKG_CONFIG" = x ; then no_glib=yes PKG_CONFIG=no fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_config_args\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_config_args") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "$pkg_config_args" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_config_args\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_config_args") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "$pkg_config_args" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pkg_config_args" 2>&1` else GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pkg_config_args" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi if test -n "$GLIB_GENMARSHAL"; then pkg_cv_GLIB_GENMARSHAL="$GLIB_GENMARSHAL" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_GENMARSHAL=`$PKG_CONFIG --variable="glib_genmarshal" "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi GLIB_GENMARSHAL=$pkg_cv_GLIB_GENMARSHAL if test "x$GLIB_GENMARSHAL" = x""; then : fi if test -n "$GOBJECT_QUERY"; then pkg_cv_GOBJECT_QUERY="$GOBJECT_QUERY" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GOBJECT_QUERY=`$PKG_CONFIG --variable="gobject_query" "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi GOBJECT_QUERY=$pkg_cv_GOBJECT_QUERY if test "x$GOBJECT_QUERY" = x""; then : fi if test -n "$GLIB_MKENUMS"; then pkg_cv_GLIB_MKENUMS="$GLIB_MKENUMS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_MKENUMS=`$PKG_CONFIG --variable="glib_mkenums" "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi GLIB_MKENUMS=$pkg_cv_GLIB_MKENUMS if test "x$GLIB_MKENUMS" = x""; then : fi if test -n "$GLIB_COMPILE_RESOURCES"; then pkg_cv_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable="glib_compile_resources" "gio-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi GLIB_COMPILE_RESOURCES=$pkg_cv_GLIB_COMPILE_RESOURCES if test "x$GLIB_COMPILE_RESOURCES" = x""; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5 $as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; } if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" enable_glibtest=no fi if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then : else no_glib=yes fi fi if test x"$no_glib" = x ; then glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" rm -f conf.glibtest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main (void) { unsigned int major, minor, micro; fclose (fopen ("conf.glibtest", "w")); if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_glib=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5 $as_echo "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; } : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://www.freedesktop.org/software/pkgconfig/" else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB is incorrectly installed." fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" GLIB_GENMARSHAL="" GOBJECT_QUERY="" GLIB_MKENUMS="" GLIB_COMPILE_RESOURCES="" : fi rm -f conf.glibtest ac_config_files="$ac_config_files Makefile doc/rofi.doxy pkgconfig/rofi.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test x${ac_cv_header_string_h} != xyes; then : as_fn_error $? "libnkutils: string.h is required" "$LINENO" 5 fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _NKUTILS_INTERNAL_GLIB" >&5 $as_echo_n "checking for _NKUTILS_INTERNAL_GLIB... " >&6; } if test -n "$_NKUTILS_INTERNAL_GLIB_CFLAGS"; then pkg_cv__NKUTILS_INTERNAL_GLIB_CFLAGS="$_NKUTILS_INTERNAL_GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \${nk_glib_min_version}\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= ${nk_glib_min_version}") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= ${nk_glib_min_version}" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$_NKUTILS_INTERNAL_GLIB_LIBS"; then pkg_cv__NKUTILS_INTERNAL_GLIB_LIBS="$_NKUTILS_INTERNAL_GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \${nk_glib_min_version}\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= ${nk_glib_min_version}") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= ${nk_glib_min_version}" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then _NKUTILS_INTERNAL_GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= ${nk_glib_min_version}" 2>&1` else _NKUTILS_INTERNAL_GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= ${nk_glib_min_version}" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$_NKUTILS_INTERNAL_GLIB_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0 >= ${nk_glib_min_version}) were not met: $_NKUTILS_INTERNAL_GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_GLIB_CFLAGS and _NKUTILS_INTERNAL_GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_GLIB_CFLAGS and _NKUTILS_INTERNAL_GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else _NKUTILS_INTERNAL_GLIB_CFLAGS=$pkg_cv__NKUTILS_INTERNAL_GLIB_CFLAGS _NKUTILS_INTERNAL_GLIB_LIBS=$pkg_cv__NKUTILS_INTERNAL_GLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _NKUTILS_INTERNAL_TEST" >&5 $as_echo_n "checking for _NKUTILS_INTERNAL_TEST... " >&6; } if test -n "$_NKUTILS_INTERNAL_TEST_CFLAGS"; then pkg_cv__NKUTILS_INTERNAL_TEST_CFLAGS="$_NKUTILS_INTERNAL_TEST_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_TEST_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$_NKUTILS_INTERNAL_TEST_LIBS"; then pkg_cv__NKUTILS_INTERNAL_TEST_LIBS="$_NKUTILS_INTERNAL_TEST_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv__NKUTILS_INTERNAL_TEST_LIBS=`$PKG_CONFIG --libs "gobject-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then _NKUTILS_INTERNAL_TEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gobject-2.0" 2>&1` else _NKUTILS_INTERNAL_TEST_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gobject-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$_NKUTILS_INTERNAL_TEST_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gobject-2.0) were not met: $_NKUTILS_INTERNAL_TEST_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_TEST_CFLAGS and _NKUTILS_INTERNAL_TEST_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables _NKUTILS_INTERNAL_TEST_CFLAGS and _NKUTILS_INTERNAL_TEST_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else _NKUTILS_INTERNAL_TEST_CFLAGS=$pkg_cv__NKUTILS_INTERNAL_TEST_CFLAGS _NKUTILS_INTERNAL_TEST_LIBS=$pkg_cv__NKUTILS_INTERNAL_TEST_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test x${nk_module_uuid_enable} = xyes; then NK_ENABLE_UUID_TRUE= NK_ENABLE_UUID_FALSE='#' else NK_ENABLE_UUID_TRUE='#' NK_ENABLE_UUID_FALSE= fi if test x${nk_module_enum_enable} = xyes -o x${nk_module_format_string_enable} = xyes -o x${nk_module_xdg_de_enable} = xyes -o x${nk_module_xdg_theme_enable} = xyes -o x${nk_module_bindings_enable} = xyes; then NK_ENABLE_ENUM_TRUE= NK_ENABLE_ENUM_FALSE='#' else NK_ENABLE_ENUM_TRUE='#' NK_ENABLE_ENUM_FALSE= fi if test x${nk_module_format_string_enable} = xyes; then NK_ENABLE_FORMAT_STRING_TRUE= NK_ENABLE_FORMAT_STRING_FALSE='#' else NK_ENABLE_FORMAT_STRING_TRUE='#' NK_ENABLE_FORMAT_STRING_FALSE= fi if test x${nk_module_colour_enable} = xyes; then NK_ENABLE_COLOUR_TRUE= NK_ENABLE_COLOUR_FALSE='#' else NK_ENABLE_COLOUR_TRUE='#' NK_ENABLE_COLOUR_FALSE= fi if test x${nk_module_gtk_settings_enable} = xyes -o x${nk_module_xdg_theme_enable} = xyes -o x${nk_module_bindings_enable} = xyes; then NK_ENABLE_GTK_SETTINGS_TRUE= NK_ENABLE_GTK_SETTINGS_FALSE='#' else NK_ENABLE_GTK_SETTINGS_TRUE='#' NK_ENABLE_GTK_SETTINGS_FALSE= fi if test x${nk_module_xdg_de_enable} = xyes -o x${nk_module_xdg_theme_enable} = xyes -o x${nk_module_bindings_enable} = xyes; then NK_ENABLE_XDG_DE_TRUE= NK_ENABLE_XDG_DE_FALSE='#' else NK_ENABLE_XDG_DE_TRUE='#' NK_ENABLE_XDG_DE_FALSE= fi if test x${nk_module_xdg_theme_enable} = xyes; then NK_ENABLE_XDG_THEME_TRUE= NK_ENABLE_XDG_THEME_FALSE='#' else NK_ENABLE_XDG_THEME_TRUE='#' NK_ENABLE_XDG_THEME_FALSE= fi if test x${nk_module_bindings_enable} = xyes; then NK_ENABLE_BINDINGS_TRUE= NK_ENABLE_BINDINGS_FALSE='#' else NK_ENABLE_BINDINGS_TRUE='#' NK_ENABLE_BINDINGS_FALSE= fi if test -z "${NK_ENABLE_UUID_LIBUUID_TRUE}" && test -z "${NK_ENABLE_UUID_LIBUUID_FALSE}"; then as_fn_error $? "conditional \"NK_ENABLE_UUID_LIBUUID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NK_ENABLE_UUID_APR_UTIL_TRUE}" && test -z "${NK_ENABLE_UUID_APR_UTIL_FALSE}"; then as_fn_error $? "conditional \"NK_ENABLE_UUID_APR_UTIL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_CHECK_TRUE}" && test -z "${USE_CHECK_FALSE}"; then as_fn_error $? "conditional \"USE_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by rofi $as_me 1.7.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) 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 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --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 . rofi home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ rofi config.status 1.7.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --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) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. 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" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/rofi.doxy") CONFIG_FILES="$CONFIG_FILES doc/rofi.doxy" ;; "pkgconfig/rofi.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/rofi.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # 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 # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' 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. # 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 ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\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 case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 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;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo "" echo "-------------------------------------" if test x$enable_drun != xno; then echo "Desktop File drun dialog Enabled" else echo "Desktop File drun dialog Disabled" fi if test x$enable_windowmode != xno; then echo "Window Switcher dialog Enabled" else echo "Window Switcher dialog Disabled" fi if test x$enable_asan = xyes; then echo "Asan address sanitize Enabled" else echo "Asan address sanitize Disabled" fi if test x$enable_gcov = xyes; then echo "Code Coverage Enabled" else echo "Code Coverage Disabled" fi if test "x${enable_check}" != "xno" && test "$HAVE_CHECK" -eq 1; then echo "Check based tests Enabled" else echo "Check based tests Disabled" fi echo "-------------------------------------" echo "Now type 'make' to build" echo "" rofi-1.7.1/pkgconfig/0000755000175100001710000000000014150243223011420 500000000000000rofi-1.7.1/pkgconfig/rofi.pc.in0000644000175100001710000000040514150243117013231 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ pluginsdir=@libdir@/rofi/ Name: rofi Description: Header files for rofi plugins Requires.private: glib-2.0 >= 2.40 gmodule-2.0 cairo Version: @VERSION@ Cflags: -I${includedir}/ rofi-1.7.1/lexer/0000755000175100001710000000000014150243223010570 500000000000000rofi-1.7.1/lexer/theme-lexer.c0000644000175100001710000031532414150243207013105 00000000000000 #line 3 "lexer/theme-lexer.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif #ifdef yyget_lval #define yyget_lval_ALREADY_DEFINED #else #define yyget_lval yyget_lval #endif #ifdef yyset_lval #define yyset_lval_ALREADY_DEFINED #else #define yyset_lval yyset_lval #endif #ifdef yyget_lloc #define yyget_lloc_ALREADY_DEFINED #else #define yyget_lloc yyget_lloc #endif #ifdef yyset_lloc #define yyset_lloc_ALREADY_DEFINED #else #define yyset_lloc yyset_lloc #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ /* begin standard C++ headers. */ /* TODO: this is always defined, so inline it */ #define yyconst const #if defined(__GNUC__) && __GNUC__ >= 3 #define yynoreturn __attribute__((__noreturn__)) #else #define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart ( FILE *input_file ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); void yy_delete_buffer ( YY_BUFFER_STATE b ); void yy_flush_buffer ( YY_BUFFER_STATE b ); void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); void yypop_buffer_state ( void ); static void yyensure_buffer_stack ( void ); static void yy_load_buffer_state ( void ); static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); void *yyalloc ( yy_size_t ); void *yyrealloc ( void *, yy_size_t ); void yyfree ( void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define yywrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #ifdef yytext_ptr #undef yytext_ptr #endif #define yytext_ptr yytext static yy_state_type yy_get_previous_state ( void ); static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); static int yy_get_next_buffer ( void ); static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 121 #define YY_END_OF_BUFFER 122 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static const flex_int16_t yy_acclist[588] = { 0, 122, 115, 121, 22, 115, 121, 103, 121, 115, 121, 14, 115, 121, 10, 115, 121, 114, 115, 121, 115, 121, 115, 121, 114, 115, 121, 111, 115, 121, 8, 121, 5, 8, 121, 8, 121, 8, 121, 8, 121, 119, 121, 23, 119, 121, 119, 121, 119, 121, 119, 121, 119, 121, 37, 119, 121, 119, 121, 75, 119, 121, 76, 119, 121, 43, 119, 121, 41, 119, 121, 77, 119, 121, 42, 119, 121, 80, 119, 121, 28, 119, 121, 25, 119, 121, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 60, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 78, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 102, 119, 121, 60, 102, 119, 121, 102, 119, 121, 69, 119, 121, 72, 119, 121, 73, 119, 121, 117, 119, 121, 119, 121, 48, 119, 121, 74, 76, 119, 121, 119, 121, 79, 119, 121, 120, 121, 17, 120, 121, 120, 121, 18, 120, 121, 21, 120, 121, 120, 121, 15, 120, 121, 116, 121, 22, 116, 121, 116, 121, 20, 116, 121, 116, 121, 24, 116, 121, 20, 116, 121, 32, 116, 121, 16, 116, 121, 13, 121, 11, 13, 121, 13, 121, 13, 121, 12, 13, 121, 113, 121, 112, 113, 121, 113, 121, 106, 113, 121, 113, 121, 110, 113, 121, 23, 113, 121, 109, 113, 121, 113, 121, 107, 113, 121, 28, 113, 121, 108, 113, 121, 107, 113, 121, 107, 113, 121, 107, 113, 121, 22, 104, 114, 2, 1, 114, 7, 23, 29, 28, 31, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 60, 63, 102, 102, 102, 102, 55, 102, 102, 102, 102, 102, 34, 102, 33, 102, 102, 102, 102, 102, 102, 36, 102, 35, 102, 102, 102, 117, 48, 118, 18, 21, 20, 20, 112, 107, 36, 107, 35, 107, 114, 30, 30, 27, 102, 59, 102, 102, 102, 102, 102, 102, 92, 102, 102, 102, 102, 102, 66, 102, 67, 102, 102, 61, 102, 102, 102, 102, 102, 93, 102, 65, 102, 102, 102, 102, 102, 102, 102, 63, 102, 102, 102, 102, 55, 102, 102, 102, 102, 102, 71, 102, 102, 102, 45, 102, 44, 102, 102, 70, 102, 20, 114, 51, 47, 87, 102, 59, 102, 102, 46, 102, 102, 68, 102, 39, 102, 102, 82, 102, 94, 102, 102, 102, 66, 102, 102, 61, 102, 102, 86, 102, 102, 102, 65, 102, 62, 102, 102, 102, 102, 102, 100, 102, 102, 95, 102, 102, 102, 83, 102, 57, 102, 102, 102, 102, 26, 102, 20, 114, 52, 64, 102, 102, 102, 58, 102, 102, 102, 102, 85, 102, 102, 62, 102, 102, 38, 102, 84, 102, 102, 102, 102, 102, 57, 102, 102, 19, 20, 105, 4, 114, 64, 102, 81, 102, 102, 58, 102, 102, 88, 102, 102, 102, 102, 102, 102, 102, 102, 3, 114, 50, 98, 102, 102, 99, 102, 102, 102, 102, 102, 40, 102, 114, 6, 102, 102, 102, 102, 97, 102, 114, 6, 7, 49, 102, 102, 102, 89, 102, 114, 96, 102, 91, 102, 102, 114, 102, 101, 102, 114, 102, 54, 9, 114, 90, 102, 53, 56, 56 } ; static const flex_int16_t yy_accept[439] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 7, 9, 11, 14, 17, 20, 22, 24, 27, 30, 32, 35, 37, 39, 41, 43, 46, 48, 50, 52, 54, 57, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 168, 171, 174, 177, 180, 183, 185, 188, 192, 194, 197, 199, 202, 204, 207, 210, 212, 215, 217, 220, 222, 225, 227, 230, 233, 236, 239, 241, 244, 246, 248, 251, 253, 256, 258, 261, 263, 266, 269, 272, 274, 277, 280, 283, 286, 289, 292, 293, 294, 295, 296, 297, 297, 297, 297, 298, 298, 299, 299, 299, 299, 299, 300, 300, 301, 301, 301, 301, 301, 301, 301, 301, 302, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 331, 332, 333, 334, 336, 337, 338, 339, 340, 342, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 357, 358, 358, 358, 358, 359, 360, 361, 362, 363, 364, 366, 368, 368, 368, 368, 369, 369, 369, 369, 369, 369, 369, 369, 370, 371, 372, 373, 375, 376, 377, 378, 379, 380, 382, 383, 384, 385, 386, 388, 390, 391, 393, 394, 395, 396, 397, 399, 401, 402, 403, 404, 405, 406, 407, 409, 410, 411, 412, 414, 415, 416, 417, 418, 420, 421, 422, 424, 426, 427, 429, 429, 429, 430, 430, 430, 430, 431, 431, 431, 431, 432, 432, 433, 435, 437, 438, 440, 441, 443, 445, 446, 448, 450, 451, 452, 454, 455, 457, 458, 460, 461, 462, 464, 466, 467, 468, 469, 470, 472, 473, 475, 476, 477, 479, 481, 482, 483, 484, 486, 486, 487, 487, 487, 487, 488, 488, 489, 491, 492, 493, 495, 496, 497, 498, 500, 501, 503, 504, 506, 508, 509, 510, 511, 512, 514, 514, 515, 517, 517, 518, 519, 520, 520, 520, 522, 524, 525, 527, 528, 530, 531, 532, 532, 533, 534, 535, 536, 536, 537, 538, 539, 539, 540, 542, 543, 543, 545, 545, 546, 547, 548, 549, 549, 551, 552, 553, 553, 554, 554, 554, 555, 556, 557, 559, 559, 560, 562, 563, 564, 564, 564, 565, 566, 568, 568, 569, 571, 571, 572, 573, 574, 574, 575, 575, 576, 578, 578, 579, 579, 580, 581, 583, 583, 585, 586, 587, 588, 588 } ; static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 22, 1, 1, 1, 1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 33, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 1, 52, 1, 53, 54, 55, 56, 57, 58, 59, 60, 61, 33, 62, 63, 64, 65, 66, 67, 33, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 1, 78, 1, 1, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80 } ; static const YY_CHAR yy_meta[84] = { 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 1, 1, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 7, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 8, 2, 2, 9, 9, 9 } ; static const flex_int16_t yy_base[476] = { 0, 0, 83, 25, 30, 166, 0, 1095, 1094, 249, 332, 415, 498, 25, 32, 51, 59, 581, 664, 747, 830, 271, 275, 279, 300, 913, 0, 1112, 1354, 14, 1354, 1105, 1354, 1354, 0, 7, 3, 2, 1354, 1354, 1354, 1067, 544, 28, 1354, 37, 1021, 32, 0, 942, 1354, 966, 1354, 1354, 1354, 39, 1354, 41, 90, 99, 1354, 0, 0, 61, 93, 83, 0, 80, 323, 81, 98, 86, 87, 262, 321, 411, 248, 84, 263, 1354, 945, 342, 416, 956, 323, 78, 320, 417, 344, 1354, 1354, 1354, 0, 131, 0, 1354, 361, 1354, 1354, 1354, 899, 67, 0, 294, 1354, 1354, 263, 896, 0, 296, 1354, 832, 1354, 1354, 1354, 1354, 894, 304, 1354, 1354, 369, 889, 1354, 385, 1354, 371, 1354, 56, 385, 433, 1354, 388, 427, 451, 454, 1354, 0, 1354, 1354, 825, 810, 802, 91, 452, 455, 540, 780, 775, 744, 470, 461, 470, 741, 735, 732, 0, 0, 797, 350, 467, 443, 0, 0, 497, 327, 489, 480, 487, 500, 500, 272, 513, 533, 571, 582, 584, 580, 574, 575, 581, 589, 592, 588, 595, 648, 584, 582, 590, 596, 640, 628, 654, 650, 651, 666, 734, 0, 0, 717, 724, 724, 702, 707, 0, 0, 710, 659, 0, 0, 483, 1354, 647, 645, 644, 639, 0, 0, 658, 648, 503, 542, 675, 635, 632, 597, 667, 788, 572, 556, 535, 531, 0, 527, 1354, 562, 678, 672, 670, 674, 661, 670, 675, 683, 0, 663, 682, 680, 705, 747, 0, 732, 731, 746, 747, 735, 741, 0, 755, 749, 747, 751, 743, 754, 746, 0, 753, 754, 764, 0, 780, 807, 813, 516, 0, 494, 500, 0, 0, 483, 0, 452, 445, 424, 412, 412, 384, 825, 991, 362, 300, 0, 297, 1354, 0, 0, 818, 0, 830, 0, 0, 817, 0, 0, 830, 815, 0, 832, 0, 841, 0, 835, 826, 0, 830, 838, 847, 844, 844, 0, 957, 0, 959, 844, 0, 969, 298, 253, 240, 0, 227, 219, 201, 105, 97, 971, 996, 0, 967, 964, 970, 964, 969, 982, 970, 0, 983, 0, 142, 0, 0, 984, 975, 982, 992, 0, 0, 84, 0, 73, 1354, 1354, 977, 1017, 0, 0, 0, 979, 0, 985, 0, 121, 985, 1002, 994, 1022, 1022, 1031, 0, 52, 1354, 1003, 1045, 0, 0, 1016, 1026, 0, 1035, 1029, 1022, 1026, 1030, 0, 0, 1042, 1055, 0, 1044, 1036, 1042, 1042, 1064, 1066, 0, 0, 1054, 1063, 1354, 1066, 1078, 1064, 1068, 1070, 0, 0, 1071, 0, 1084, 1354, 1070, 1072, 0, 1081, 1088, 1092, 0, 0, 1088, 1102, 1108, 0, 0, 1106, 0, 1354, 1106, 1354, 1354, 1176, 1185, 1194, 1203, 1212, 1221, 1230, 1239, 1246, 1252, 1261, 1267, 1272, 1278, 1280, 1284, 1287, 1294, 1301, 1305, 1309, 1312, 1313, 1317, 1319, 1324, 1326, 1328, 1330, 1332, 1334, 1336, 1338, 1340, 1342, 1344, 1346, 1348 } ; static const flex_int16_t yy_def[476] = { 0, 438, 438, 439, 439, 437, 5, 5, 5, 440, 440, 441, 441, 5, 5, 10, 10, 442, 442, 443, 443, 444, 444, 445, 445, 437, 25, 437, 437, 437, 437, 437, 437, 437, 446, 437, 437, 446, 437, 437, 437, 437, 447, 437, 437, 437, 437, 448, 449, 437, 437, 450, 437, 437, 437, 437, 437, 437, 437, 437, 437, 451, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 437, 452, 452, 452, 452, 452, 452, 452, 452, 452, 437, 437, 437, 453, 437, 454, 437, 455, 437, 437, 437, 437, 437, 456, 437, 437, 437, 437, 437, 457, 437, 437, 457, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 458, 437, 437, 458, 458, 458, 437, 437, 446, 437, 437, 437, 437, 437, 446, 447, 447, 447, 437, 437, 437, 437, 448, 448, 437, 437, 437, 459, 460, 437, 437, 437, 437, 451, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 453, 454, 455, 437, 437, 437, 437, 437, 456, 457, 457, 437, 458, 458, 458, 437, 437, 437, 446, 447, 437, 437, 437, 437, 461, 462, 437, 437, 437, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 437, 437, 457, 437, 437, 437, 446, 447, 437, 437, 463, 462, 437, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 437, 457, 437, 437, 437, 446, 447, 464, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 465, 452, 457, 437, 437, 437, 446, 447, 466, 452, 452, 452, 452, 452, 452, 452, 452, 437, 452, 452, 452, 452, 467, 452, 437, 446, 447, 468, 452, 452, 437, 452, 437, 452, 452, 452, 452, 469, 452, 446, 447, 470, 452, 437, 437, 452, 452, 452, 452, 471, 446, 447, 437, 452, 437, 437, 452, 452, 452, 472, 446, 452, 437, 437, 452, 452, 473, 446, 437, 452, 452, 474, 446, 437, 452, 475, 446, 437, 452, 437, 437, 437, 0, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437 } ; static const flex_int16_t yy_nxt[1438] = { 0, 28, 29, 30, 31, 29, 28, 32, 28, 28, 28, 28, 28, 33, 28, 28, 134, 28, 35, 134, 137, 28, 28, 36, 169, 138, 37, 40, 30, 41, 40, 42, 40, 30, 41, 40, 42, 95, 151, 149, 142, 137, 149, 43, 95, 437, 138, 44, 43, 28, 28, 28, 28, 169, 44, 37, 437, 96, 159, 159, 159, 159, 44, 44, 139, 96, 56, 140, 142, 214, 44, 44, 214, 141, 56, 159, 159, 28, 38, 28, 28, 28, 28, 28, 28, 29, 30, 31, 29, 28, 32, 28, 28, 28, 28, 28, 33, 28, 28, 163, 28, 35, 97, 137, 28, 28, 36, 167, 138, 37, 97, 168, 192, 152, 153, 154, 160, 164, 159, 159, 170, 165, 393, 175, 178, 179, 176, 163, 225, 166, 177, 201, 28, 28, 28, 28, 167, 385, 37, 202, 168, 192, 203, 379, 137, 378, 164, 372, 170, 138, 165, 175, 178, 179, 360, 176, 225, 166, 359, 177, 28, 38, 28, 28, 28, 28, 28, 44, 45, 30, 46, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 44, 58, 59, 59, 44, 60, 61, 62, 63, 64, 65, 66, 62, 67, 68, 69, 62, 62, 70, 62, 71, 62, 72, 73, 74, 75, 76, 77, 78, 62, 62, 62, 79, 44, 44, 44, 80, 63, 81, 65, 82, 83, 67, 68, 84, 62, 70, 85, 71, 62, 86, 73, 74, 87, 76, 88, 78, 62, 62, 62, 44, 44, 44, 44, 44, 44, 44, 44, 45, 30, 46, 45, 44, 44, 44, 44, 44, 89, 90, 44, 44, 91, 134, 44, 93, 134, 358, 44, 44, 44, 115, 30, 116, 115, 115, 30, 116, 115, 120, 30, 121, 120, 190, 180, 357, 191, 117, 122, 193, 181, 117, 182, 194, 245, 123, 44, 44, 44, 44, 120, 30, 121, 120, 209, 137, 356, 137, 328, 122, 138, 190, 138, 180, 191, 137, 123, 355, 193, 181, 138, 182, 194, 245, 44, 44, 44, 44, 44, 44, 44, 44, 45, 30, 46, 45, 44, 44, 44, 44, 44, 89, 90, 44, 44, 91, 118, 44, 93, 171, 118, 44, 44, 44, 124, 183, 179, 184, 234, 172, 238, 185, 173, 175, 164, 210, 174, 157, 165, 218, 192, 149, 218, 292, 149, 124, 166, 150, 171, 44, 44, 44, 44, 183, 179, 184, 200, 172, 238, 185, 173, 175, 204, 164, 174, 206, 137, 165, 157, 192, 196, 138, 159, 159, 166, 437, 437, 44, 44, 44, 44, 44, 44, 44, 44, 45, 30, 46, 45, 44, 44, 44, 44, 44, 89, 90, 44, 44, 91, 44, 44, 93, 44, 44, 44, 44, 44, 186, 169, 143, 211, 212, 213, 186, 437, 437, 333, 187, 160, 188, 159, 159, 189, 187, 134, 188, 144, 134, 189, 144, 235, 235, 44, 44, 44, 151, 186, 169, 437, 437, 149, 332, 186, 149, 151, 187, 331, 188, 197, 198, 189, 187, 160, 205, 159, 159, 189, 210, 330, 220, 44, 44, 44, 44, 44, 44, 44, 44, 45, 30, 46, 45, 44, 44, 44, 44, 44, 89, 90, 44, 44, 91, 44, 44, 93, 44, 44, 44, 44, 44, 437, 437, 329, 221, 239, 240, 241, 242, 243, 209, 236, 146, 147, 148, 146, 147, 148, 237, 328, 244, 152, 153, 154, 246, 144, 44, 44, 44, 144, 152, 153, 154, 239, 240, 241, 327, 242, 243, 236, 437, 437, 326, 211, 212, 213, 237, 226, 244, 325, 145, 233, 247, 246, 44, 44, 44, 44, 44, 44, 44, 98, 99, 30, 100, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98, 101, 226, 99, 103, 145, 247, 98, 98, 98, 292, 248, 249, 250, 251, 289, 252, 253, 255, 150, 254, 256, 257, 258, 259, 265, 146, 147, 148, 262, 146, 147, 148, 263, 264, 98, 98, 98, 98, 248, 288, 249, 250, 251, 252, 253, 214, 255, 254, 214, 256, 257, 258, 259, 265, 218, 143, 262, 218, 285, 267, 263, 264, 104, 98, 98, 98, 98, 98, 98, 98, 99, 30, 100, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98, 101, 266, 99, 103, 260, 267, 98, 98, 98, 284, 268, 269, 261, 270, 271, 437, 437, 286, 235, 235, 293, 296, 294, 283, 297, 298, 301, 299, 300, 266, 302, 303, 260, 295, 98, 98, 98, 98, 268, 269, 261, 270, 282, 271, 281, 280, 286, 209, 279, 293, 296, 294, 297, 298, 301, 265, 299, 300, 304, 302, 303, 295, 104, 98, 98, 98, 98, 98, 98, 105, 106, 30, 107, 106, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 265, 105, 109, 304, 306, 110, 105, 105, 305, 277, 307, 308, 309, 276, 310, 311, 312, 313, 278, 314, 315, 275, 316, 317, 274, 318, 273, 319, 320, 321, 272, 144, 306, 105, 105, 105, 105, 305, 307, 111, 308, 309, 310, 311, 233, 312, 313, 314, 230, 315, 316, 229, 317, 318, 287, 319, 320, 150, 321, 322, 228, 112, 113, 105, 105, 105, 105, 105, 105, 106, 30, 107, 106, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 287, 105, 109, 323, 322, 110, 105, 105, 227, 324, 337, 334, 338, 143, 339, 340, 224, 341, 342, 343, 344, 223, 345, 146, 147, 148, 346, 347, 348, 349, 353, 323, 350, 105, 105, 105, 105, 324, 337, 111, 334, 338, 339, 222, 340, 341, 135, 342, 343, 344, 345, 135, 217, 135, 346, 347, 135, 348, 349, 353, 350, 112, 113, 105, 105, 105, 105, 105, 119, 125, 30, 121, 125, 119, 119, 119, 119, 119, 119, 126, 119, 127, 119, 128, 119, 123, 129, 129, 130, 119, 119, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 119, 119, 119, 119, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 132, 131, 131, 133, 131, 131, 131, 131, 131, 131, 131, 131, 131, 119, 119, 119, 119, 119, 119, 119, 144, 351, 352, 354, 361, 144, 364, 365, 366, 367, 368, 369, 199, 370, 371, 373, 195, 374, 335, 158, 375, 376, 156, 380, 383, 384, 144, 135, 386, 351, 352, 387, 354, 361, 364, 365, 366, 367, 368, 388, 369, 370, 362, 371, 373, 374, 394, 335, 375, 389, 376, 380, 383, 384, 144, 381, 386, 390, 391, 398, 387, 397, 399, 400, 406, 401, 402, 388, 403, 405, 362, 408, 144, 135, 394, 146, 147, 148, 389, 409, 146, 147, 148, 381, 410, 411, 390, 391, 398, 397, 395, 399, 400, 401, 402, 412, 403, 413, 405, 415, 408, 146, 147, 148, 416, 417, 422, 409, 418, 419, 420, 135, 410, 411, 423, 437, 424, 425, 395, 44, 44, 437, 427, 428, 412, 429, 413, 415, 431, 146, 147, 148, 416, 432, 417, 422, 418, 419, 420, 146, 147, 148, 433, 423, 424, 425, 435, 146, 147, 148, 427, 436, 428, 437, 429, 437, 431, 437, 437, 437, 437, 437, 432, 437, 437, 437, 437, 437, 437, 437, 437, 433, 437, 437, 435, 437, 437, 437, 437, 436, 34, 34, 34, 34, 34, 34, 34, 34, 34, 39, 39, 39, 39, 39, 39, 39, 39, 39, 92, 92, 92, 92, 92, 92, 92, 92, 92, 94, 94, 94, 94, 94, 94, 94, 94, 94, 102, 102, 102, 102, 102, 102, 102, 102, 102, 108, 108, 108, 108, 108, 108, 108, 108, 108, 114, 114, 114, 114, 114, 114, 114, 114, 114, 119, 119, 119, 119, 119, 119, 119, 119, 119, 136, 136, 136, 136, 143, 437, 143, 143, 143, 143, 143, 143, 143, 150, 437, 150, 150, 150, 150, 150, 150, 150, 155, 155, 157, 437, 157, 157, 157, 157, 157, 157, 161, 161, 161, 161, 162, 162, 207, 207, 207, 207, 208, 208, 208, 208, 209, 437, 209, 209, 209, 209, 209, 209, 209, 215, 215, 215, 215, 216, 216, 216, 216, 219, 219, 219, 219, 231, 231, 232, 232, 232, 290, 290, 291, 291, 291, 291, 291, 336, 336, 363, 363, 377, 377, 382, 382, 392, 392, 396, 396, 404, 404, 407, 407, 414, 414, 421, 421, 426, 426, 430, 430, 434, 434, 27, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437 } ; static const flex_int16_t yy_chk[1438] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29, 1, 1, 29, 35, 1, 1, 1, 66, 35, 1, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 13, 47, 45, 37, 43, 45, 3, 14, 0, 43, 13, 4, 1, 1, 1, 1, 66, 14, 1, 0, 15, 55, 55, 57, 57, 15, 15, 36, 16, 15, 36, 37, 101, 16, 16, 101, 36, 16, 127, 127, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 63, 2, 2, 15, 58, 2, 2, 2, 65, 58, 2, 16, 65, 77, 47, 47, 47, 59, 64, 59, 59, 67, 64, 378, 69, 71, 72, 70, 63, 142, 64, 70, 85, 2, 2, 2, 2, 65, 370, 2, 85, 65, 77, 85, 358, 93, 356, 64, 347, 67, 93, 64, 69, 71, 72, 333, 70, 142, 64, 332, 70, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 106, 9, 9, 106, 331, 9, 9, 9, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 76, 73, 330, 76, 21, 23, 78, 73, 22, 73, 78, 170, 23, 9, 9, 9, 9, 24, 24, 24, 24, 329, 103, 327, 109, 326, 24, 103, 76, 109, 73, 76, 117, 24, 325, 78, 73, 117, 73, 78, 170, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 21, 10, 10, 68, 22, 10, 10, 10, 23, 74, 86, 74, 158, 68, 164, 74, 68, 84, 81, 96, 68, 158, 81, 120, 88, 125, 120, 291, 125, 24, 81, 289, 68, 10, 10, 10, 10, 74, 86, 74, 84, 68, 164, 74, 68, 84, 86, 81, 68, 88, 123, 81, 158, 88, 81, 123, 128, 128, 81, 131, 131, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 75, 82, 288, 96, 96, 96, 87, 132, 132, 285, 75, 129, 75, 129, 129, 75, 87, 134, 87, 143, 134, 87, 144, 160, 160, 11, 11, 11, 150, 75, 82, 133, 133, 149, 284, 87, 149, 151, 75, 283, 75, 82, 82, 75, 87, 159, 87, 159, 159, 87, 209, 282, 132, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 219, 219, 281, 133, 165, 166, 167, 168, 168, 280, 163, 143, 143, 143, 144, 144, 144, 163, 278, 169, 150, 150, 150, 171, 145, 12, 12, 12, 42, 151, 151, 151, 165, 166, 167, 275, 168, 168, 163, 220, 220, 274, 209, 209, 209, 163, 145, 169, 272, 42, 234, 172, 171, 12, 12, 12, 12, 12, 12, 12, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 145, 17, 17, 42, 172, 17, 17, 17, 232, 173, 174, 175, 176, 230, 177, 178, 179, 229, 178, 180, 181, 182, 183, 188, 145, 145, 145, 185, 42, 42, 42, 186, 187, 17, 17, 17, 17, 173, 228, 174, 175, 176, 177, 178, 214, 179, 178, 214, 180, 181, 182, 183, 188, 218, 227, 185, 218, 224, 190, 186, 187, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 189, 18, 18, 184, 190, 18, 18, 18, 223, 191, 192, 184, 193, 194, 221, 221, 225, 235, 235, 236, 238, 237, 222, 239, 240, 244, 241, 242, 189, 245, 246, 184, 237, 18, 18, 18, 18, 191, 192, 184, 193, 217, 194, 213, 212, 225, 211, 206, 236, 238, 237, 239, 240, 244, 205, 241, 242, 247, 245, 246, 237, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 205, 19, 19, 247, 250, 19, 19, 19, 248, 202, 251, 252, 253, 201, 254, 255, 257, 258, 205, 259, 260, 200, 261, 262, 199, 263, 198, 265, 266, 267, 195, 226, 250, 19, 19, 19, 19, 248, 251, 19, 252, 253, 254, 255, 157, 257, 258, 259, 154, 260, 261, 153, 262, 263, 226, 265, 266, 152, 267, 269, 148, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 226, 20, 20, 270, 269, 20, 20, 20, 147, 271, 295, 286, 297, 146, 300, 303, 141, 304, 306, 308, 310, 140, 311, 226, 226, 226, 313, 314, 315, 316, 322, 270, 317, 20, 20, 20, 20, 271, 295, 20, 286, 297, 300, 139, 303, 304, 121, 306, 308, 310, 311, 116, 111, 107, 313, 314, 100, 315, 316, 322, 317, 20, 20, 20, 20, 20, 20, 20, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 287, 319, 321, 324, 334, 335, 337, 338, 339, 340, 341, 342, 83, 343, 345, 350, 80, 351, 287, 51, 352, 353, 49, 361, 366, 368, 362, 46, 371, 319, 321, 372, 324, 334, 337, 338, 339, 340, 341, 373, 342, 343, 335, 345, 350, 351, 380, 287, 352, 374, 353, 361, 366, 368, 381, 362, 371, 375, 376, 385, 372, 384, 387, 388, 395, 389, 390, 373, 391, 394, 335, 397, 406, 41, 380, 287, 287, 287, 374, 398, 335, 335, 335, 362, 399, 400, 375, 376, 385, 384, 381, 387, 388, 389, 390, 401, 391, 402, 394, 405, 397, 362, 362, 362, 408, 409, 415, 398, 410, 411, 412, 31, 399, 400, 417, 27, 419, 420, 381, 8, 7, 0, 422, 423, 401, 424, 402, 405, 427, 381, 381, 381, 408, 428, 409, 415, 410, 411, 412, 395, 395, 395, 429, 417, 419, 420, 432, 406, 406, 406, 422, 435, 423, 0, 424, 0, 427, 0, 0, 0, 0, 0, 428, 0, 0, 0, 0, 0, 0, 0, 0, 429, 0, 0, 432, 0, 0, 0, 0, 435, 438, 438, 438, 438, 438, 438, 438, 438, 438, 439, 439, 439, 439, 439, 439, 439, 439, 439, 440, 440, 440, 440, 440, 440, 440, 440, 440, 441, 441, 441, 441, 441, 441, 441, 441, 441, 442, 442, 442, 442, 442, 442, 442, 442, 442, 443, 443, 443, 443, 443, 443, 443, 443, 443, 444, 444, 444, 444, 444, 444, 444, 444, 444, 445, 445, 445, 445, 445, 445, 445, 445, 445, 446, 446, 446, 446, 447, 0, 447, 447, 447, 447, 447, 447, 447, 448, 0, 448, 448, 448, 448, 448, 448, 448, 449, 449, 450, 0, 450, 450, 450, 450, 450, 450, 451, 451, 451, 451, 452, 452, 453, 453, 453, 453, 454, 454, 454, 454, 455, 0, 455, 455, 455, 455, 455, 455, 455, 456, 456, 456, 456, 457, 457, 457, 457, 458, 458, 458, 458, 459, 459, 460, 460, 460, 461, 461, 462, 462, 462, 462, 462, 463, 463, 464, 464, 465, 465, 466, 466, 467, 467, 468, 468, 469, 469, 470, 470, 471, 471, 472, 472, 473, 473, 474, 474, 475, 475, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437 } ; extern int yy_flex_debug; int yy_flex_debug = 0; static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; static char *yy_full_match; static int yy_lp; #define REJECT \ { \ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \ yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ ++(yy_lp); \ goto find_rule; \ } #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "../lexer/theme-lexer.l" /* * rofi * * MIT/X11 License * Copyright 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #line 36 "../lexer/theme-lexer.l" #include "config.h" #include "resources.h" #include #include #include #include #include #include #include "rofi.h" #include "theme.h" #include "theme-parser.h" #include "css-colors.h" #define LOG_DOMAIN "Parser" int last_state = 0; /** * Type of Object to parse. */ typedef enum { /** Parse a file */ PT_FILE, /** Parse a string */ PT_STRING, /** Parse a string */ PT_STRING_ALLOC, /** Parse environment */ PT_ENV } ParseType; /** * Parse object */ typedef struct _ParseObject { /** Type */ ParseType type; /** File pointer */ FILE *filein; char *filename; /** Length of string */ int str_len; /** String */ const char *input_str; /** For where we need to free at end. (PT_STRING_ALLOC); */ char *malloc_str; /** Position in file */ YYLTYPE location; } ParseObject; GQueue *file_queue = NULL; GQueue *queue = NULL; ParseObject *current = NULL; static double rofi_theme_parse_convert_hex ( char high, char low) { uint8_t retv = 0; int t = g_ascii_toupper ( high ); t = ( t > '9')? (t-'A'+10):(t-'0'); retv = t<<4; t = g_ascii_toupper ( low ); t = ( t > '9')? (t-'A'+10):(t-'0'); retv +=t; return retv/255.0; } #line 1111 "lexer/theme-lexer.c" #line 111 "../lexer/theme-lexer.l" #define YY_INPUT(buf,result,max_size) \ {\ if ( current == NULL ) {\ result = 0;\ } else {\ switch ( current->type ) { \ case PT_FILE:\ {\ errno =0; \ while ( (result = (int) fread(buf, 1, max_size, current->filein))==0 && ferror(current->filein)) \ { \ if ( errno != EINTR ) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(current->filein); \ } \ break;\ }\ case PT_ENV:\ case PT_STRING_ALLOC:\ case PT_STRING:\ {\ yy_size_t len = MIN (max_size, current->str_len);\ if ( len > 0 ) {\ memcpy (buf, current->input_str, len);\ current->input_str+=len;\ current->str_len-=len;\ result = len;\ } else {\ result = 0;\ }\ break;\ }\ }\ }\ } #define YY_USER_ACTION {\ yylloc->last_column+= yyleng;\ } #define YY_LLOC_START {\ yylloc->first_line = yylloc->last_line;\ yylloc->first_column = yylloc->last_column;\ } #line 1162 "lexer/theme-lexer.c" #line 171 "../lexer/theme-lexer.l" // UANY {ASC}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} // UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} /* Position */ /* Line Style */ /* ANGLES */ /* LINE STYLE */ /* Orientation */ /* Cursor */ /* Color schema */ /* Image type */ #line 1186 "lexer/theme-lexer.c" #define INITIAL 0 #define INCLUDE 1 #define PROPERTIES 2 #define PROPERTIES_ENV 3 #define PROPERTIES_VAR 4 #define PROPERTIES_ENV_VAR 5 #define PROPERTIES_VAR_DEFAULT 6 #define PROPERTIES_LIST 7 #define NAMESTR 8 #define SECTION 9 #define DEFAULTS 10 #define MEDIA 11 #define MEDIA_CONTENT 12 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy ( void ); int yyget_debug ( void ); void yyset_debug ( int debug_flag ); YY_EXTRA_TYPE yyget_extra ( void ); void yyset_extra ( YY_EXTRA_TYPE user_defined ); FILE *yyget_in ( void ); void yyset_in ( FILE * _in_str ); FILE *yyget_out ( void ); void yyset_out ( FILE * _out_str ); int yyget_leng ( void ); char *yyget_text ( void ); int yyget_lineno ( void ); void yyset_lineno ( int _line_number ); YYSTYPE * yyget_lval ( void ); void yyset_lval ( YYSTYPE * yylval_param ); YYLTYPE *yyget_lloc ( void ); void yyset_lloc ( YYLTYPE * yylloc_param ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap ( void ); #else extern int yywrap ( void ); #endif #endif #ifndef YY_NO_UNPUT #endif #ifndef yytext_ptr static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput ( void ); #else static int input ( void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param ); #define YY_DECL int yylex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param ) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { yy_state_type yy_current_state; char *yy_cp, *yy_bp; int yy_act; YYSTYPE * yylval; YYLTYPE * yylloc; yylval = yylval_param; yylloc = yylloc_param; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif /* Create the reject buffer large enough to save one state per allowed character. */ if ( ! (yy_state_buf) ) (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE ); if ( ! (yy_state_buf) ) YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_load_buffer_state( ); } { #line 303 "../lexer/theme-lexer.l" YY_LLOC_START if ( queue == NULL ) { queue = g_queue_new ( ); yylloc->filename = current->filename; // unsure why todo this. yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; } /** * General code for handling comments. * Both C and C++ style comments, including nexting. */ #line 1458 "lexer/theme-lexer.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); (yy_state_ptr) = (yy_state_buf); *(yy_state_ptr)++ = yy_current_state; yy_match: do { YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 438 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; *(yy_state_ptr)++ = yy_current_state; ++yy_cp; } while ( yy_current_state != 437 ); yy_find_action: yy_current_state = *--(yy_state_ptr); (yy_lp) = yy_accept[yy_current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) { yy_act = yy_acclist[(yy_lp)]; { (yy_full_match) = yy_cp; break; } } --yy_cp; yy_current_state = *--(yy_state_ptr); (yy_lp) = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 1: YY_RULE_SETUP #line 323 "../lexer/theme-lexer.l" { int c = input(); while ( c != 0 && c != EOF) { if ( c == '\n' ) { yylloc->last_column = 1; yylloc->last_line ++; break; } yylloc->last_column++; c = input(); } YY_LLOC_START } YY_BREAK case 2: YY_RULE_SETUP #line 336 "../lexer/theme-lexer.l" { int c = 0, p; int nesting_depth = 1; while (nesting_depth) { p = c; c = input(); switch (c) { case '*': yylloc->last_column++; if ( p == '/' ) { c = 0; nesting_depth++; } break; case '/': yylloc->last_column++; if ( p == '*' ) { c = 0; nesting_depth--; } break; case '\n': { yylloc->last_column = 1; yylloc->last_line ++; break; } case 0: nesting_depth = 0; break; case EOF: nesting_depth = 0; break; default: yylloc->last_column++; ; } } YY_LLOC_START } YY_BREAK /** * HANDLE INCLUDES */ case 3: YY_RULE_SETUP #line 363 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(INCLUDE); } YY_BREAK case 4: YY_RULE_SETUP #line 367 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(INCLUDE); return T_RESET_THEME; } YY_BREAK /** Skip all whitespace */ case 5: YY_RULE_SETUP #line 373 "../lexer/theme-lexer.l" {} YY_BREAK /** Parse path. Last element in this INCLUDE */ case 6: YY_RULE_SETUP #line 376 "../lexer/theme-lexer.l" { ParseObject *top = g_queue_peek_head ( file_queue ); g_assert ( top != NULL ); GBytes *theme_data = g_resource_lookup_data( resources_get_resource(), "/org/qtools/rofi/default.rasi", G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); if (theme_data) { const char *theme = g_bytes_get_data(theme_data, NULL); top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_STRING_ALLOC; po->malloc_str = g_strdup(theme); po->input_str = po->malloc_str; po->str_len = strlen(po->malloc_str)-1; current = po; g_queue_push_head ( file_queue, po ); g_bytes_unref(theme_data); yypush_buffer_state (yy_create_buffer ( 0, YY_BUF_SIZE )); yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; yylloc->filename = NULL;//"default theme"; } // Pop out of include. BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); } YY_BREAK case 7: YY_RULE_SETUP #line 402 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; ParseObject *top = g_queue_peek_head ( file_queue ); g_assert ( top != NULL ); char *file2 = helper_get_theme_path ( &yytext[1], ".rasi" ); char *filename = rofi_theme_parse_prepare_file ( file2, top->filename ); g_free ( file2 ); FILE *f = fopen ( filename, "rb" ); if ( f ) { top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_FILE; po->filename = filename; po->filein = f; current = po; g_queue_push_head ( file_queue, po ); yypush_buffer_state (yy_create_buffer ( 0, YY_BUF_SIZE )); yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; yylloc->filename = current->filename; } else { char *str = g_markup_printf_escaped ( "Failed to open theme: %s\nError: %s", filename, strerror ( errno ) ); rofi_add_error_message ( g_string_new ( str ) ); g_free ( str ); g_free(filename); } // Pop out of include. */ BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); } YY_BREAK /** Everythin not yet parsed is an error. */ case 8: YY_RULE_SETUP #line 434 "../lexer/theme-lexer.l" { return T_ERROR_INCLUDE; } YY_BREAK /** * END INCLUDES */ case 9: YY_RULE_SETUP #line 443 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(DEFAULTS); return T_CONFIGURATION; } YY_BREAK /** * Handle defaults: * { ... } */ case 10: YY_RULE_SETUP #line 453 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(DEFAULTS); return T_PDEFAULTS; } YY_BREAK /** Skip all whitespace */ case 11: YY_RULE_SETUP #line 459 "../lexer/theme-lexer.l" {} YY_BREAK case 12: YY_RULE_SETUP #line 460 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(SECTION); return T_BOPEN; } YY_BREAK /** Everything not yet parsed is an error. */ case 13: YY_RULE_SETUP #line 466 "../lexer/theme-lexer.l" { return T_ERROR_DEFAULTS; } YY_BREAK case 14: YY_RULE_SETUP #line 470 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(NAMESTR); return T_NAME_PREFIX; } YY_BREAK /* Go into parsing a section. */ case 15: YY_RULE_SETUP #line 476 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(SECTION); return T_BOPEN; } YY_BREAK /* Pop out of parsing a section. */ case 16: YY_RULE_SETUP #line 482 "../lexer/theme-lexer.l" { g_queue_pop_head ( queue ); BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_BCLOSE; } YY_BREAK case 17: YY_RULE_SETUP #line 488 "../lexer/theme-lexer.l" { return T_NSEP; } YY_BREAK case 18: YY_RULE_SETUP #line 489 "../lexer/theme-lexer.l" { return T_SSEP; } YY_BREAK /* Alias color to text-color */ case 19: YY_RULE_SETUP #line 491 "../lexer/theme-lexer.l" { yylval->sval = g_strdup("text-color"); return T_PROP_NAME;} YY_BREAK case 20: YY_RULE_SETUP #line 492 "../lexer/theme-lexer.l" { yylval->sval = g_strdup(yytext); return T_PROP_NAME;} YY_BREAK case 21: YY_RULE_SETUP #line 493 "../lexer/theme-lexer.l" { yylval->sval = g_strdup(yytext); return T_NAME_ELEMENT;} YY_BREAK /* After Namestr/Classstr we want to go to state str, then to { */ case 22: YY_RULE_SETUP #line 496 "../lexer/theme-lexer.l" ; // ignore all whitespace YY_BREAK case 23: YY_RULE_SETUP #line 497 "../lexer/theme-lexer.l" ; // ignore all whitespace YY_BREAK case 24: YY_RULE_SETUP #line 499 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES); return T_PSEP; } YY_BREAK case 25: YY_RULE_SETUP #line 500 "../lexer/theme-lexer.l" { BEGIN(GPOINTER_TO_INT ( g_queue_pop_head ( queue ))); return T_PCLOSE;} YY_BREAK case 26: YY_RULE_SETUP #line 501 "../lexer/theme-lexer.l" { yylval->bval= g_strcmp0(yytext, "true") == 0; return T_BOOLEAN;} YY_BREAK case 27: YY_RULE_SETUP #line 502 "../lexer/theme-lexer.l" { yylval->fval = g_ascii_strtod(yytext, NULL); return T_DOUBLE;} YY_BREAK case 28: YY_RULE_SETUP #line 503 "../lexer/theme-lexer.l" { yylval->ival = (int)g_ascii_strtoll(yytext, NULL, 10); return T_INT;} YY_BREAK case 29: YY_RULE_SETUP #line 504 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; yylval->sval = g_strcompress(&yytext[1]); return T_STRING;} YY_BREAK case 30: YY_RULE_SETUP #line 505 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; yylval->cval = g_strcompress(&yytext[1])[0]; return T_CHAR;} YY_BREAK case 31: YY_RULE_SETUP #line 507 "../lexer/theme-lexer.l" { yylval->sval = g_strdup(yytext+1); return T_LINK; } YY_BREAK case 32: YY_RULE_SETUP #line 512 "../lexer/theme-lexer.l" { // Double to fit in scheme. g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); g_queue_push_head ( queue, GINT_TO_POINTER (SECTION) ); BEGIN(SECTION); return T_BOPEN; } YY_BREAK case 33: YY_RULE_SETUP #line 520 "../lexer/theme-lexer.l" { return T_UNIT_EM; } YY_BREAK case 34: YY_RULE_SETUP #line 521 "../lexer/theme-lexer.l" { return T_UNIT_CH; } YY_BREAK case 35: YY_RULE_SETUP #line 522 "../lexer/theme-lexer.l" { return T_UNIT_PX; } YY_BREAK case 36: YY_RULE_SETUP #line 523 "../lexer/theme-lexer.l" { return T_UNIT_MM; } YY_BREAK case 37: YY_RULE_SETUP #line 524 "../lexer/theme-lexer.l" { return T_PERCENT; } YY_BREAK case 38: YY_RULE_SETUP #line 525 "../lexer/theme-lexer.l" { return T_SOLID; } YY_BREAK case 39: YY_RULE_SETUP #line 526 "../lexer/theme-lexer.l" { return T_DASH; } YY_BREAK case 40: YY_RULE_SETUP #line 528 "../lexer/theme-lexer.l" { return T_INHERIT; } YY_BREAK case 41: YY_RULE_SETUP #line 529 "../lexer/theme-lexer.l" { return T_MODIFIER_ADD; } YY_BREAK case 42: YY_RULE_SETUP #line 530 "../lexer/theme-lexer.l" { return T_MODIFIER_SUBTRACT; } YY_BREAK case 43: YY_RULE_SETUP #line 531 "../lexer/theme-lexer.l" { return T_MODIFIER_MULTIPLY; } YY_BREAK case 44: YY_RULE_SETUP #line 532 "../lexer/theme-lexer.l" { return T_MODIFIER_MIN; } YY_BREAK case 45: YY_RULE_SETUP #line 533 "../lexer/theme-lexer.l" { return T_MODIFIER_MAX; } YY_BREAK case 46: YY_RULE_SETUP #line 534 "../lexer/theme-lexer.l" { return T_CALC; } YY_BREAK case 47: YY_RULE_SETUP #line 536 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; const char *val = g_getenv(yytext+2); if ( val ) { ParseObject *top = g_queue_peek_head ( file_queue ); top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_ENV; po->input_str = val; po->str_len = strlen(val); current = po; g_queue_push_head ( file_queue, po ); yypush_buffer_state (yy_create_buffer ( 0, YY_BUF_SIZE )); yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; yylloc->filename = current->filename; g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_ENV); } } YY_BREAK case 48: YY_RULE_SETUP #line 556 "../lexer/theme-lexer.l" { const char *val = g_getenv(yytext); if ( val ) { ParseObject *top = g_queue_peek_head ( file_queue ); top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_ENV; po->input_str = val; po->str_len = strlen(val); current = po; g_queue_push_head ( file_queue, po ); yypush_buffer_state (yy_create_buffer ( 0, YY_BUF_SIZE )); yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; yylloc->filename = current->filename; g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_ENV); } } YY_BREAK /** * Color parsing. It is easier to do this at lexer level. * Other schemes are done at yacc level. */ case 49: YY_RULE_SETUP #line 581 "../lexer/theme-lexer.l" { yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[2]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[3],yytext[4]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[5],yytext[6]); yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[7],yytext[8]); return T_COLOR; } YY_BREAK case 50: YY_RULE_SETUP #line 588 "../lexer/theme-lexer.l" { yylval->colorval.alpha = 1.0; yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[2]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[3],yytext[4]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[5],yytext[6]); return T_COLOR; } YY_BREAK case 51: YY_RULE_SETUP #line 595 "../lexer/theme-lexer.l" { yylval->colorval.alpha = 1.0; yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[1]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[2],yytext[2]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[3],yytext[3]); return T_COLOR; } YY_BREAK case 52: YY_RULE_SETUP #line 602 "../lexer/theme-lexer.l" { yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[4],yytext[4]); yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[1]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[2],yytext[2]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[3],yytext[3]); return T_COLOR; } YY_BREAK case 53: YY_RULE_SETUP #line 609 "../lexer/theme-lexer.l" { yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[5],yytext[6]); yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[7],yytext[8]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[9],yytext[10]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[11],yytext[12]); return T_COLOR; } YY_BREAK case 54: YY_RULE_SETUP #line 616 "../lexer/theme-lexer.l" { return T_ERROR_ARGB_SPEC; } YY_BREAK case 55: YY_RULE_SETUP #line 619 "../lexer/theme-lexer.l" { return T_URL; } YY_BREAK case 56: YY_RULE_SETUP #line 620 "../lexer/theme-lexer.l" { return T_LINEAR_GRADIENT; } YY_BREAK case 57: YY_RULE_SETUP #line 621 "../lexer/theme-lexer.l" { return T_WIDTH; } YY_BREAK case 58: YY_RULE_SETUP #line 622 "../lexer/theme-lexer.l" { return T_HEIGHT; } YY_BREAK case 59: YY_RULE_SETUP #line 623 "../lexer/theme-lexer.l" { return T_BOTH; } YY_BREAK case 60: YY_RULE_SETUP #line 625 "../lexer/theme-lexer.l" { return T_TO; } YY_BREAK case 61: YY_RULE_SETUP #line 626 "../lexer/theme-lexer.l" { return T_LEFT; } YY_BREAK case 62: YY_RULE_SETUP #line 627 "../lexer/theme-lexer.l" { return T_RIGHT; } YY_BREAK case 63: YY_RULE_SETUP #line 628 "../lexer/theme-lexer.l" { return T_TOP; } YY_BREAK case 64: YY_RULE_SETUP #line 629 "../lexer/theme-lexer.l" { return T_BOTTOM; } YY_BREAK /* Color schemes */ case 65: YY_RULE_SETUP #line 632 "../lexer/theme-lexer.l" { return T_COL_RGBA; } YY_BREAK case 66: YY_RULE_SETUP #line 633 "../lexer/theme-lexer.l" { return T_COL_HSL; } YY_BREAK case 67: YY_RULE_SETUP #line 634 "../lexer/theme-lexer.l" { return T_COL_HWB; } YY_BREAK case 68: YY_RULE_SETUP #line 635 "../lexer/theme-lexer.l" { return T_COL_CMYK; } YY_BREAK case 69: YY_RULE_SETUP #line 637 "../lexer/theme-lexer.l" { return T_PARENT_LEFT; } YY_BREAK /* Fluff */ case 70: YY_RULE_SETUP #line 641 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_VAR); return T_VAR_START; } YY_BREAK case 71: YY_RULE_SETUP #line 646 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_ENV_VAR); return T_ENV_START; } YY_BREAK case 72: YY_RULE_SETUP #line 651 "../lexer/theme-lexer.l" { BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_PARENT_RIGHT; } YY_BREAK case 73: YY_RULE_SETUP #line 655 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_VAR_DEFAULT); return T_COMMA; } YY_BREAK case 74: YY_RULE_SETUP #line 660 "../lexer/theme-lexer.l" { // Pop 2. g_queue_pop_head ( queue ); BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_PARENT_RIGHT; } YY_BREAK case 75: YY_RULE_SETUP #line 666 "../lexer/theme-lexer.l" { return T_PARENT_LEFT; } YY_BREAK case 76: YY_RULE_SETUP #line 667 "../lexer/theme-lexer.l" { return T_PARENT_RIGHT; } YY_BREAK case 77: YY_RULE_SETUP #line 668 "../lexer/theme-lexer.l" { return T_COMMA; } YY_BREAK case 78: YY_RULE_SETUP #line 669 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_LIST); return T_LIST_OPEN; } YY_BREAK case 79: YY_RULE_SETUP #line 674 "../lexer/theme-lexer.l" { BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_LIST_CLOSE; } YY_BREAK case 80: YY_RULE_SETUP #line 678 "../lexer/theme-lexer.l" { return T_FORWARD_SLASH; } YY_BREAK /* Position */ case 81: YY_RULE_SETUP #line 680 "../lexer/theme-lexer.l" { return T_POS_CENTER; } YY_BREAK case 82: YY_RULE_SETUP #line 681 "../lexer/theme-lexer.l" { return T_POS_EAST; } YY_BREAK case 83: YY_RULE_SETUP #line 682 "../lexer/theme-lexer.l" { return T_POS_WEST; } YY_BREAK case 84: YY_RULE_SETUP #line 683 "../lexer/theme-lexer.l" { return T_POS_SOUTH; } YY_BREAK case 85: YY_RULE_SETUP #line 684 "../lexer/theme-lexer.l" { return T_POS_NORTH; } YY_BREAK /* Highlight style */ case 86: YY_RULE_SETUP #line 686 "../lexer/theme-lexer.l" { return T_NONE; } YY_BREAK case 87: YY_RULE_SETUP #line 687 "../lexer/theme-lexer.l" { return T_BOLD; } YY_BREAK case 88: YY_RULE_SETUP #line 688 "../lexer/theme-lexer.l" { return T_ITALIC; } YY_BREAK case 89: YY_RULE_SETUP #line 689 "../lexer/theme-lexer.l" { return T_UNDERLINE; } YY_BREAK case 90: YY_RULE_SETUP #line 690 "../lexer/theme-lexer.l" { return T_STRIKETHROUGH; } YY_BREAK case 91: YY_RULE_SETUP #line 691 "../lexer/theme-lexer.l" { return T_SMALLCAPS; } YY_BREAK case 92: YY_RULE_SETUP #line 693 "../lexer/theme-lexer.l" { return T_ANGLE_DEG; } YY_BREAK case 93: YY_RULE_SETUP #line 694 "../lexer/theme-lexer.l" { return T_ANGLE_RAD; } YY_BREAK case 94: YY_RULE_SETUP #line 695 "../lexer/theme-lexer.l" { return T_ANGLE_GRAD; } YY_BREAK case 95: YY_RULE_SETUP #line 696 "../lexer/theme-lexer.l" { return T_ANGLE_TURN; } YY_BREAK case 96: YY_RULE_SETUP #line 698 "../lexer/theme-lexer.l" { return ORIENTATION_HORI; } YY_BREAK case 97: YY_RULE_SETUP #line 699 "../lexer/theme-lexer.l" { return ORIENTATION_VERT; } YY_BREAK case 98: YY_RULE_SETUP #line 701 "../lexer/theme-lexer.l" { return CURSOR_DEF; } YY_BREAK case 99: YY_RULE_SETUP #line 702 "../lexer/theme-lexer.l" { return CURSOR_PTR; } YY_BREAK case 100: YY_RULE_SETUP #line 703 "../lexer/theme-lexer.l" { return CURSOR_TXT; } YY_BREAK case 101: YY_RULE_SETUP #line 705 "../lexer/theme-lexer.l" { return T_COLOR_TRANSPARENT; } YY_BREAK case 102: YY_RULE_SETUP #line 708 "../lexer/theme-lexer.l" { for ( unsigned int iter = 0; iter < num_CSSColors; iter++) { if ( strcasecmp(yytext, CSSColors[iter].name )== 0 ) { yylval->colorval.alpha = 1.0; yylval->colorval.red = CSSColors[iter].r/255.0; yylval->colorval.green = CSSColors[iter].g/255.0; yylval->colorval.blue = CSSColors[iter].b/255.0; return T_COLOR_NAME; } } REJECT; } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PROPERTIES_ENV): case YY_STATE_EOF(PROPERTIES_VAR_DEFAULT): #line 721 "../lexer/theme-lexer.l" { ParseObject *po = g_queue_pop_head ( file_queue ); if ( po ) { if ( po->type == PT_FILE ) { fclose ( po->filein ); } if ( po->type == PT_STRING_ALLOC ) { g_free( po->malloc_str); } g_free ( po->filename ); g_free ( po ); } po = g_queue_peek_head ( file_queue ); if ( po == NULL ) { g_queue_free ( queue ); // Reset pointer to NULL queue = NULL; yyterminate(); } else { yypop_buffer_state(); current = po; *yylloc = current->location; BEGIN(GPOINTER_TO_INT ( g_queue_pop_head ( queue ))); } } YY_BREAK case 103: /* rule 103 can match eol */ YY_RULE_SETUP #line 747 "../lexer/theme-lexer.l" { yylloc->last_column = 1; yylloc->last_line ++; }; YY_BREAK case 104: /* rule 104 can match eol */ YY_RULE_SETUP #line 751 "../lexer/theme-lexer.l" { yylloc->last_column = 1; yylloc->last_line ++; }; YY_BREAK case 105: YY_RULE_SETUP #line 757 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(MEDIA); return T_MEDIA; } YY_BREAK case 106: YY_RULE_SETUP #line 763 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(MEDIA_CONTENT); return T_PARENT_LEFT; } YY_BREAK case 107: YY_RULE_SETUP #line 768 "../lexer/theme-lexer.l" { yylval->sval = g_strdup(yytext); return T_STRING; } YY_BREAK case 108: YY_RULE_SETUP #line 772 "../lexer/theme-lexer.l" { return T_PSEP; } YY_BREAK case 109: YY_RULE_SETUP #line 775 "../lexer/theme-lexer.l" { int id = GPOINTER_TO_INT(g_queue_pop_head ( queue )); BEGIN(id); return T_PARENT_RIGHT; } YY_BREAK case 110: YY_RULE_SETUP #line 780 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(INITIAL); return T_BOPEN; } YY_BREAK case 111: YY_RULE_SETUP #line 786 "../lexer/theme-lexer.l" { g_queue_pop_head ( queue ); BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_BCLOSE; } YY_BREAK case 112: YY_RULE_SETUP #line 791 "../lexer/theme-lexer.l" ; // ignore all whitespace YY_BREAK case 113: YY_RULE_SETUP #line 794 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; fprintf(stderr,"found: |%s|\n", yytext); return T_ERROR; } YY_BREAK /** * If we just encounter a word, we assume it is a Widget name. * This makes include,theme, configuration a reserved keyword. */ case 114: YY_RULE_SETUP #line 804 "../lexer/theme-lexer.l" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(NAMESTR); yylval->sval = g_strdup(yytext); return T_NAME_ELEMENT; } YY_BREAK case 115: YY_RULE_SETUP #line 810 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; fprintf(stderr,"initial found: |%s|\n", yytext); return T_ERROR; } YY_BREAK case 116: YY_RULE_SETUP #line 815 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; fprintf(stderr,"section found: |%s|\n", yytext); return T_ERROR_SECTION; } YY_BREAK case 117: YY_RULE_SETUP #line 820 "../lexer/theme-lexer.l" { yylval->sval = g_strdup(yytext); return T_ELEMENT; } YY_BREAK case 118: YY_RULE_SETUP #line 824 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; yylval->sval = g_strdup(yytext+1); return T_ELEMENT; } YY_BREAK case 119: YY_RULE_SETUP #line 830 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; return T_ERROR_PROPERTY; } YY_BREAK case 120: YY_RULE_SETUP #line 834 "../lexer/theme-lexer.l" { yytext[yyleng-1] = '\0'; return T_ERROR_NAMESTRING; } YY_BREAK case 121: YY_RULE_SETUP #line 838 "../lexer/theme-lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 2492 "lexer/theme-lexer.c" case YY_STATE_EOF(INCLUDE): case YY_STATE_EOF(PROPERTIES): case YY_STATE_EOF(PROPERTIES_VAR): case YY_STATE_EOF(PROPERTIES_ENV_VAR): case YY_STATE_EOF(PROPERTIES_LIST): case YY_STATE_EOF(NAMESTR): case YY_STATE_EOF(SECTION): case YY_STATE_EOF(DEFAULTS): case YY_STATE_EOF(MEDIA): case YY_STATE_EOF(MEDIA_CONTENT): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = (yytext_ptr); int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); /* "- 2" to take care of EOB's */ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { yy_state_type yy_current_state; char *yy_cp; yy_current_state = (yy_start); (yy_state_ptr) = (yy_state_buf); *(yy_state_ptr)++ = yy_current_state; for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 438 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; *(yy_state_ptr)++ = yy_current_state; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { int yy_is_jam; YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 438 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 437); if ( ! yy_is_jam ) *(yy_state_ptr)++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_init_buffer( YY_CURRENT_BUFFER, input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree( (void *) b->yy_ch_buf ); yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return NULL; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (const char * yystr ) { return yy_scan_bytes( yystr, (int) strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); buf = (char *) yyalloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yynoreturn yy_fatal_error (const char* msg ) { fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param _line_number line number * */ void yyset_lineno (int _line_number ) { yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * _in_str ) { yyin = _in_str ; } void yyset_out (FILE * _out_str ) { yyout = _out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int _bdebug ) { yy_flex_debug = _bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; (yy_state_buf) = 0; (yy_state_ptr) = 0; (yy_full_match) = 0; (yy_lp) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = NULL; yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; yyfree ( (yy_state_buf) ); (yy_state_buf) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, const char * s2, int n ) { int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (const char * s ) { int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return realloc(ptr, size); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 838 "../lexer/theme-lexer.l" gboolean rofi_theme_parse_file ( const char *file ) { char *file2 = helper_get_theme_path ( file, ".rasi" ); char *filename = rofi_theme_parse_prepare_file ( file2, NULL ); g_free ( file2 ); yyin = fopen ( filename, "rb" ); if ( yyin == NULL ) { char *str = g_markup_printf_escaped ( "Failed to open theme: %s\nError: %s", filename, strerror ( errno ) ); rofi_add_error_message ( g_string_new ( str ) ); g_free ( str ); g_free ( filename ); return TRUE; } /** Add Parse object */ file_queue = g_queue_new (); ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_FILE; po->filename = filename; po->filein = yyin; current = po; g_queue_push_head ( file_queue, po ); g_debug ( "Parsing top file: '%s'", filename ); int parser_retv = yyparse ( file ); yylex_destroy (); yyin = NULL; while ( (po = g_queue_pop_head ( file_queue ) )) { if ( po ) { if ( po->type == PT_FILE ) { fclose ( po->filein ); } if ( po->type == PT_STRING_ALLOC ) { g_free( po->malloc_str); } g_free ( po->filename ); g_free ( po ); } } // Free up. g_queue_free ( file_queue ); file_queue = NULL; if ( parser_retv != 0 ) { return TRUE; } return FALSE; } gboolean rofi_theme_parse_string ( const char *string ) { yyin = NULL; /** Add Parse object */ file_queue = g_queue_new (); ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_STRING; po->input_str = string; po->str_len = strlen(string); current = po; g_queue_push_head ( file_queue, po ); g_debug ( "Parsing string: '%s'", string ); int parser_retv = yyparse ( string ); yylex_destroy (); while ( (po = g_queue_pop_head ( file_queue ) )) { if ( po ) { if ( po->type == PT_FILE ) { fclose ( po->filein ); } if ( po->type == PT_STRING_ALLOC ) { g_free( po->malloc_str); } g_free ( po->filename ); g_free ( po ); } } // Free up. g_queue_free ( file_queue ); file_queue = NULL; if ( parser_retv != 0 ) { return TRUE; } return FALSE; } rofi-1.7.1/lexer/theme-lexer.l0000644000175100001710000007115714150243117013121 00000000000000/* * rofi * * MIT/X11 License * Copyright 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ %option nodefault noyywrap %option nostdinit %option nounput %option never-interactive %option bison-locations %option bison-bridge %{ #include "config.h" #include "resources.h" #include #include #include #include #include #include #include "rofi.h" #include "theme.h" #include "theme-parser.h" #include "css-colors.h" #define LOG_DOMAIN "Parser" int last_state = 0; /** * Type of Object to parse. */ typedef enum { /** Parse a file */ PT_FILE, /** Parse a string */ PT_STRING, /** Parse a string */ PT_STRING_ALLOC, /** Parse environment */ PT_ENV } ParseType; /** * Parse object */ typedef struct _ParseObject { /** Type */ ParseType type; /** File pointer */ FILE *filein; char *filename; /** Length of string */ int str_len; /** String */ const char *input_str; /** For where we need to free at end. (PT_STRING_ALLOC); */ char *malloc_str; /** Position in file */ YYLTYPE location; } ParseObject; GQueue *file_queue = NULL; GQueue *queue = NULL; ParseObject *current = NULL; static double rofi_theme_parse_convert_hex ( char high, char low) { uint8_t retv = 0; int t = g_ascii_toupper ( high ); t = ( t > '9')? (t-'A'+10):(t-'0'); retv = t<<4; t = g_ascii_toupper ( low ); t = ( t > '9')? (t-'A'+10):(t-'0'); retv +=t; return retv/255.0; } %} %{ #define YY_INPUT(buf,result,max_size) \ {\ if ( current == NULL ) {\ result = 0;\ } else {\ switch ( current->type ) { \ case PT_FILE:\ {\ errno =0; \ while ( (result = (int) fread(buf, 1, max_size, current->filein))==0 && ferror(current->filein)) \ { \ if ( errno != EINTR ) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(current->filein); \ } \ break;\ }\ case PT_ENV:\ case PT_STRING_ALLOC:\ case PT_STRING:\ {\ yy_size_t len = MIN (max_size, current->str_len);\ if ( len > 0 ) {\ memcpy (buf, current->input_str, len);\ current->input_str+=len;\ current->str_len-=len;\ result = len;\ } else {\ result = 0;\ }\ break;\ }\ }\ }\ } #define YY_USER_ACTION {\ yylloc->last_column+= yyleng;\ } #define YY_LLOC_START {\ yylloc->first_line = yylloc->last_line;\ yylloc->first_column = yylloc->last_column;\ } %} ASC [\x00-\x7f] ASCN [\x00-\t\v-\x7f] ASCNP [\x00-\t\v-\x21\x23-\x7f] U [\x80-\xbf] U2 [\xc2-\xdf] U3 [\xe0-\xef] U4 [\xf0-\xf4] // UANY {ASC}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} UANYN {ASCN}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} // UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} UANYNP {ASCNP}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} WHITESPACE [[:blank:]] WSO [[:blank:]]* WORD [[:alnum:]-]+ WORD_ENV [[:alpha:]_][[:alnum:]_]* MEDIA_NAME [[:alpha:]-]+ COLOR_NAME [[:alpha:]]+ STRING \"{UANYN}*\" STRING_LIST \"{UANYNP}*\" CHAR \'({ASCN}|\\\\|\\\'|\\0)\' HEX [[:xdigit:]] NUMBER [[:digit:]] PNNUMBER [-+]?[[:digit:]]+ PX (px) MM (mm) EM (em) CH (ch) PERCENT (\%) INHERIT (inherit) ASTERIX \* ENV $\{[[:alpha:]_][[:alnum:]_]*\} MODIFIER_ADD \+ MODIFIER_SUBTRACT - MODIFIER_MULTIPLY \* MODIFIER_MIN (min) MODIFIER_MAX (max) /* Position */ CENTER (?i:center) NORTH (?i:north) SOUTH (?i:south) EAST (?i:east) WEST (?i:west) /* Line Style */ NONE (?i:none) BOLD (?i:bold) UNDERLINE (?i:underline) ITALIC (?i:italic) STRIKETHROUGH (?i:strikethrough) SMALLCAPS (?i:small\ caps) /* ANGLES */ ANGLE_DEG (?i:deg) ANGLE_GRAD (?i:grad) ANGLE_RAD (?i:rad) ANGLE_TURN (?i:turn) /* LINE STYLE */ LS_DASH (?i:dash) LS_SOLID (?i:solid) /* Orientation */ ORIENTATION_HORI (?i:horizontal) ORIENTATION_VERT (?i:vertical) /* Cursor */ CURSOR_DEF (?i:default) CURSOR_PTR (?i:pointer) CURSOR_TXT (?i:text) /* Color schema */ RGBA (?i:rgb[a]?) HWB (?i:hwb) CMYK (?i:cmyk) HSL (?i:hsl[a]?) /* Image type */ URL (?i:url?) LINEAR_GRADIENT (?i:linear-gradient?) WIDTH (?i:width?) HEIGHT (?i:height?) BOTH (?i:both?) TO (?i:to?) RIGHT (?i:right?) LEFT (?i:left?) TOP (?i:top?) BOTTOM (?i:bottom?) COLOR_TRANSPARENT (?i:transparent) S_T_PARENT_LEFT \( S_T_PARENT_RIGHT \) CALC (?i:calc) COMMA , FORWARD_SLASH \/ LIST_OPEN \[ LIST_CLOSE \] VAR_START "var" ENV_START "env" CPP_COMMENT "//" C_COMMENT_OPEN "/*" INCLUDE "@import" THEME "@theme" DEFAULT (?i:\"default\"?) MEDIA "@media" CONFIGURATION (?i:configuration) %x INCLUDE %x PROPERTIES %x PROPERTIES_ENV %x PROPERTIES_VAR %x PROPERTIES_ENV_VAR %x PROPERTIES_VAR_DEFAULT %x PROPERTIES_LIST %x NAMESTR %x SECTION %x DEFAULTS %x MEDIA %x MEDIA_CONTENT %% %{ YY_LLOC_START %} %{ if ( queue == NULL ) { queue = g_queue_new ( ); yylloc->filename = current->filename; // unsure why todo this. yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; } %} /** * General code for handling comments. * Both C and C++ style comments, including nexting. */ <*>{CPP_COMMENT} { int c = input(); while ( c != 0 && c != EOF) { if ( c == '\n' ) { yylloc->last_column = 1; yylloc->last_line ++; break; } yylloc->last_column++; c = input(); } YY_LLOC_START } <*>{C_COMMENT_OPEN} { int c = 0, p; int nesting_depth = 1; while (nesting_depth) { p = c; c = input(); switch (c) { case '*': yylloc->last_column++; if ( p == '/' ) { c = 0; nesting_depth++; } break; case '/': yylloc->last_column++; if ( p == '*' ) { c = 0; nesting_depth--; } break; case '\n': { yylloc->last_column = 1; yylloc->last_line ++; break; } case 0: nesting_depth = 0; break; case EOF: nesting_depth = 0; break; default: yylloc->last_column++; ; } } YY_LLOC_START } /** * HANDLE INCLUDES */ {INCLUDE} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(INCLUDE); } {THEME} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(INCLUDE); return T_RESET_THEME; } /** Skip all whitespace */ {WHITESPACE} {} /** Parse path. Last element in this INCLUDE */ {DEFAULT} { ParseObject *top = g_queue_peek_head ( file_queue ); g_assert ( top != NULL ); GBytes *theme_data = g_resource_lookup_data( resources_get_resource(), "/org/qtools/rofi/default.rasi", G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); if (theme_data) { const char *theme = g_bytes_get_data(theme_data, NULL); top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_STRING_ALLOC; po->malloc_str = g_strdup(theme); po->input_str = po->malloc_str; po->str_len = strlen(po->malloc_str)-1; current = po; g_queue_push_head ( file_queue, po ); g_bytes_unref(theme_data); yypush_buffer_state (yy_create_buffer ( 0, YY_BUF_SIZE )); yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; yylloc->filename = NULL;//"default theme"; } // Pop out of include. BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); } {STRING} { yytext[yyleng-1] = '\0'; ParseObject *top = g_queue_peek_head ( file_queue ); g_assert ( top != NULL ); char *file2 = helper_get_theme_path ( &yytext[1], ".rasi" ); char *filename = rofi_theme_parse_prepare_file ( file2, top->filename ); g_free ( file2 ); FILE *f = fopen ( filename, "rb" ); if ( f ) { top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_FILE; po->filename = filename; po->filein = f; current = po; g_queue_push_head ( file_queue, po ); yypush_buffer_state (yy_create_buffer ( 0, YY_BUF_SIZE )); yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; yylloc->filename = current->filename; } else { char *str = g_markup_printf_escaped ( "Failed to open theme: %s\nError: %s", filename, strerror ( errno ) ); rofi_add_error_message ( g_string_new ( str ) ); g_free ( str ); g_free(filename); } // Pop out of include. */ BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); } /** Everythin not yet parsed is an error. */ . { return T_ERROR_INCLUDE; } /** * END INCLUDES */ {CONFIGURATION} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(DEFAULTS); return T_CONFIGURATION; } /** * Handle defaults: * { ... } */ {ASTERIX} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(DEFAULTS); return T_PDEFAULTS; } /** Skip all whitespace */ {WHITESPACE} {} "\{" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(SECTION); return T_BOPEN; } /** Everything not yet parsed is an error. */ . { return T_ERROR_DEFAULTS; } "#" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(NAMESTR); return T_NAME_PREFIX; } /* Go into parsing a section. */ "\{" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(SECTION); return T_BOPEN; } /* Pop out of parsing a section. */
"\}" { g_queue_pop_head ( queue ); BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_BCLOSE; } \.|{WHITESPACE} { return T_NSEP; } ,{WHITESPACE}* { return T_SSEP; } /* Alias color to text-color */
"color" { yylval->sval = g_strdup("text-color"); return T_PROP_NAME;}
{WORD} { yylval->sval = g_strdup(yytext); return T_PROP_NAME;} {WORD} { yylval->sval = g_strdup(yytext); return T_NAME_ELEMENT;} /* After Namestr/Classstr we want to go to state str, then to { */ {WHITESPACE}+ ; // ignore all whitespace {WHITESPACE}+ ; // ignore all whitespace
":" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES); return T_PSEP; } ";" { BEGIN(GPOINTER_TO_INT ( g_queue_pop_head ( queue ))); return T_PCLOSE;} (true|false) { yylval->bval= g_strcmp0(yytext, "true") == 0; return T_BOOLEAN;} {PNNUMBER}\.{NUMBER}+ { yylval->fval = g_ascii_strtod(yytext, NULL); return T_DOUBLE;} {PNNUMBER} { yylval->ival = (int)g_ascii_strtoll(yytext, NULL, 10); return T_INT;} {STRING} { yytext[yyleng-1] = '\0'; yylval->sval = g_strcompress(&yytext[1]); return T_STRING;} {CHAR} { yytext[yyleng-1] = '\0'; yylval->cval = g_strcompress(&yytext[1])[0]; return T_CHAR;} @{WORD} { yylval->sval = g_strdup(yytext+1); return T_LINK; }
"\{" { // Double to fit in scheme. g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); g_queue_push_head ( queue, GINT_TO_POINTER (SECTION) ); BEGIN(SECTION); return T_BOPEN; } {EM} { return T_UNIT_EM; } {CH} { return T_UNIT_CH; } {PX} { return T_UNIT_PX; } {MM} { return T_UNIT_MM; } {PERCENT} { return T_PERCENT; } {LS_SOLID} { return T_SOLID; } {LS_DASH} { return T_DASH; } {INHERIT} { return T_INHERIT; } {MODIFIER_ADD} { return T_MODIFIER_ADD; } {MODIFIER_SUBTRACT} { return T_MODIFIER_SUBTRACT; } {MODIFIER_MULTIPLY} { return T_MODIFIER_MULTIPLY; } {MODIFIER_MIN} { return T_MODIFIER_MIN; } {MODIFIER_MAX} { return T_MODIFIER_MAX; } {CALC} { return T_CALC; } {ENV} { yytext[yyleng-1] = '\0'; const char *val = g_getenv(yytext+2); if ( val ) { ParseObject *top = g_queue_peek_head ( file_queue ); top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_ENV; po->input_str = val; po->str_len = strlen(val); current = po; g_queue_push_head ( file_queue, po ); yypush_buffer_state (yy_create_buffer ( 0, YY_BUF_SIZE )); yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; yylloc->filename = current->filename; g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_ENV); } } {WORD_ENV} { const char *val = g_getenv(yytext); if ( val ) { ParseObject *top = g_queue_peek_head ( file_queue ); top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_ENV; po->input_str = val; po->str_len = strlen(val); current = po; g_queue_push_head ( file_queue, po ); yypush_buffer_state (yy_create_buffer ( 0, YY_BUF_SIZE )); yylloc->first_line = yylloc->last_line = 1; yylloc->first_column = yylloc->last_column = 1; yylloc->filename = current->filename; g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_ENV); } } /** * Color parsing. It is easier to do this at lexer level. * Other schemes are done at yacc level. */ #{HEX}{8} { yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[2]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[3],yytext[4]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[5],yytext[6]); yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[7],yytext[8]); return T_COLOR; } #{HEX}{6} { yylval->colorval.alpha = 1.0; yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[2]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[3],yytext[4]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[5],yytext[6]); return T_COLOR; } #{HEX}{3} { yylval->colorval.alpha = 1.0; yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[1]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[2],yytext[2]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[3],yytext[3]); return T_COLOR; } #{HEX}{4} { yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[4],yytext[4]); yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[1],yytext[1]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[2],yytext[2]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[3],yytext[3]); return T_COLOR; } argb:{HEX}{8} { yylval->colorval.alpha = rofi_theme_parse_convert_hex(yytext[5],yytext[6]); yylval->colorval.red = rofi_theme_parse_convert_hex(yytext[7],yytext[8]); yylval->colorval.green = rofi_theme_parse_convert_hex(yytext[9],yytext[10]); yylval->colorval.blue = rofi_theme_parse_convert_hex(yytext[11],yytext[12]); return T_COLOR; } argb:{HEX}{7} { return T_ERROR_ARGB_SPEC; } {URL} { return T_URL; } {LINEAR_GRADIENT} { return T_LINEAR_GRADIENT; } {WIDTH} { return T_WIDTH; } {HEIGHT} { return T_HEIGHT; } {BOTH} { return T_BOTH; } {TO} { return T_TO; } {LEFT} { return T_LEFT; } {RIGHT} { return T_RIGHT; } {TOP} { return T_TOP; } {BOTTOM} { return T_BOTTOM; } /* Color schemes */ {RGBA} { return T_COL_RGBA; } {HSL} { return T_COL_HSL; } {HWB} { return T_COL_HWB; } {CMYK} { return T_COL_CMYK; } {S_T_PARENT_LEFT} { return T_PARENT_LEFT; } /* Fluff */ {VAR_START} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_VAR); return T_VAR_START; } {ENV_START} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_ENV_VAR); return T_ENV_START; } {S_T_PARENT_RIGHT} { BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_PARENT_RIGHT; } {COMMA} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_VAR_DEFAULT); return T_COMMA; } {S_T_PARENT_RIGHT} { // Pop 2. g_queue_pop_head ( queue ); BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_PARENT_RIGHT; } {S_T_PARENT_LEFT} { return T_PARENT_LEFT; } {S_T_PARENT_RIGHT} { return T_PARENT_RIGHT; } {COMMA} { return T_COMMA; } {LIST_OPEN} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(PROPERTIES_LIST); return T_LIST_OPEN; } {LIST_CLOSE} { BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_LIST_CLOSE; } {FORWARD_SLASH} { return T_FORWARD_SLASH; } /* Position */ {CENTER} { return T_POS_CENTER; } {EAST} { return T_POS_EAST; } {WEST} { return T_POS_WEST; } {SOUTH} { return T_POS_SOUTH; } {NORTH} { return T_POS_NORTH; } /* Highlight style */ {NONE} { return T_NONE; } {BOLD} { return T_BOLD; } {ITALIC} { return T_ITALIC; } {UNDERLINE} { return T_UNDERLINE; } {STRIKETHROUGH} { return T_STRIKETHROUGH; } {SMALLCAPS} { return T_SMALLCAPS; } {ANGLE_DEG} { return T_ANGLE_DEG; } {ANGLE_RAD} { return T_ANGLE_RAD; } {ANGLE_GRAD} { return T_ANGLE_GRAD; } {ANGLE_TURN} { return T_ANGLE_TURN; } {ORIENTATION_HORI} { return ORIENTATION_HORI; } {ORIENTATION_VERT} { return ORIENTATION_VERT; } {CURSOR_DEF} { return CURSOR_DEF; } {CURSOR_PTR} { return CURSOR_PTR; } {CURSOR_TXT} { return CURSOR_TXT; } {COLOR_TRANSPARENT} { return T_COLOR_TRANSPARENT; } {COLOR_NAME} { for ( unsigned int iter = 0; iter < num_CSSColors; iter++) { if ( strcasecmp(yytext, CSSColors[iter].name )== 0 ) { yylval->colorval.alpha = 1.0; yylval->colorval.red = CSSColors[iter].r/255.0; yylval->colorval.green = CSSColors[iter].g/255.0; yylval->colorval.blue = CSSColors[iter].b/255.0; return T_COLOR_NAME; } } REJECT; } <> { ParseObject *po = g_queue_pop_head ( file_queue ); if ( po ) { if ( po->type == PT_FILE ) { fclose ( po->filein ); } if ( po->type == PT_STRING_ALLOC ) { g_free( po->malloc_str); } g_free ( po->filename ); g_free ( po ); } po = g_queue_peek_head ( file_queue ); if ( po == NULL ) { g_queue_free ( queue ); // Reset pointer to NULL queue = NULL; yyterminate(); } else { yypop_buffer_state(); current = po; *yylloc = current->location; BEGIN(GPOINTER_TO_INT ( g_queue_pop_head ( queue ))); } } <*>\n { yylloc->last_column = 1; yylloc->last_line ++; }; <*>(\r\n) { yylloc->last_column = 1; yylloc->last_line ++; }; {MEDIA} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(MEDIA); return T_MEDIA; } {S_T_PARENT_LEFT} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(MEDIA_CONTENT); return T_PARENT_LEFT; } {MEDIA_NAME} { yylval->sval = g_strdup(yytext); return T_STRING; } ":" { return T_PSEP; } {S_T_PARENT_RIGHT} { int id = GPOINTER_TO_INT(g_queue_pop_head ( queue )); BEGIN(id); return T_PARENT_RIGHT; } "\{" { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(INITIAL); return T_BOPEN; } "\}" { g_queue_pop_head ( queue ); BEGIN(GPOINTER_TO_INT(g_queue_pop_head ( queue ))); return T_BCLOSE; } {WHITESPACE}+ ; // ignore all whitespace . { yytext[yyleng-1] = '\0'; fprintf(stderr,"found: |%s|\n", yytext); return T_ERROR; } /** * If we just encounter a word, we assume it is a Widget name. * This makes include,theme, configuration a reserved keyword. */ {WORD} { g_queue_push_head ( queue, GINT_TO_POINTER (YY_START) ); BEGIN(NAMESTR); yylval->sval = g_strdup(yytext); return T_NAME_ELEMENT; } . { yytext[yyleng-1] = '\0'; fprintf(stderr,"initial found: |%s|\n", yytext); return T_ERROR; }
. { yytext[yyleng-1] = '\0'; fprintf(stderr,"section found: |%s|\n", yytext); return T_ERROR_SECTION; } {WORD} { yylval->sval = g_strdup(yytext); return T_ELEMENT; } {STRING_LIST} { yytext[yyleng-1] = '\0'; yylval->sval = g_strdup(yytext+1); return T_ELEMENT; } . { yytext[yyleng-1] = '\0'; return T_ERROR_PROPERTY; } . { yytext[yyleng-1] = '\0'; return T_ERROR_NAMESTRING; } %% gboolean rofi_theme_parse_file ( const char *file ) { char *file2 = helper_get_theme_path ( file, ".rasi" ); char *filename = rofi_theme_parse_prepare_file ( file2, NULL ); g_free ( file2 ); yyin = fopen ( filename, "rb" ); if ( yyin == NULL ) { char *str = g_markup_printf_escaped ( "Failed to open theme: %s\nError: %s", filename, strerror ( errno ) ); rofi_add_error_message ( g_string_new ( str ) ); g_free ( str ); g_free ( filename ); return TRUE; } /** Add Parse object */ file_queue = g_queue_new (); ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_FILE; po->filename = filename; po->filein = yyin; current = po; g_queue_push_head ( file_queue, po ); g_debug ( "Parsing top file: '%s'", filename ); int parser_retv = yyparse ( file ); yylex_destroy (); yyin = NULL; while ( (po = g_queue_pop_head ( file_queue ) )) { if ( po ) { if ( po->type == PT_FILE ) { fclose ( po->filein ); } if ( po->type == PT_STRING_ALLOC ) { g_free( po->malloc_str); } g_free ( po->filename ); g_free ( po ); } } // Free up. g_queue_free ( file_queue ); file_queue = NULL; if ( parser_retv != 0 ) { return TRUE; } return FALSE; } gboolean rofi_theme_parse_string ( const char *string ) { yyin = NULL; /** Add Parse object */ file_queue = g_queue_new (); ParseObject *po = g_malloc0(sizeof(ParseObject)); po->type = PT_STRING; po->input_str = string; po->str_len = strlen(string); current = po; g_queue_push_head ( file_queue, po ); g_debug ( "Parsing string: '%s'", string ); int parser_retv = yyparse ( string ); yylex_destroy (); while ( (po = g_queue_pop_head ( file_queue ) )) { if ( po ) { if ( po->type == PT_FILE ) { fclose ( po->filein ); } if ( po->type == PT_STRING_ALLOC ) { g_free( po->malloc_str); } g_free ( po->filename ); g_free ( po ); } } // Free up. g_queue_free ( file_queue ); file_queue = NULL; if ( parser_retv != 0 ) { return TRUE; } return FALSE; } rofi-1.7.1/lexer/theme-parser.h0000644000175100001710000001501114150243207013255 00000000000000/* A Bison parser, made by GNU Bison 3.5.1. */ /* Skeleton interface for Bison GLR parsers in C Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. 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 3 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, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_YY_LEXER_THEME_PARSER_H_INCLUDED # define YY_YY_LEXER_THEME_PARSER_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* "%code requires" blocks. */ #line 34 "../lexer/theme-parser.y" #include "theme.h" #include "xrmoptions.h" #include "css-colors.h" #include "rofi.h" typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; char *filename; } YYLTYPE; # define YYLTYPE_IS_DECLARED 1 /* alert the parser that we have our own definition */ # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ (Current).filename = YYRHSLOC (Rhs, 1).filename; \ } \ else \ { /* empty RHS */ \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ (Current).filename = NULL; /* new */ \ } \ while (0) #line 80 "lexer/theme-parser.h" /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { T_END = 0, T_ERROR = 1, T_ERROR_PROPERTY = 2, T_ERROR_SECTION = 3, T_ERROR_NAMESTRING = 4, T_ERROR_DEFAULTS = 5, T_ERROR_INCLUDE = 6, T_ERROR_ARGB_SPEC = 7, T_INT = 258, T_DOUBLE = 259, T_STRING = 260, T_CHAR = 261, T_PROP_NAME = 262, T_COLOR_NAME = 263, T_NAME_ELEMENT = 264, T_BOOLEAN = 265, T_COLOR = 266, T_LINK = 267, T_ELEMENT = 268, T_POS_CENTER = 269, T_POS_EAST = 270, T_POS_WEST = 271, T_POS_NORTH = 272, T_POS_SOUTH = 273, T_MEDIA = 274, T_NONE = 275, T_BOLD = 276, T_ITALIC = 277, T_UNDERLINE = 278, T_STRIKETHROUGH = 279, T_SMALLCAPS = 280, T_DASH = 281, T_SOLID = 282, T_UNIT_PX = 283, T_UNIT_MM = 284, T_UNIT_EM = 285, T_UNIT_CH = 286, T_UNIT_PERCENT = 287, T_ANGLE_DEG = 288, T_ANGLE_GRAD = 289, T_ANGLE_RAD = 290, T_ANGLE_TURN = 291, ORIENTATION_HORI = 292, ORIENTATION_VERT = 293, CURSOR_DEF = 294, CURSOR_PTR = 295, CURSOR_TXT = 296, T_COL_RGBA = 297, T_COL_HSL = 298, T_COL_HWB = 299, T_COL_CMYK = 300, T_URL = 301, T_WIDTH = 302, T_HEIGHT = 303, T_BOTH = 304, T_TO = 305, T_LEFT = 306, T_RIGHT = 307, T_TOP = 308, T_BOTTOM = 309, T_LINEAR_GRADIENT = 310, T_PARENT_LEFT = 311, T_PARENT_RIGHT = 312, T_COMMA = 313, T_OPTIONAL_COMMA = 314, T_FORWARD_SLASH = 315, T_PERCENT = 316, T_LIST_OPEN = 317, T_LIST_CLOSE = 318, T_MODIFIER_ADD = 319, T_MODIFIER_SUBTRACT = 320, T_MODIFIER_MULTIPLY = 321, T_MODIFIER_MAX = 322, T_MODIFIER_MIN = 323, T_CALC = 324, T_BOPEN = 325, T_BCLOSE = 326, T_PSEP = 327, T_PCLOSE = 328, T_NSEP = 329, T_SSEP = 330, T_NAME_PREFIX = 331, T_WHITESPACE = 332, T_PDEFAULTS = 333, T_CONFIGURATION = 334, T_RESET_THEME = 335, T_COLOR_TRANSPARENT = 336, T_INHERIT = 337, T_MEDIA_WIDTH = 338, T_MEDIA_HEIGHT = 339, T_MEDIA_MIN = 340, T_MEDIA_MONITOR_ID = 341, T_MEDIA_MAX = 342, T_MEDIA_SEP = 343, T_VAR_START = 344, T_ENV_START = 345 }; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 139 "../lexer/theme-parser.y" int ival; double fval; char *sval; char cval; int bval; WindowLocation wloc; ThemeColor colorval; ThemeWidget *theme; GList *list; Property *property; GHashTable *property_list; RofiDistance distance; RofiDistanceUnit *distance_unit; #line 206 "lexer/theme-parser.h" }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif /* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE YYLTYPE; struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; }; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif int yyparse (const char *what); #endif /* !YY_YY_LEXER_THEME_PARSER_H_INCLUDED */ rofi-1.7.1/lexer/theme-parser.c0000644000175100001710000053053314150243207013263 00000000000000/* A Bison parser, made by GNU Bison 3.5.1. */ /* Skeleton implementation for Bison GLR parsers in C Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. 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 3 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, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C GLR parser skeleton written by Paul Hilfinger. */ /* Undocumented macros, especially those whose name start with YY_, are private implementation details. Do not rely on them. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "3.5.1" /* Skeleton name. */ #define YYSKELETON_NAME "glr.c" /* Pure parsers. */ #define YYPURE 1 /* First part of user prologue. */ #line 69 "../lexer/theme-parser.y" #include "config.h" #include #include #include #include "theme-parser.h" ThemeWidget *rofi_theme = NULL; void yyerror(YYLTYPE *yylloc, const char *what, const char* s); int yylex (YYSTYPE *, YYLTYPE *); static int check_in_range ( double index, double low, double high, YYLTYPE *loc ) { if ( index > high || index < low ) { gchar *str = g_strdup_printf("Value out of range: \n\t\tValue: X = %.2lf;\n\t\tRange: %.2lf <= X <= %.2lf.", index, low, high ); yyerror ( loc, loc->filename, str); g_free(str); return FALSE; } return TRUE; } static double hue2rgb ( double p, double q, double t ) { t += (t<0)?1.0:0.0; t -= (t>1)?1.0:0.0; if ( t < (1/6.0) ) { return p + (q - p) * 6 * t; } if ( t < (1/2.0) ) { return q; } if ( t < (2/3.0) ) { return p + (q - p) * (2/3.0 - t) * 6; } return p; } static ThemeColor hsl_to_rgb ( double h, double s, double l ) { ThemeColor colour; colour.alpha = 1.0; if (s < 0.001 && s > -0.001) { colour.red = colour.green = colour.blue = l; // achromatic } else { double q = l < 0.5 ? l * (1 + s) : l + s - l * s; double p = 2 * l - q; colour.red = hue2rgb(p, q, h + 1/3.0); colour.green = hue2rgb(p, q, h); colour.blue = hue2rgb(p, q, h - 1/3.0); } return colour; } static ThemeColor hwb_to_rgb ( double h, double w, double b ) { ThemeColor retv = hsl_to_rgb ( h, 1.0, 0.5); retv.red *= ( 1. - w - b ); retv.red += w; retv.green *= ( 1. - w - b ); retv.green += w; retv.blue *= ( 1. - w - b ); retv.blue += w; return retv; } #line 127 "lexer/theme-parser.c" # ifndef YY_CAST # ifdef __cplusplus # define YY_CAST(Type, Val) static_cast (Val) # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) # else # define YY_CAST(Type, Val) ((Type) (Val)) # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) # endif # endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # else # define YY_NULLPTR ((void*)0) # endif # endif #include "lexer/theme-parser.h" /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 1 #endif /* Default (constant) value used for initialization for null right-hand sides. Unlike the standard yacc.c template, here we set the default value of $$ to a zeroed-out value. Since the default value is undefined, this behavior is technically correct. */ static YYSTYPE yyval_default; static YYLTYPE yyloc_default # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL = { 1, 1, 1, 1 } # endif ; #include #include #include #include #include /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure and (if available) are included so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ # include /* INFRINGES ON USER NAME SPACE */ # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YY_STDINT_H # endif #endif /* Narrow types that promote to a signed type and that can represent a signed or unsigned integer of at least N bits. In tables they can save space and decrease cache pressure. Promoting to a signed type helps avoid bugs in integer arithmetic. */ #ifdef __INT_LEAST8_MAX__ typedef __INT_LEAST8_TYPE__ yytype_int8; #elif defined YY_STDINT_H typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef __INT_LEAST16_MAX__ typedef __INT_LEAST16_TYPE__ yytype_int16; #elif defined YY_STDINT_H typedef int_least16_t yytype_int16; #else typedef short yytype_int16; #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; #else typedef short yytype_uint8; #endif #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; #else typedef int yytype_uint16; #endif #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YYFREE # define YYFREE free #endif #ifndef YYMALLOC # define YYMALLOC malloc #endif #ifndef YYREALLOC # define YYREALLOC realloc #endif #define YYSIZEMAX \ (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : YY_CAST (ptrdiff_t, SIZE_MAX)) #ifdef __cplusplus typedef bool yybool; # define yytrue true # define yyfalse false #else /* When we move to stdbool, get rid of the various casts to yybool. */ typedef signed char yybool; # define yytrue 1 # define yyfalse 0 #endif #ifndef YYSETJMP # include # define YYJMP_BUF jmp_buf # define YYSETJMP(Env) setjmp (Env) /* Pacify Clang and ICC. */ # define YYLONGJMP(Env, Val) \ do { \ longjmp (Env, Val); \ YY_ASSERT (0); \ } while (yyfalse) #endif #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define YY_ATTRIBUTE_PURE # endif #endif #ifndef YY_ATTRIBUTE_UNUSED # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else # define YY_ATTRIBUTE_UNUSED # endif #endif /* The _Noreturn keyword of C11. */ #ifndef _Noreturn # if (defined __cplusplus \ && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ || (defined _MSC_VER && 1900 <= _MSC_VER))) # define _Noreturn [[noreturn]] # elif ((!defined __cplusplus || defined __clang__) \ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))) /* _Noreturn works as-is. */ # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ # define YY_IGNORE_USELESS_CAST_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") # define YY_IGNORE_USELESS_CAST_END \ _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_END #endif #define YY_ASSERT(E) ((void) (0 && (E))) /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 415 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 98 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 42 /* YYNRULES -- Number of rules. */ #define YYNRULES 148 /* YYNSTATES -- Number of states. */ #define YYNSTATES 293 /* YYMAXRHS -- Maximum number of symbols on right-hand side of rule. */ #define YYMAXRHS 12 /* YYMAXLEFT -- Maximum number of symbols to the left of a handle accessed by $0, $-1, etc., in any rule. */ #define YYMAXLEFT 0 /* YYMAXUTOK -- Last valid token number (for yychar). */ #define YYMAXUTOK 345 /* YYUNDEFTOK -- Symbol number (for yytoken) that denotes an unknown token. */ #define YYUNDEFTOK 2 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ static const yytype_int8 yytranslate[] = { 0, 3, 4, 5, 6, 7, 8, 9, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 }; #if YYDEBUG /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 316, 316, 332, 338, 345, 346, 350, 353, 362, 365, 381, 388, 402, 416, 433, 434, 438, 440, 444, 461, 478, 479, 483, 487, 494, 498, 503, 509, 513, 519, 522, 526, 530, 534, 538, 542, 546, 550, 554, 558, 562, 566, 571, 575, 579, 583, 587, 591, 596, 602, 608, 614, 625, 626, 627, 628, 631, 632, 633, 634, 638, 641, 650, 651, 655, 656, 667, 668, 669, 670, 671, 674, 675, 678, 679, 687, 688, 692, 693, 694, 695, 696, 697, 702, 710, 715, 723, 731, 739, 753, 759, 765, 771, 778, 784, 790, 795, 801, 807, 814, 823, 831, 842, 843, 844, 845, 846, 853, 854, 855, 863, 873, 883, 893, 903, 909, 915, 923, 931, 937, 943, 946, 950, 956, 957, 960, 961, 964, 965, 966, 967, 968, 972, 973, 977, 978, 982, 983, 987, 988, 989, 994, 998, 999, 1002, 1008, 1009, 1010 }; #endif #if YYDEBUG || YYERROR_VERBOSE || 1 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "\"end of file\"", "error", "$undefined", "\"error from file parser\"", "\"invalid property value\"", "\"invalid property name\"", "\"invalid element name\"", "\"invalid defaults name\"", "\"invalid import value\"", "\"invalid argb color. Requires 8 (not 7) elements: argb:AARRGGBB.\"", "\"Integer number\"", "\"Floating-point number\"", "\"UTF-8 encoded string\"", "\"Character\"", "\"property name\"", "\"Color value by name\"", "\"Element name\"", "\"Boolean value (true or false)\"", "\"Hexidecimal color value\"", "\"Reference\"", "\"Name of element\"", "\"Center\"", "\"East\"", "\"West\"", "\"North\"", "\"South\"", "\"@media\"", "\"None\"", "\"Bold\"", "\"Italic\"", "\"Underline\"", "\"Strikethrough\"", "\"Small CAPS\"", "\"Dash\"", "\"Solid\"", "\"pixels\"", "\"mm\"", "\"em\"", "\"ch\"", "\"%\"", "\"Degrees\"", "\"Gradians\"", "\"Radians\"", "\"Turns\"", "\"Horizontal\"", "\"Vertical\"", "\"Default\"", "\"Pointer\"", "\"Text\"", "\"rgb[a] colorscheme\"", "\"hsl colorscheme\"", "\"hwb colorscheme\"", "\"cmyk colorscheme\"", "\"an URL\"", "\"an WIDTH\"", "\"an HEIGHT\"", "\"an BOTH\"", "\"an TO\"", "\"an LEFT\"", "\"an RIGHT\"", "\"an TOP\"", "\"an BOTTOM\"", "\"a linear gradient\"", "\"Parent left ('(')\"", "\"Parent right (')')\"", "\"comma separator (',')\"", "\"Optional comma separator (',')\"", "\"forward slash ('/')\"", "\"Percent sign ('%')\"", "\"List open ('[')\"", "\"List close (']')\"", "\"Add ('+')\"", "\"Subtract ('-')\"", "\"Multiply ('*')\"", "\"Max ('max')\"", "\"Min ('min')\"", "\"calc\"", "\"bracket open ('{')\"", "\"bracket close ('}')\"", "\"property separator (':')\"", "\"property close (';')\"", "\"Name separator (' ' or '.')\"", "\"Selector separator (',')\"", "\"Element section ('# {name} { ... }')\"", "\"White space\"", "\"Default settings section ( '* { ... }')\"", "\"Configuration block\"", "\"Reset Theme\"", "\"Transparent\"", "\"Inherit\"", "\"Width\"", "\"Height\"", "\"Min\"", "\"Monitor-ID\"", "\"Max\"", "\"-\"", "\"var\"", "\"env\"", "$accept", "t_main", "t_configuration_list", "t_name_prefix_optional", "t_entry_list_included", "t_entry_list", "t_config_property_list_optional", "t_config_property_list", "t_config_property", "t_property_list_optional", "t_property_list", "t_property", "t_property_element", "t_property_direction", "t_property_scale_type", "t_color_list", "t_property_element_list_optional", "t_property_element_list", "t_property_position", "t_property_position_ew", "t_property_position_sn", "t_property_highlight_styles", "t_property_highlight_style", "t_property_distance_zero", "t_property_distance_unit", "t_property_distance_unit_math", "t_property_distance_unit_math2", "t_property_distance_unit_math3", "t_property_distance", "t_property_unit", "t_property_line_style", "t_property_color", "t_property_color_opt_alpha_c", "t_property_color_opt_alpha_ws", "t_property_color_value_angle", "t_property_color_value_unit", "t_property_color_value", "t_property_orientation", "t_property_cursor", "t_property_name", "t_entry_name_path_selectors", "t_entry_name_path", YY_NULLPTR }; #endif #define YYPACT_NINF (-171) #define YYTABLE_NINF (-109) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { -171, 37, 18, -171, 41, 35, -1, 129, -171, 88, -171, 114, 149, -171, 147, 129, -171, -171, -53, -1, 241, 129, -171, 144, 179, -171, -171, 129, 158, 183, 188, 129, -171, 193, 129, 149, 273, 226, 11, 163, -171, -171, 238, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, -171, 243, 244, 247, 249, 250, 251, 289, 253, -171, -171, 254, 255, 239, -171, 101, 112, 65, -171, 44, 51, -171, -171, -171, 212, -171, -171, 242, 179, -171, -171, -171, -171, -171, -171, -171, -171, -171, 196, -171, 196, 222, -171, 233, 222, 222, 222, 309, 1, -171, 256, 258, 134, 304, 246, -171, -171, -171, -171, -171, 125, 163, 44, -171, 42, 261, -171, -171, -171, -171, -171, -171, 259, 10, 260, 89, 195, 91, 113, 187, 181, 215, -171, 264, -171, 310, 177, 163, 134, -171, 151, 210, -46, 219, 326, 266, 44, 268, 263, 265, -171, 323, 336, 119, 222, 222, -171, -171, -171, -171, 222, 222, 222, 222, -171, 92, -171, -171, -171, -171, 287, -171, 21, 21, -171, -171, -171, 57, 134, 134, 134, 134, 134, 196, 134, 134, 279, 326, 296, 326, -171, 284, -171, -171, 238, 297, 222, 295, 299, 238, 300, 238, 301, 222, -171, -171, -171, -171, 303, 21, -171, 221, -171, -171, -171, -171, 151, 151, -171, 210, 210, -171, 305, 288, 316, -171, -9, 55, 317, 372, 315, 222, 222, 320, 222, 321, 222, 238, -171, 223, -171, 306, -171, 307, 72, -171, -171, -171, 324, 325, 328, 324, -171, 324, -171, 327, 329, -171, -171, -171, -171, 222, 330, 222, 238, 333, 334, 222, -171, -171, -171, 331, 337, -171, -171, 324, 324, -171, 339, 340, -171, -171 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 3, 0, 9, 1, 0, 2, 7, 15, 9, 0, 5, 0, 0, 142, 0, 16, 17, 19, 0, 8, 0, 21, 146, 0, 143, 4, 18, 21, 0, 0, 0, 22, 23, 0, 21, 145, 148, 0, 31, 32, 33, 34, 126, 36, 121, 35, 67, 72, 73, 74, 75, 78, 79, 82, 80, 81, 83, 137, 138, 139, 140, 141, 0, 0, 0, 0, 0, 0, 63, 0, 122, 30, 0, 0, 0, 41, 68, 69, 43, 76, 0, 37, 44, 46, 47, 0, 11, 24, 0, 144, 147, 20, 110, 109, 103, 104, 105, 106, 107, 108, 84, 108, 0, 123, 0, 0, 0, 0, 0, 0, 65, 0, 64, 0, 0, 0, 25, 70, 71, 77, 42, 108, 0, 38, 85, 0, 0, 10, 100, 101, 136, 135, 127, 134, 136, 0, 0, 128, 0, 0, 0, 0, 0, 61, 0, 45, 0, 87, 0, 0, 93, 96, 99, 0, 0, 0, 0, 39, 0, 0, 0, 133, 0, 0, 0, 0, 0, 129, 131, 130, 132, 0, 0, 0, 0, 48, 0, 54, 53, 55, 56, 0, 50, 0, 0, 66, 86, 88, 0, 0, 0, 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 40, 0, 9, 9, 126, 0, 0, 0, 0, 126, 0, 126, 0, 0, 60, 58, 59, 57, 0, 0, 62, 0, 89, 91, 92, 90, 94, 95, 102, 98, 97, 26, 0, 0, 0, 9, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 49, 0, 52, 0, 28, 0, 6, 12, 13, 112, 124, 0, 0, 124, 119, 124, 116, 0, 0, 51, 27, 29, 14, 0, 0, 0, 126, 0, 0, 0, 118, 125, 111, 0, 0, 120, 115, 124, 124, 114, 0, 0, 117, 113 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -171, -171, -171, -171, -171, -8, -171, -171, 376, 7, -171, 121, -112, -171, -171, -157, -171, -171, -171, 332, 335, -171, 322, -67, 59, 108, 107, 257, -66, -37, -91, -71, -70, -170, 58, -106, -100, -171, -171, 16, -171, 370 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 1, 2, 12, 5, 6, 14, 15, 16, 30, 31, 32, 74, 181, 219, 142, 111, 112, 75, 76, 77, 78, 79, 80, 150, 151, 152, 153, 81, 99, 100, 82, 273, 103, 136, 132, 133, 83, 84, 33, 23, 24 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 19, 139, 101, 156, 135, 137, 137, 120, 128, 137, 129, 130, 131, 123, 124, -6, 42, 9, 194, 44, 162, -108, -108, 18, 27, 9, 28, 222, 195, 196, 166, 18, 172, 174, 37, 239, 42, 3, 143, 44, 244, 88, 246, 199, 92, 93, 94, 95, 96, 97, 62, 63, 64, 65, 121, 122, 157, 124, 141, 209, 210, -85, -85, 250, 208, 211, 212, 213, 214, 256, 62, 63, 64, 65, 10, 163, 11, 158, 267, 98, 42, 9, 10, 44, 11, 101, 233, -108, 235, 70, 201, 124, 51, 52, 53, 54, 55, 56, 9, 130, 131, 130, 131, 229, 4, 283, 159, 241, 248, 70, 186, 187, 221, 143, 62, 63, 64, 65, 7, 215, 69, 223, 8, 130, 131, 49, 50, -85, 17, 130, 131, 195, 196, 257, 47, 48, 17, 262, 10, 264, 11, 266, 261, 13, 147, 148, 216, 217, 218, 143, 271, 20, 87, 70, 165, 10, 171, 11, 92, 93, 94, 95, 96, 97, 138, 22, 280, 144, 38, 39, 40, 41, 286, 42, 282, 43, 44, 45, 173, 46, 47, 48, 49, 50, 207, 51, 52, 53, 54, 55, 56, 21, 276, 98, 277, 237, 238, 149, 94, 95, 96, 97, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 94, 95, 96, 97, 289, 290, 189, 190, 67, 34, 125, 126, 191, 25, 35, 68, 255, 92, 93, 98, 130, 131, 69, 167, 168, 169, 170, 177, 178, 179, 180, 134, 131, 98, 70, 71, 224, 225, 226, 175, 176, 29, 72, 73, 38, 39, 40, 41, 36, 42, 85, 43, 44, 45, 86, 46, 47, 48, 49, 50, 28, 51, 52, 53, 54, 55, 56, 182, 183, 192, 193, 197, 198, 251, 183, 268, 183, 90, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 227, 228, 230, 231, 91, 102, 104, 105, 67, 110, 106, 155, 107, 108, 109, 68, 113, 114, 115, 116, 127, 140, 69, 146, 154, 160, 145, 161, 164, 184, 185, 200, 202, 205, 70, 71, 38, 39, 40, 41, 203, 42, 204, 43, 44, 45, 206, 46, 47, 48, 49, 50, 220, 51, 52, 53, 54, 55, 56, 232, 234, 236, 240, 242, 243, 245, 247, 249, 253, 252, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 254, 258, 259, 260, 263, 265, 269, 270, 67, 272, 274, 26, 278, 279, 281, 68, 275, 284, 285, 287, 119, 288, 69, 291, 292, 89, 188, 0, 0, 118, 0, 117, 0, 0, 70, 71 }; static const yytype_int16 yycheck[] = { 8, 107, 39, 115, 104, 105, 106, 78, 99, 109, 101, 10, 11, 80, 80, 16, 15, 26, 64, 18, 10, 10, 11, 7, 77, 26, 79, 184, 74, 75, 136, 15, 138, 139, 27, 205, 15, 0, 109, 18, 210, 34, 212, 155, 33, 34, 35, 36, 37, 38, 49, 50, 51, 52, 10, 11, 123, 123, 57, 165, 166, 10, 11, 220, 164, 171, 172, 173, 174, 78, 49, 50, 51, 52, 83, 65, 85, 35, 248, 68, 15, 26, 83, 18, 85, 122, 198, 76, 200, 88, 157, 157, 27, 28, 29, 30, 31, 32, 26, 10, 11, 10, 11, 194, 86, 275, 64, 207, 214, 88, 147, 148, 183, 184, 49, 50, 51, 52, 77, 27, 76, 64, 87, 10, 11, 24, 25, 76, 7, 10, 11, 74, 75, 78, 22, 23, 15, 243, 83, 245, 85, 247, 242, 14, 10, 11, 54, 55, 56, 220, 78, 63, 31, 88, 65, 83, 65, 85, 33, 34, 35, 36, 37, 38, 106, 16, 272, 109, 10, 11, 12, 13, 278, 15, 274, 17, 18, 19, 65, 21, 22, 23, 24, 25, 65, 27, 28, 29, 30, 31, 32, 77, 262, 68, 264, 203, 204, 63, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 35, 36, 37, 38, 286, 287, 67, 68, 62, 77, 10, 11, 73, 78, 82, 69, 236, 33, 34, 68, 10, 11, 76, 40, 41, 42, 43, 58, 59, 60, 61, 10, 11, 68, 88, 89, 189, 190, 191, 64, 65, 12, 96, 97, 10, 11, 12, 13, 81, 15, 79, 17, 18, 19, 78, 21, 22, 23, 24, 25, 79, 27, 28, 29, 30, 31, 32, 64, 65, 71, 72, 64, 65, 64, 65, 64, 65, 16, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 192, 193, 195, 196, 78, 67, 63, 63, 62, 20, 63, 65, 63, 63, 63, 69, 63, 63, 63, 80, 78, 12, 76, 65, 20, 64, 70, 68, 68, 65, 20, 65, 64, 10, 88, 89, 10, 11, 12, 13, 77, 15, 77, 17, 18, 19, 10, 21, 22, 23, 24, 25, 65, 27, 28, 29, 30, 31, 32, 80, 64, 77, 65, 68, 65, 65, 65, 64, 80, 64, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 64, 64, 10, 68, 64, 64, 80, 80, 62, 65, 65, 15, 65, 64, 64, 69, 68, 64, 64, 68, 78, 64, 76, 64, 64, 35, 149, -1, -1, 77, -1, 76, -1, -1, 88, 89 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 99, 100, 0, 86, 102, 103, 77, 87, 26, 83, 85, 101, 14, 104, 105, 106, 109, 137, 103, 63, 77, 16, 138, 139, 78, 106, 77, 79, 12, 107, 108, 109, 137, 77, 82, 81, 107, 10, 11, 12, 13, 15, 17, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 62, 69, 76, 88, 89, 96, 97, 110, 116, 117, 118, 119, 120, 121, 126, 129, 135, 136, 79, 78, 109, 107, 139, 16, 78, 33, 34, 35, 36, 37, 38, 68, 127, 128, 127, 67, 131, 63, 63, 63, 63, 63, 63, 20, 114, 115, 63, 63, 63, 80, 118, 117, 120, 129, 10, 11, 121, 126, 10, 11, 78, 128, 128, 10, 11, 133, 134, 10, 134, 132, 134, 132, 133, 12, 57, 113, 129, 132, 70, 65, 10, 11, 63, 122, 123, 124, 125, 20, 65, 110, 121, 35, 64, 64, 68, 10, 65, 68, 65, 133, 40, 41, 42, 43, 65, 133, 65, 133, 64, 65, 58, 59, 60, 61, 111, 64, 65, 65, 20, 127, 127, 125, 67, 68, 73, 71, 72, 64, 74, 75, 64, 65, 110, 65, 121, 64, 77, 77, 10, 10, 65, 134, 133, 133, 133, 133, 133, 133, 27, 54, 55, 56, 112, 65, 129, 113, 64, 122, 122, 122, 123, 123, 128, 124, 124, 80, 110, 64, 110, 77, 103, 103, 131, 65, 134, 68, 65, 131, 65, 131, 65, 133, 64, 113, 64, 64, 80, 64, 103, 78, 78, 64, 10, 68, 134, 133, 64, 133, 64, 133, 131, 64, 80, 80, 78, 65, 130, 65, 68, 130, 130, 65, 64, 133, 64, 134, 131, 64, 64, 133, 68, 64, 130, 130, 64, 64 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 98, 99, 100, 100, 101, 101, 102, 102, 103, 103, 103, 103, 103, 103, 104, 104, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 109, 109, 109, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111, 111, 112, 112, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 116, 116, 116, 117, 117, 118, 118, 119, 119, 120, 120, 120, 120, 120, 120, 121, 121, 122, 122, 122, 122, 123, 123, 123, 123, 124, 124, 124, 125, 125, 125, 126, 126, 126, 127, 127, 127, 127, 127, 128, 128, 128, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 130, 130, 131, 131, 132, 132, 132, 132, 132, 133, 133, 134, 134, 135, 135, 136, 136, 136, 137, 138, 138, 138, 139, 139, 139 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_int8 yyr2[] = { 0, 2, 2, 0, 5, 1, 0, 1, 3, 0, 6, 5, 10, 10, 11, 0, 1, 1, 2, 1, 4, 0, 1, 1, 2, 4, 7, 9, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1, 2, 1, 1, 3, 1, 1, 4, 6, 4, 7, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 5, 1, 1, 1, 1, 1, 0, 1, 1, 9, 7, 12, 10, 9, 7, 11, 8, 7, 9, 1, 1, 2, 0, 2, 0, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, 2 }; /* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none). */ static const yytype_int8 yydprec[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM. */ static const yytype_int8 yymerger[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* YYIMMEDIATE[RULE-NUM] -- True iff rule #RULE-NUM is not to be deferred, as in the case of predicates. */ static const yybool yyimmediate[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of list of conflicting reductions corresponding to action entry for state STATE-NUM in yytable. 0 means no conflicts. The list in yyconfl is terminated by a rule number of 0. */ static const yytype_int8 yyconflp[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by 0, pointed into by YYCONFLP. */ static const short yyconfl[] = { 0, 87, 0 }; /* Error token number */ #define YYTERROR 1 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (0) #endif # define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc) #undef yynerrs #define yynerrs (yystackp->yyerrcnt) #undef yychar #define yychar (yystackp->yyrawchar) #undef yylval #define yylval (yystackp->yyval) #undef yylloc #define yylloc (yystackp->yyloc) static const int YYEOF = 0; static const int YYEMPTY = -2; typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG; #define YYCHK(YYE) \ do { \ YYRESULTTAG yychk_flag = YYE; \ if (yychk_flag != yyok) \ return yychk_flag; \ } while (0) #if YYDEBUG # ifndef YYFPRINTF # define YYFPRINTF fprintf # endif # define YY_FPRINTF \ YY_IGNORE_USELESS_CAST_BEGIN YY_FPRINTF_ # define YY_FPRINTF_(Args) \ do { \ YYFPRINTF Args; \ YY_IGNORE_USELESS_CAST_END \ } while (0) # define YY_DPRINTF \ YY_IGNORE_USELESS_CAST_BEGIN YY_DPRINTF_ # define YY_DPRINTF_(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ YY_IGNORE_USELESS_CAST_END \ } while (0) /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED static int yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { res += YYFPRINTF (yyo, "%d", yylocp->first_line); if (0 <= yylocp->first_column) res += YYFPRINTF (yyo, ".%d", yylocp->first_column); } if (0 <= yylocp->last_line) { if (yylocp->first_line < yylocp->last_line) { res += YYFPRINTF (yyo, "-%d", yylocp->last_line); if (0 <= end_col) res += YYFPRINTF (yyo, ".%d", end_col); } else if (0 <= end_col && yylocp->first_column < end_col) res += YYFPRINTF (yyo, "-%d", end_col); } return res; } # define YY_LOCATION_PRINT(File, Loc) \ yy_location_print_ (File, &(Loc)) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ static void yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char *what) { FILE *yyoutput = yyo; YYUSE (yyoutput); YYUSE (yylocationp); YYUSE (what); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ static void yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, const char *what) { YYFPRINTF (yyo, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyo, *yylocationp); YYFPRINTF (yyo, ": "); yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, what); YYFPRINTF (yyo, ")"); } # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YY_FPRINTF ((stderr, "%s ", Title)); \ yy_symbol_print (stderr, Type, Value, Location, what); \ YY_FPRINTF ((stderr, "\n")); \ } \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; struct yyGLRStack; static void yypstack (struct yyGLRStack* yystackp, ptrdiff_t yyk) YY_ATTRIBUTE_UNUSED; static void yypdumpstack (struct yyGLRStack* yystackp) YY_ATTRIBUTE_UNUSED; #else /* !YYDEBUG */ # define YY_DPRINTF(Args) do {} while (yyfalse) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if SIZE_MAX < YYMAXDEPTH * sizeof (GLRStackItem) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif /* Minimum number of free items on the stack allowed after an allocation. This is to allow allocation and initialization to be completed by functions that call yyexpandGLRStack before the stack is expanded, thus insuring that all necessary pointers get properly redirected to new data. */ #define YYHEADROOM 2 #ifndef YYSTACKEXPANDABLE # define YYSTACKEXPANDABLE 1 #endif #if YYSTACKEXPANDABLE # define YY_RESERVE_GLRSTACK(Yystack) \ do { \ if (Yystack->yyspaceLeft < YYHEADROOM) \ yyexpandGLRStack (Yystack); \ } while (0) #else # define YY_RESERVE_GLRSTACK(Yystack) \ do { \ if (Yystack->yyspaceLeft < YYHEADROOM) \ yyMemoryExhausted (Yystack); \ } while (0) #endif #if YYERROR_VERBOSE # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * yystpcpy (char *yydest, const char *yysrc) { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static ptrdiff_t yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { ptrdiff_t yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; else goto append; append: default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (yyres) return yystpcpy (yyres, yystr) - yyres; else return YY_CAST (ptrdiff_t, strlen (yystr)); } # endif #endif /* !YYERROR_VERBOSE */ /** State numbers. */ typedef int yyStateNum; /** Rule numbers. */ typedef int yyRuleNum; /** Grammar symbol. */ typedef int yySymbol; /** Item references. */ typedef short yyItemNum; typedef struct yyGLRState yyGLRState; typedef struct yyGLRStateSet yyGLRStateSet; typedef struct yySemanticOption yySemanticOption; typedef union yyGLRStackItem yyGLRStackItem; typedef struct yyGLRStack yyGLRStack; struct yyGLRState { /** Type tag: always true. */ yybool yyisState; /** Type tag for yysemantics. If true, yysval applies, otherwise * yyfirstVal applies. */ yybool yyresolved; /** Number of corresponding LALR(1) machine state. */ yyStateNum yylrState; /** Preceding state in this stack */ yyGLRState* yypred; /** Source position of the last token produced by my symbol */ ptrdiff_t yyposn; union { /** First in a chain of alternative reductions producing the * nonterminal corresponding to this state, threaded through * yynext. */ yySemanticOption* yyfirstVal; /** Semantic value for this state. */ YYSTYPE yysval; } yysemantics; /** Source location for this state. */ YYLTYPE yyloc; }; struct yyGLRStateSet { yyGLRState** yystates; /** During nondeterministic operation, yylookaheadNeeds tracks which * stacks have actually needed the current lookahead. During deterministic * operation, yylookaheadNeeds[0] is not maintained since it would merely * duplicate yychar != YYEMPTY. */ yybool* yylookaheadNeeds; ptrdiff_t yysize; ptrdiff_t yycapacity; }; struct yySemanticOption { /** Type tag: always false. */ yybool yyisState; /** Rule number for this reduction */ yyRuleNum yyrule; /** The last RHS state in the list of states to be reduced. */ yyGLRState* yystate; /** The lookahead for this reduction. */ int yyrawchar; YYSTYPE yyval; YYLTYPE yyloc; /** Next sibling in chain of options. To facilitate merging, * options are chained in decreasing order by address. */ yySemanticOption* yynext; }; /** Type of the items in the GLR stack. The yyisState field * indicates which item of the union is valid. */ union yyGLRStackItem { yyGLRState yystate; yySemanticOption yyoption; }; struct yyGLRStack { int yyerrState; /* To compute the location of the error token. */ yyGLRStackItem yyerror_range[3]; int yyerrcnt; int yyrawchar; YYSTYPE yyval; YYLTYPE yyloc; YYJMP_BUF yyexception_buffer; yyGLRStackItem* yyitems; yyGLRStackItem* yynextFree; ptrdiff_t yyspaceLeft; yyGLRState* yysplitPoint; yyGLRState* yylastDeleted; yyGLRStateSet yytops; }; #if YYSTACKEXPANDABLE static void yyexpandGLRStack (yyGLRStack* yystackp); #endif _Noreturn static void yyFail (yyGLRStack* yystackp, YYLTYPE *yylocp, const char *what, const char* yymsg) { if (yymsg != YY_NULLPTR) yyerror (yylocp, what, yymsg); YYLONGJMP (yystackp->yyexception_buffer, 1); } _Noreturn static void yyMemoryExhausted (yyGLRStack* yystackp) { YYLONGJMP (yystackp->yyexception_buffer, 2); } #if YYDEBUG || YYERROR_VERBOSE /** A printable representation of TOKEN. */ static inline const char* yytokenName (yySymbol yytoken) { return yytoken == YYEMPTY ? "" : yytname[yytoken]; } #endif /** Fill in YYVSP[YYLOW1 .. YYLOW0-1] from the chain of states starting * at YYVSP[YYLOW0].yystate.yypred. Leaves YYVSP[YYLOW1].yystate.yypred * containing the pointer to the next state in the chain. */ static void yyfillin (yyGLRStackItem *, int, int) YY_ATTRIBUTE_UNUSED; static void yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1) { int i; yyGLRState *s = yyvsp[yylow0].yystate.yypred; for (i = yylow0-1; i >= yylow1; i -= 1) { #if YYDEBUG yyvsp[i].yystate.yylrState = s->yylrState; #endif yyvsp[i].yystate.yyresolved = s->yyresolved; if (s->yyresolved) yyvsp[i].yystate.yysemantics.yysval = s->yysemantics.yysval; else /* The effect of using yysval or yyloc (in an immediate rule) is * undefined. */ yyvsp[i].yystate.yysemantics.yyfirstVal = YY_NULLPTR; yyvsp[i].yystate.yyloc = s->yyloc; s = yyvsp[i].yystate.yypred = s->yypred; } } /** If yychar is empty, fetch the next token. */ static inline yySymbol yygetToken (int *yycharp, yyGLRStack* yystackp, const char *what) { yySymbol yytoken; YYUSE (what); if (*yycharp == YYEMPTY) { YY_DPRINTF ((stderr, "Reading a token: ")); *yycharp = yylex (&yylval, &yylloc); } if (*yycharp <= YYEOF) { *yycharp = yytoken = YYEOF; YY_DPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (*yycharp); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } return yytoken; } /* Do nothing if YYNORMAL or if *YYLOW <= YYLOW1. Otherwise, fill in * YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1. * For convenience, always return YYLOW1. */ static inline int yyfill (yyGLRStackItem *, int *, int, yybool) YY_ATTRIBUTE_UNUSED; static inline int yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal) { if (!yynormal && yylow1 < *yylow) { yyfillin (yyvsp, *yylow, yylow1); *yylow = yylow1; } return yylow1; } /** Perform user action for rule number YYN, with RHS length YYRHSLEN, * and top stack item YYVSP. YYLVALP points to place to put semantic * value ($$), and yylocp points to place for location information * (@$). Returns yyok for normal return, yyaccept for YYACCEPT, * yyerr for YYERROR, yyabort for YYABORT. */ static YYRESULTTAG yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp, yyGLRStack* yystackp, YYSTYPE* yyvalp, YYLTYPE *yylocp, const char *what) { yybool yynormal YY_ATTRIBUTE_UNUSED = yystackp->yysplitPoint == YY_NULLPTR; int yylow; YYUSE (yyvalp); YYUSE (yylocp); YYUSE (what); YYUSE (yyrhslen); # undef yyerrok # define yyerrok (yystackp->yyerrState = 0) # undef YYACCEPT # define YYACCEPT return yyaccept # undef YYABORT # define YYABORT return yyabort # undef YYERROR # define YYERROR return yyerrok, yyerr # undef YYRECOVERING # define YYRECOVERING() (yystackp->yyerrState != 0) # undef yyclearin # define yyclearin (yychar = YYEMPTY) # undef YYFILL # define YYFILL(N) yyfill (yyvsp, &yylow, (N), yynormal) # undef YYBACKUP # define YYBACKUP(Token, Value) \ return yyerror (yylocp, what, YY_("syntax error: cannot back up")), \ yyerrok, yyerr yylow = 1; if (yyrhslen == 0) *yyvalp = yyval_default; else *yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval; /* Default location. */ YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen); yystackp->yyerror_range[1].yystate.yyloc = *yylocp; switch (yyn) { case 2: #line 316 "../lexer/theme-parser.y" { // Dummy at this point. if ( rofi_theme == NULL ) { rofi_theme_reset(); } rofi_theme_widget_add_properties ( rofi_theme, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.theme)->properties ); for ( unsigned int i = 0; i < (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.theme)->num_widgets; i++ ) { ThemeWidget *d = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.theme)->widgets[i]; rofi_theme_parse_merge_widgets(rofi_theme, d); } rofi_theme_free ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.theme) ); } #line 1449 "lexer/theme-parser.c" break; case 3: #line 332 "../lexer/theme-parser.y" { if ( rofi_configuration == NULL ) { rofi_configuration = g_slice_new0 ( ThemeWidget ); rofi_configuration->name = g_strdup ( "Root" ); } } #line 1460 "lexer/theme-parser.c" break; case 4: #line 338 "../lexer/theme-parser.y" {} #line 1466 "lexer/theme-parser.c" break; case 5: #line 345 "../lexer/theme-parser.y" {} #line 1472 "lexer/theme-parser.c" break; case 6: #line 346 "../lexer/theme-parser.y" {} #line 1478 "lexer/theme-parser.c" break; case 7: #line 350 "../lexer/theme-parser.y" { ((*yyvalp).theme) =(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.theme); } #line 1486 "lexer/theme-parser.c" break; case 8: #line 353 "../lexer/theme-parser.y" { rofi_theme_reset(); rofi_theme_free((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.theme)); ((*yyvalp).theme) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.theme); } #line 1497 "lexer/theme-parser.c" break; case 9: #line 362 "../lexer/theme-parser.y" { ((*yyvalp).theme) = g_slice_new0 ( ThemeWidget ); } #line 1505 "lexer/theme-parser.c" break; case 10: #line 366 "../lexer/theme-parser.y" { for ( GList *liter = g_list_first ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.list)); liter; liter = g_list_next ( liter ) ) { ThemeWidget *widget = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.theme); for ( GList *iter = g_list_first ( (GList*)liter->data ); widget && iter ; iter = g_list_next ( iter ) ) { widget = rofi_theme_find_or_create_name ( widget, iter->data ); } g_list_free_full ( (GList*)liter->data, g_free ); widget->set = TRUE; rofi_theme_widget_add_properties ( widget, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list)); } if ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list) ) { g_hash_table_destroy ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list) ); } g_list_free ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.list) ); } #line 1525 "lexer/theme-parser.c" break; case 11: #line 381 "../lexer/theme-parser.y" { ThemeWidget *widget = rofi_theme_find_or_create_name ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.theme), "*" ); rofi_theme_widget_add_properties (widget, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list)); if ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list) ) { g_hash_table_destroy ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list) ); } } #line 1537 "lexer/theme-parser.c" break; case 12: #line 388 "../lexer/theme-parser.y" { gchar *name = g_strdup_printf("@media ( %s: %d )",(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.sval), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.ival)); ThemeWidget *widget = rofi_theme_find_or_create_name ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-9)].yystate.yysemantics.yysval.theme), name ); widget->set = TRUE; widget->media = g_slice_new0(ThemeMedia); widget->media->type = rofi_theme_parse_media_type ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.sval) ); widget->media->value = (double)(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.ival); for ( unsigned int i = 0; i < (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.theme)->num_widgets; i++ ) { ThemeWidget *d = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.theme)->widgets[i]; rofi_theme_parse_merge_widgets(widget, d); } g_free ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.sval) ); g_free ( name ); } #line 1556 "lexer/theme-parser.c" break; case 13: #line 402 "../lexer/theme-parser.y" { gchar *name = g_strdup_printf("@media ( %s: %f )",(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.sval), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.fval)); ThemeWidget *widget = rofi_theme_find_or_create_name ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-9)].yystate.yysemantics.yysval.theme), name ); widget->set = TRUE; widget->media = g_slice_new0(ThemeMedia); widget->media->type = rofi_theme_parse_media_type ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.sval) ); widget->media->value = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.fval); for ( unsigned int i = 0; i < (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.theme)->num_widgets; i++ ) { ThemeWidget *d = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.theme)->widgets[i]; rofi_theme_parse_merge_widgets(widget, d); } g_free ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.sval) ); g_free ( name ); } #line 1575 "lexer/theme-parser.c" break; case 14: #line 416 "../lexer/theme-parser.y" { gchar *name = g_strdup_printf("@media ( %s: %d px )",(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.sval), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.ival)); ThemeWidget *widget = rofi_theme_find_or_create_name ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-10)].yystate.yysemantics.yysval.theme), name ); widget->set = TRUE; widget->media = g_slice_new0(ThemeMedia); widget->media->type = rofi_theme_parse_media_type ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.sval) ); widget->media->value = (double)(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.ival); for ( unsigned int i = 0; i < (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.theme)->num_widgets; i++ ) { ThemeWidget *d = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.theme)->widgets[i]; rofi_theme_parse_merge_widgets(widget, d); } g_free ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.sval) ); g_free ( name ); } #line 1594 "lexer/theme-parser.c" break; case 15: #line 433 "../lexer/theme-parser.y" {} #line 1600 "lexer/theme-parser.c" break; case 17: #line 438 "../lexer/theme-parser.y" { } #line 1607 "lexer/theme-parser.c" break; case 18: #line 440 "../lexer/theme-parser.y" { } #line 1614 "lexer/theme-parser.c" break; case 19: #line 444 "../lexer/theme-parser.y" { char *error = NULL; if ( config_parse_set_property ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.property), &error ) ) { // TODO Generate error. #ifdef FATAL_CONFIG_ERROR yyerror ( &((*yylocp)), (*yylocp).filename, error ); #else g_warning("%s:%d:%d: %s\n", (*yylocp).filename, (*yylocp).first_line, (*yylocp).first_column, error); GString *str = g_string_new(""); g_string_append_printf(str,"%s:%d:%d: %s\n", (*yylocp).filename, (*yylocp).first_line, (*yylocp).first_column, error); rofi_add_error_message(str); #endif g_free(error); } // We don't keep any reference to this after this point, so the property can be free'ed. rofi_theme_property_free ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.property) ); } #line 1636 "lexer/theme-parser.c" break; case 20: #line 462 "../lexer/theme-parser.y" { ThemeWidget *widget = rofi_configuration; widget = rofi_theme_find_or_create_name ( widget, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.sval) ); widget->set = TRUE; rofi_theme_widget_add_properties ( widget, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list)); if ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list) ) { g_hash_table_destroy ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property_list) ); } g_free ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.sval) ); } #line 1651 "lexer/theme-parser.c" break; case 21: #line 478 "../lexer/theme-parser.y" { ((*yyvalp).property_list) = NULL; } #line 1657 "lexer/theme-parser.c" break; case 22: #line 479 "../lexer/theme-parser.y" { ((*yyvalp).property_list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.property_list); } #line 1663 "lexer/theme-parser.c" break; case 23: #line 483 "../lexer/theme-parser.y" { ((*yyvalp).property_list) = g_hash_table_new_full ( g_str_hash, g_str_equal, NULL, (GDestroyNotify)rofi_theme_property_free ); g_hash_table_replace ( ((*yyvalp).property_list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.property)->name, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.property) ); } #line 1672 "lexer/theme-parser.c" break; case 24: #line 487 "../lexer/theme-parser.y" { // Old will be free'ed, and key/value will be replaced. g_hash_table_replace ( ((*yyvalp).property_list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.property)->name, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.property) ); } #line 1681 "lexer/theme-parser.c" break; case 25: #line 494 "../lexer/theme-parser.y" { ((*yyvalp).property) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.property); ((*yyvalp).property)->name = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.sval); } #line 1690 "lexer/theme-parser.c" break; case 26: #line 498 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_LINK ); ((*yyvalp).property)->name = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.sval); ((*yyvalp).property)->value.link.name = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.sval); } #line 1700 "lexer/theme-parser.c" break; case 27: #line 503 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_LINK ); ((*yyvalp).property)->name = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval.sval); ((*yyvalp).property)->value.link.name = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.sval); ((*yyvalp).property)->value.link.def_value = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.property); } #line 1711 "lexer/theme-parser.c" break; case 28: #line 509 "../lexer/theme-parser.y" { ((*yyvalp).property) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.property); ((*yyvalp).property)->name = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.sval); } #line 1720 "lexer/theme-parser.c" break; case 29: #line 513 "../lexer/theme-parser.y" { ((*yyvalp).property) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.property); ((*yyvalp).property)->name = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval.sval); } #line 1729 "lexer/theme-parser.c" break; case 30: #line 519 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_INHERIT ); } #line 1737 "lexer/theme-parser.c" break; case 31: #line 522 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_INTEGER ); ((*yyvalp).property)->value.i = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 1746 "lexer/theme-parser.c" break; case 32: #line 526 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_DOUBLE ); ((*yyvalp).property)->value.f = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval); } #line 1755 "lexer/theme-parser.c" break; case 33: #line 530 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_STRING ); ((*yyvalp).property)->value.s = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.sval); } #line 1764 "lexer/theme-parser.c" break; case 34: #line 534 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_CHAR ); ((*yyvalp).property)->value.c = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.cval); } #line 1773 "lexer/theme-parser.c" break; case 35: #line 538 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_LINK ); ((*yyvalp).property)->value.link.name = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.sval); } #line 1782 "lexer/theme-parser.c" break; case 36: #line 542 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_BOOLEAN ); ((*yyvalp).property)->value.b = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.bval); } #line 1791 "lexer/theme-parser.c" break; case 37: #line 546 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_PADDING ); ((*yyvalp).property)->value.padding = (RofiPadding){ (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance), rofi_theme_property_copy_distance((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance)), rofi_theme_property_copy_distance((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance)), rofi_theme_property_copy_distance((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance)) }; } #line 1800 "lexer/theme-parser.c" break; case 38: #line 550 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_PADDING ); ((*yyvalp).property)->value.padding = (RofiPadding){ (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.distance), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance), rofi_theme_property_copy_distance((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.distance)), rofi_theme_property_copy_distance((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance)) }; } #line 1809 "lexer/theme-parser.c" break; case 39: #line 554 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_PADDING ); ((*yyvalp).property)->value.padding = (RofiPadding){ (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.distance), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance), rofi_theme_property_copy_distance((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.distance)) }; } #line 1818 "lexer/theme-parser.c" break; case 40: #line 558 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_PADDING ); ((*yyvalp).property)->value.padding = (RofiPadding){ (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.distance), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.distance), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance) }; } #line 1827 "lexer/theme-parser.c" break; case 41: #line 562 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_POSITION ); ((*yyvalp).property)->value.i = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.wloc); } #line 1836 "lexer/theme-parser.c" break; case 42: #line 566 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_HIGHLIGHT ); ((*yyvalp).property)->value.highlight.style = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.ival)|ROFI_HL_COLOR; ((*yyvalp).property)->value.highlight.color = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.colorval); } #line 1846 "lexer/theme-parser.c" break; case 43: #line 571 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_HIGHLIGHT ); ((*yyvalp).property)->value.highlight.style = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 1855 "lexer/theme-parser.c" break; case 44: #line 575 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_COLOR ); ((*yyvalp).property)->value.color = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.colorval); } #line 1864 "lexer/theme-parser.c" break; case 45: #line 579 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_LIST ); ((*yyvalp).property)->value.list = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.list); } #line 1873 "lexer/theme-parser.c" break; case 46: #line 583 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_ORIENTATION ); ((*yyvalp).property)->value.i = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 1882 "lexer/theme-parser.c" break; case 47: #line 587 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_CURSOR ); ((*yyvalp).property)->value.i = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 1891 "lexer/theme-parser.c" break; case 48: #line 591 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_IMAGE ); ((*yyvalp).property)->value.image.type = ROFI_IMAGE_URL; ((*yyvalp).property)->value.image.url = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.sval); } #line 1901 "lexer/theme-parser.c" break; case 49: #line 596 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_IMAGE ); ((*yyvalp).property)->value.image.type = ROFI_IMAGE_URL; ((*yyvalp).property)->value.image.url = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.sval); ((*yyvalp).property)->value.image.scaling = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.ival); } #line 1912 "lexer/theme-parser.c" break; case 50: #line 602 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_IMAGE ); ((*yyvalp).property)->value.image.type = ROFI_IMAGE_LINEAR_GRADIENT; ((*yyvalp).property)->value.image.dir = ROFI_DIRECTION_RIGHT; ((*yyvalp).property)->value.image.colors = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.list); } #line 1923 "lexer/theme-parser.c" break; case 51: #line 608 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_IMAGE ); ((*yyvalp).property)->value.image.type = ROFI_IMAGE_LINEAR_GRADIENT; ((*yyvalp).property)->value.image.dir = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.ival); ((*yyvalp).property)->value.image.colors = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.list); } #line 1934 "lexer/theme-parser.c" break; case 52: #line 614 "../lexer/theme-parser.y" { ((*yyvalp).property) = rofi_theme_property_create ( P_IMAGE ); ((*yyvalp).property)->value.image.type = ROFI_IMAGE_LINEAR_GRADIENT; ((*yyvalp).property)->value.image.dir = ROFI_DIRECTION_ANGLE; ((*yyvalp).property)->value.image.angle = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.fval); ((*yyvalp).property)->value.image.colors = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.list); } #line 1946 "lexer/theme-parser.c" break; case 53: #line 625 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_DIRECTION_RIGHT; } #line 1952 "lexer/theme-parser.c" break; case 54: #line 626 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_DIRECTION_LEFT; } #line 1958 "lexer/theme-parser.c" break; case 55: #line 627 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_DIRECTION_TOP; } #line 1964 "lexer/theme-parser.c" break; case 56: #line 628 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_DIRECTION_BOTTOM; } #line 1970 "lexer/theme-parser.c" break; case 57: #line 631 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_SCALE_BOTH; } #line 1976 "lexer/theme-parser.c" break; case 58: #line 632 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_SCALE_WIDTH; } #line 1982 "lexer/theme-parser.c" break; case 59: #line 633 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_SCALE_HEIGHT; } #line 1988 "lexer/theme-parser.c" break; case 60: #line 634 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_SCALE_NONE; } #line 1994 "lexer/theme-parser.c" break; case 61: #line 638 "../lexer/theme-parser.y" { ((*yyvalp).list) = g_list_append ( NULL, g_memdup ( (gconstpointer)&((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.colorval)), sizeof ( ThemeColor ))); } #line 2002 "lexer/theme-parser.c" break; case 62: #line 641 "../lexer/theme-parser.y" { ((*yyvalp).list) = g_list_append ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.list), g_memdup ( (gconstpointer)&((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.colorval)), sizeof ( ThemeColor ))); } #line 2011 "lexer/theme-parser.c" break; case 63: #line 650 "../lexer/theme-parser.y" { ((*yyvalp).list) = NULL; } #line 2017 "lexer/theme-parser.c" break; case 64: #line 651 "../lexer/theme-parser.y" { ((*yyvalp).list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.list); } #line 2023 "lexer/theme-parser.c" break; case 65: #line 655 "../lexer/theme-parser.y" { ((*yyvalp).list) = g_list_append ( NULL, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.sval)); } #line 2029 "lexer/theme-parser.c" break; case 66: #line 656 "../lexer/theme-parser.y" { ((*yyvalp).list) = g_list_append ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.sval) ); } #line 2037 "lexer/theme-parser.c" break; case 67: #line 667 "../lexer/theme-parser.y" { ((*yyvalp).wloc) =WL_CENTER;} #line 2043 "lexer/theme-parser.c" break; case 70: #line 670 "../lexer/theme-parser.y" { ((*yyvalp).wloc) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.wloc)|(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.wloc);} #line 2049 "lexer/theme-parser.c" break; case 71: #line 671 "../lexer/theme-parser.y" { ((*yyvalp).wloc) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.wloc)|(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.wloc);} #line 2055 "lexer/theme-parser.c" break; case 72: #line 674 "../lexer/theme-parser.y" { ((*yyvalp).wloc) = WL_EAST;} #line 2061 "lexer/theme-parser.c" break; case 73: #line 675 "../lexer/theme-parser.y" { ((*yyvalp).wloc) = WL_WEST;} #line 2067 "lexer/theme-parser.c" break; case 74: #line 678 "../lexer/theme-parser.y" { ((*yyvalp).wloc) = WL_NORTH;} #line 2073 "lexer/theme-parser.c" break; case 75: #line 679 "../lexer/theme-parser.y" { ((*yyvalp).wloc) = WL_SOUTH;} #line 2079 "lexer/theme-parser.c" break; case 76: #line 687 "../lexer/theme-parser.y" { ((*yyvalp).ival) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival);} #line 2085 "lexer/theme-parser.c" break; case 77: #line 688 "../lexer/theme-parser.y" { ((*yyvalp).ival) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.ival)|(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival);} #line 2091 "lexer/theme-parser.c" break; case 78: #line 692 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_NONE; } #line 2097 "lexer/theme-parser.c" break; case 79: #line 693 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_BOLD; } #line 2103 "lexer/theme-parser.c" break; case 80: #line 694 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_UNDERLINE; } #line 2109 "lexer/theme-parser.c" break; case 81: #line 695 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_STRIKETHROUGH; } #line 2115 "lexer/theme-parser.c" break; case 82: #line 696 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_ITALIC; } #line 2121 "lexer/theme-parser.c" break; case 83: #line 697 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_SMALL_CAPS; } #line 2127 "lexer/theme-parser.c" break; case 84: #line 702 "../lexer/theme-parser.y" { ((*yyvalp).distance).base.distance = (double) (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.ival); ((*yyvalp).distance).base.type = ROFI_PU_PX; ((*yyvalp).distance).base.left = NULL; ((*yyvalp).distance).base.right = NULL; ((*yyvalp).distance).base.modtype = ROFI_DISTANCE_MODIFIER_NONE; ((*yyvalp).distance).style = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 2140 "lexer/theme-parser.c" break; case 85: #line 710 "../lexer/theme-parser.y" { ((*yyvalp).distance) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance);} #line 2146 "lexer/theme-parser.c" break; case 86: #line 715 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->distance = (double)(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.ival); ((*yyvalp).distance_unit)->type = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); ((*yyvalp).distance_unit)->left = NULL; ((*yyvalp).distance_unit)->right = NULL; ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_NONE; } #line 2159 "lexer/theme-parser.c" break; case 87: #line 723 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->distance = (double)(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); ((*yyvalp).distance_unit)->type = ROFI_PU_PX; ((*yyvalp).distance_unit)->left = NULL; ((*yyvalp).distance_unit)->right = NULL; ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_NONE; } #line 2172 "lexer/theme-parser.c" break; case 88: #line 731 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->distance = (double)(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); ((*yyvalp).distance_unit)->type = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); ((*yyvalp).distance_unit)->left = NULL; ((*yyvalp).distance_unit)->right = NULL; ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_NONE; } #line 2185 "lexer/theme-parser.c" break; case 89: #line 739 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->distance = 0; ((*yyvalp).distance_unit)->type = ROFI_PU_PX; ((*yyvalp).distance_unit)->left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->right = 0; ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_GROUP; } #line 2198 "lexer/theme-parser.c" break; case 90: #line 753 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->right = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_MULTIPLY; } #line 2209 "lexer/theme-parser.c" break; case 91: #line 759 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->right = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_DIVIDE; } #line 2220 "lexer/theme-parser.c" break; case 92: #line 765 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->right = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_MODULO; } #line 2231 "lexer/theme-parser.c" break; case 93: #line 771 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); } #line 2239 "lexer/theme-parser.c" break; case 94: #line 778 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->right = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_ADD; } #line 2250 "lexer/theme-parser.c" break; case 95: #line 784 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->right = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_SUBTRACT; } #line 2261 "lexer/theme-parser.c" break; case 96: #line 790 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); } #line 2269 "lexer/theme-parser.c" break; case 97: #line 795 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->right = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_MIN; } #line 2280 "lexer/theme-parser.c" break; case 98: #line 801 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = g_slice_new0(RofiDistanceUnit); ((*yyvalp).distance_unit)->left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->right = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance_unit)->modtype = ROFI_DISTANCE_MODIFIER_MAX; } #line 2291 "lexer/theme-parser.c" break; case 99: #line 807 "../lexer/theme-parser.y" { ((*yyvalp).distance_unit) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.distance_unit); } #line 2299 "lexer/theme-parser.c" break; case 100: #line 814 "../lexer/theme-parser.y" { ((*yyvalp).distance).base.distance = (double)(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.ival); ((*yyvalp).distance).base.type = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.ival); ((*yyvalp).distance).base.left = NULL; ((*yyvalp).distance).base.right = NULL; ((*yyvalp).distance).base.modtype = ROFI_DISTANCE_MODIFIER_NONE; ((*yyvalp).distance).style = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 2312 "lexer/theme-parser.c" break; case 101: #line 823 "../lexer/theme-parser.y" { ((*yyvalp).distance).base.distance = (double)(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.fval); ((*yyvalp).distance).base.type = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.ival); ((*yyvalp).distance).base.modtype = ROFI_DISTANCE_MODIFIER_NONE; ((*yyvalp).distance).base.left = NULL; ((*yyvalp).distance).base.right = NULL; ((*yyvalp).distance).style = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 2325 "lexer/theme-parser.c" break; case 102: #line 831 "../lexer/theme-parser.y" { ((*yyvalp).distance).base.distance = 0; ((*yyvalp).distance).base.type = ROFI_PU_PX; ((*yyvalp).distance).base.left = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.distance_unit); ((*yyvalp).distance).base.right = NULL; ((*yyvalp).distance).base.modtype = ROFI_DISTANCE_MODIFIER_GROUP; ((*yyvalp).distance).style = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 2338 "lexer/theme-parser.c" break; case 103: #line 842 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_PU_PX; } #line 2344 "lexer/theme-parser.c" break; case 104: #line 843 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_PU_MM; } #line 2350 "lexer/theme-parser.c" break; case 105: #line 844 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_PU_EM; } #line 2356 "lexer/theme-parser.c" break; case 106: #line 845 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_PU_CH; } #line 2362 "lexer/theme-parser.c" break; case 107: #line 846 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_PU_PERCENT; } #line 2368 "lexer/theme-parser.c" break; case 108: #line 853 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_SOLID; } #line 2374 "lexer/theme-parser.c" break; case 109: #line 854 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_SOLID; } #line 2380 "lexer/theme-parser.c" break; case 110: #line 855 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_HL_DASH; } #line 2386 "lexer/theme-parser.c" break; case 111: #line 863 "../lexer/theme-parser.y" { if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.ival),0,255, &((*yylocp))) ) { YYABORT; } if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.ival),0,255, &((*yylocp))) ) { YYABORT; } if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.ival),0,255, &((*yylocp))) ) { YYABORT; } ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval).red = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.ival)/255.0; ((*yyvalp).colorval).green = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.ival)/255.0; ((*yyvalp).colorval).blue = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.ival)/255.0; } #line 2400 "lexer/theme-parser.c" break; case 112: #line 873 "../lexer/theme-parser.y" { if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.ival),0,255, &((*yylocp))) ) { YYABORT; } if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.ival),0,255, &((*yylocp))) ) { YYABORT; } if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.ival),0,255, &((*yylocp))) ) { YYABORT; } ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval).red = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.ival)/255.0; ((*yyvalp).colorval).green = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.ival)/255.0; ((*yyvalp).colorval).blue = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.ival)/255.0; } #line 2414 "lexer/theme-parser.c" break; case 113: #line 883 "../lexer/theme-parser.y" { if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-9)].yystate.yysemantics.yysval.fval),0,100, &((*yylocp))) ) { YYABORT; } if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.fval),0,100, &((*yylocp))) ) { YYABORT; } if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.fval),0,100, &((*yylocp))) ) { YYABORT; } ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval).red = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-9)].yystate.yysemantics.yysval.fval)/100.0; ((*yyvalp).colorval).green = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.fval)/100.0; ((*yyvalp).colorval).blue = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.fval)/100.0; } #line 2428 "lexer/theme-parser.c" break; case 114: #line 893 "../lexer/theme-parser.y" { if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.fval),0,100, &((*yylocp))) ) { YYABORT; } if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.fval),0,100, &((*yylocp))) ) { YYABORT; } if ( ! check_in_range((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.fval),0,100, &((*yylocp))) ) { YYABORT; } ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval).red = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.fval)/100.0; ((*yyvalp).colorval).green = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.fval)/100.0; ((*yyvalp).colorval).blue = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.fval)/100.0; } #line 2442 "lexer/theme-parser.c" break; case 115: #line 903 "../lexer/theme-parser.y" { double h = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.fval), w = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.fval), b = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval) = hwb_to_rgb ( h, w, b ); ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); } #line 2452 "lexer/theme-parser.c" break; case 116: #line 909 "../lexer/theme-parser.y" { double h = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.fval), w = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.fval), b = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval) = hwb_to_rgb ( h, w, b ); ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); } #line 2462 "lexer/theme-parser.c" break; case 117: #line 915 "../lexer/theme-parser.y" { ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); double c = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval.fval), m = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.fval), y = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.fval), k = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval).red = (1.0-c)*(1.0-k); ((*yyvalp).colorval).green = (1.0-m)*(1.0-k); ((*yyvalp).colorval).blue = (1.0-y)*(1.0-k); } #line 2474 "lexer/theme-parser.c" break; case 118: #line 923 "../lexer/theme-parser.y" { ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); double c = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.fval), m = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.fval), y = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.fval), k = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval).red = (1.0-c)*(1.0-k); ((*yyvalp).colorval).green = (1.0-m)*(1.0-k); ((*yyvalp).colorval).blue = (1.0-y)*(1.0-k); } #line 2486 "lexer/theme-parser.c" break; case 119: #line 931 "../lexer/theme-parser.y" { double h = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.fval), s = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.fval), l = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval) = hsl_to_rgb ( h, s, l ); ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); } #line 2496 "lexer/theme-parser.c" break; case 120: #line 937 "../lexer/theme-parser.y" { double h = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.fval), s = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.fval), l = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.fval); ((*yyvalp).colorval) = hsl_to_rgb ( h, s, l ); ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); } #line 2506 "lexer/theme-parser.c" break; case 121: #line 943 "../lexer/theme-parser.y" { ((*yyvalp).colorval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.colorval); } #line 2514 "lexer/theme-parser.c" break; case 122: #line 946 "../lexer/theme-parser.y" { ((*yyvalp).colorval).alpha = 0.0; ((*yyvalp).colorval).red = ((*yyvalp).colorval).green = ((*yyvalp).colorval).blue = 0.0; } #line 2523 "lexer/theme-parser.c" break; case 123: #line 950 "../lexer/theme-parser.y" { ((*yyvalp).colorval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.colorval); ((*yyvalp).colorval).alpha = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval); } #line 2532 "lexer/theme-parser.c" break; case 124: #line 956 "../lexer/theme-parser.y" { ((*yyvalp).fval) = 1.0; } #line 2538 "lexer/theme-parser.c" break; case 125: #line 957 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval);} #line 2544 "lexer/theme-parser.c" break; case 126: #line 960 "../lexer/theme-parser.y" { ((*yyvalp).fval) = 1.0; } #line 2550 "lexer/theme-parser.c" break; case 127: #line 961 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval);} #line 2556 "lexer/theme-parser.c" break; case 128: #line 964 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval)/360.0; if ( ! check_in_range ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval), 0, 360, &((*yylocp)))){YYABORT;}} #line 2562 "lexer/theme-parser.c" break; case 129: #line 965 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval)/360.0; if ( ! check_in_range ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval), 0, 360, &((*yylocp)))){YYABORT;}} #line 2568 "lexer/theme-parser.c" break; case 130: #line 966 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval)/(2*G_PI); if ( ! check_in_range ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval), 0.0, (2*G_PI), &((*yylocp)))){YYABORT;}} #line 2574 "lexer/theme-parser.c" break; case 131: #line 967 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval)/400.0; if ( ! check_in_range ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval), 0, 400, &((*yylocp)))){YYABORT;}} #line 2580 "lexer/theme-parser.c" break; case 132: #line 968 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval); if ( ! check_in_range ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval), 0.0, 1.0, &((*yylocp)))){YYABORT;}} #line 2586 "lexer/theme-parser.c" break; case 133: #line 972 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval)/100.0; if ( !check_in_range ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.fval), 0, 100, &((*yylocp)))){YYABORT;}} #line 2592 "lexer/theme-parser.c" break; case 134: #line 973 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval); if ( !check_in_range ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval), 0.0, 1.0, &((*yylocp)))){YYABORT;}} #line 2598 "lexer/theme-parser.c" break; case 135: #line 977 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.fval); } #line 2604 "lexer/theme-parser.c" break; case 136: #line 978 "../lexer/theme-parser.y" { ((*yyvalp).fval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.ival); } #line 2610 "lexer/theme-parser.c" break; case 137: #line 982 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_ORIENTATION_HORIZONTAL; } #line 2616 "lexer/theme-parser.c" break; case 138: #line 983 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_ORIENTATION_VERTICAL; } #line 2622 "lexer/theme-parser.c" break; case 139: #line 987 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_CURSOR_DEFAULT; } #line 2628 "lexer/theme-parser.c" break; case 140: #line 988 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_CURSOR_POINTER; } #line 2634 "lexer/theme-parser.c" break; case 141: #line 989 "../lexer/theme-parser.y" { ((*yyvalp).ival) = ROFI_CURSOR_TEXT; } #line 2640 "lexer/theme-parser.c" break; case 142: #line 994 "../lexer/theme-parser.y" { ((*yyvalp).sval) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.sval); } #line 2646 "lexer/theme-parser.c" break; case 143: #line 998 "../lexer/theme-parser.y" { ((*yyvalp).list) = g_list_append ( NULL, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.list) ); } #line 2652 "lexer/theme-parser.c" break; case 144: #line 999 "../lexer/theme-parser.y" { ((*yyvalp).list) = g_list_append ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.list)); } #line 2660 "lexer/theme-parser.c" break; case 145: #line 1002 "../lexer/theme-parser.y" { ((*yyvalp).list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.list); } #line 2668 "lexer/theme-parser.c" break; case 146: #line 1008 "../lexer/theme-parser.y" { ((*yyvalp).list) = g_list_append ( NULL, (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.sval) );} #line 2674 "lexer/theme-parser.c" break; case 147: #line 1009 "../lexer/theme-parser.y" { ((*yyvalp).list) = g_list_append ( (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.list), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.sval));} #line 2680 "lexer/theme-parser.c" break; case 148: #line 1010 "../lexer/theme-parser.y" { ((*yyvalp).list) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.list); } #line 2686 "lexer/theme-parser.c" break; #line 2690 "lexer/theme-parser.c" default: break; } return yyok; # undef yyerrok # undef YYABORT # undef YYACCEPT # undef YYERROR # undef YYBACKUP # undef yyclearin # undef YYRECOVERING } static void yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1) { YYUSE (yy0); YYUSE (yy1); switch (yyn) { default: break; } } /* Bison grammar-table manipulation. */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, const char *what) { YYUSE (yyvaluep); YYUSE (yylocationp); YYUSE (what); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } /** Number of symbols composing the right hand side of rule #RULE. */ static inline int yyrhsLength (yyRuleNum yyrule) { return yyr2[yyrule]; } static void yydestroyGLRState (char const *yymsg, yyGLRState *yys, const char *what) { if (yys->yyresolved) yydestruct (yymsg, yystos[yys->yylrState], &yys->yysemantics.yysval, &yys->yyloc, what); else { #if YYDEBUG if (yydebug) { if (yys->yysemantics.yyfirstVal) YY_FPRINTF ((stderr, "%s unresolved", yymsg)); else YY_FPRINTF ((stderr, "%s incomplete", yymsg)); YY_SYMBOL_PRINT ("", yystos[yys->yylrState], YY_NULLPTR, &yys->yyloc); } #endif if (yys->yysemantics.yyfirstVal) { yySemanticOption *yyoption = yys->yysemantics.yyfirstVal; yyGLRState *yyrh; int yyn; for (yyrh = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule); yyn > 0; yyrh = yyrh->yypred, yyn -= 1) yydestroyGLRState (yymsg, yyrh, what); } } } /** Left-hand-side symbol for rule #YYRULE. */ static inline yySymbol yylhsNonterm (yyRuleNum yyrule) { return yyr1[yyrule]; } #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) /** True iff LR state YYSTATE has only a default reduction (regardless * of token). */ static inline yybool yyisDefaultedState (yyStateNum yystate) { return yypact_value_is_default (yypact[yystate]); } /** The default reduction for YYSTATE, assuming it has one. */ static inline yyRuleNum yydefaultAction (yyStateNum yystate) { return yydefact[yystate]; } #define yytable_value_is_error(Yyn) \ 0 /** The action to take in YYSTATE on seeing YYTOKEN. * Result R means * R < 0: Reduce on rule -R. * R = 0: Error. * R > 0: Shift to state R. * Set *YYCONFLICTS to a pointer into yyconfl to a 0-terminated list * of conflicting reductions. */ static inline int yygetLRActions (yyStateNum yystate, yySymbol yytoken, const short** yyconflicts) { int yyindex = yypact[yystate] + yytoken; if (yyisDefaultedState (yystate) || yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken) { *yyconflicts = yyconfl; return -yydefact[yystate]; } else if (! yytable_value_is_error (yytable[yyindex])) { *yyconflicts = yyconfl + yyconflp[yyindex]; return yytable[yyindex]; } else { *yyconflicts = yyconfl + yyconflp[yyindex]; return 0; } } /** Compute post-reduction state. * \param yystate the current state * \param yysym the nonterminal to push on the stack */ static inline yyStateNum yyLRgotoState (yyStateNum yystate, yySymbol yysym) { int yyr = yypgoto[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate) return yytable[yyr]; else return yydefgoto[yysym - YYNTOKENS]; } static inline yybool yyisShiftAction (int yyaction) { return 0 < yyaction; } static inline yybool yyisErrorAction (int yyaction) { return yyaction == 0; } /* GLRStates */ /** Return a fresh GLRStackItem in YYSTACKP. The item is an LR state * if YYISSTATE, and otherwise a semantic option. Callers should call * YY_RESERVE_GLRSTACK afterwards to make sure there is sufficient * headroom. */ static inline yyGLRStackItem* yynewGLRStackItem (yyGLRStack* yystackp, yybool yyisState) { yyGLRStackItem* yynewItem = yystackp->yynextFree; yystackp->yyspaceLeft -= 1; yystackp->yynextFree += 1; yynewItem->yystate.yyisState = yyisState; return yynewItem; } /** Add a new semantic action that will execute the action for rule * YYRULE on the semantic values in YYRHS to the list of * alternative actions for YYSTATE. Assumes that YYRHS comes from * stack #YYK of *YYSTACKP. */ static void yyaddDeferredAction (yyGLRStack* yystackp, ptrdiff_t yyk, yyGLRState* yystate, yyGLRState* yyrhs, yyRuleNum yyrule) { yySemanticOption* yynewOption = &yynewGLRStackItem (yystackp, yyfalse)->yyoption; YY_ASSERT (!yynewOption->yyisState); yynewOption->yystate = yyrhs; yynewOption->yyrule = yyrule; if (yystackp->yytops.yylookaheadNeeds[yyk]) { yynewOption->yyrawchar = yychar; yynewOption->yyval = yylval; yynewOption->yyloc = yylloc; } else yynewOption->yyrawchar = YYEMPTY; yynewOption->yynext = yystate->yysemantics.yyfirstVal; yystate->yysemantics.yyfirstVal = yynewOption; YY_RESERVE_GLRSTACK (yystackp); } /* GLRStacks */ /** Initialize YYSET to a singleton set containing an empty stack. */ static yybool yyinitStateSet (yyGLRStateSet* yyset) { yyset->yysize = 1; yyset->yycapacity = 16; yyset->yystates = YY_CAST (yyGLRState**, YYMALLOC (YY_CAST (size_t, yyset->yycapacity) * sizeof yyset->yystates[0])); if (! yyset->yystates) return yyfalse; yyset->yystates[0] = YY_NULLPTR; yyset->yylookaheadNeeds = YY_CAST (yybool*, YYMALLOC (YY_CAST (size_t, yyset->yycapacity) * sizeof yyset->yylookaheadNeeds[0])); if (! yyset->yylookaheadNeeds) { YYFREE (yyset->yystates); return yyfalse; } memset (yyset->yylookaheadNeeds, 0, YY_CAST (size_t, yyset->yycapacity) * sizeof yyset->yylookaheadNeeds[0]); return yytrue; } static void yyfreeStateSet (yyGLRStateSet* yyset) { YYFREE (yyset->yystates); YYFREE (yyset->yylookaheadNeeds); } /** Initialize *YYSTACKP to a single empty stack, with total maximum * capacity for all stacks of YYSIZE. */ static yybool yyinitGLRStack (yyGLRStack* yystackp, ptrdiff_t yysize) { yystackp->yyerrState = 0; yynerrs = 0; yystackp->yyspaceLeft = yysize; yystackp->yyitems = YY_CAST (yyGLRStackItem*, YYMALLOC (YY_CAST (size_t, yysize) * sizeof yystackp->yynextFree[0])); if (!yystackp->yyitems) return yyfalse; yystackp->yynextFree = yystackp->yyitems; yystackp->yysplitPoint = YY_NULLPTR; yystackp->yylastDeleted = YY_NULLPTR; return yyinitStateSet (&yystackp->yytops); } #if YYSTACKEXPANDABLE # define YYRELOC(YYFROMITEMS, YYTOITEMS, YYX, YYTYPE) \ &((YYTOITEMS) \ - ((YYFROMITEMS) - YY_REINTERPRET_CAST (yyGLRStackItem*, (YYX))))->YYTYPE /** If *YYSTACKP is expandable, extend it. WARNING: Pointers into the stack from outside should be considered invalid after this call. We always expand when there are 1 or fewer items left AFTER an allocation, so that we can avoid having external pointers exist across an allocation. */ static void yyexpandGLRStack (yyGLRStack* yystackp) { yyGLRStackItem* yynewItems; yyGLRStackItem* yyp0, *yyp1; ptrdiff_t yynewSize; ptrdiff_t yyn; ptrdiff_t yysize = yystackp->yynextFree - yystackp->yyitems; if (YYMAXDEPTH - YYHEADROOM < yysize) yyMemoryExhausted (yystackp); yynewSize = 2*yysize; if (YYMAXDEPTH < yynewSize) yynewSize = YYMAXDEPTH; yynewItems = YY_CAST (yyGLRStackItem*, YYMALLOC (YY_CAST (size_t, yynewSize) * sizeof yynewItems[0])); if (! yynewItems) yyMemoryExhausted (yystackp); for (yyp0 = yystackp->yyitems, yyp1 = yynewItems, yyn = yysize; 0 < yyn; yyn -= 1, yyp0 += 1, yyp1 += 1) { *yyp1 = *yyp0; if (*YY_REINTERPRET_CAST (yybool *, yyp0)) { yyGLRState* yys0 = &yyp0->yystate; yyGLRState* yys1 = &yyp1->yystate; if (yys0->yypred != YY_NULLPTR) yys1->yypred = YYRELOC (yyp0, yyp1, yys0->yypred, yystate); if (! yys0->yyresolved && yys0->yysemantics.yyfirstVal != YY_NULLPTR) yys1->yysemantics.yyfirstVal = YYRELOC (yyp0, yyp1, yys0->yysemantics.yyfirstVal, yyoption); } else { yySemanticOption* yyv0 = &yyp0->yyoption; yySemanticOption* yyv1 = &yyp1->yyoption; if (yyv0->yystate != YY_NULLPTR) yyv1->yystate = YYRELOC (yyp0, yyp1, yyv0->yystate, yystate); if (yyv0->yynext != YY_NULLPTR) yyv1->yynext = YYRELOC (yyp0, yyp1, yyv0->yynext, yyoption); } } if (yystackp->yysplitPoint != YY_NULLPTR) yystackp->yysplitPoint = YYRELOC (yystackp->yyitems, yynewItems, yystackp->yysplitPoint, yystate); for (yyn = 0; yyn < yystackp->yytops.yysize; yyn += 1) if (yystackp->yytops.yystates[yyn] != YY_NULLPTR) yystackp->yytops.yystates[yyn] = YYRELOC (yystackp->yyitems, yynewItems, yystackp->yytops.yystates[yyn], yystate); YYFREE (yystackp->yyitems); yystackp->yyitems = yynewItems; yystackp->yynextFree = yynewItems + yysize; yystackp->yyspaceLeft = yynewSize - yysize; } #endif static void yyfreeGLRStack (yyGLRStack* yystackp) { YYFREE (yystackp->yyitems); yyfreeStateSet (&yystackp->yytops); } /** Assuming that YYS is a GLRState somewhere on *YYSTACKP, update the * splitpoint of *YYSTACKP, if needed, so that it is at least as deep as * YYS. */ static inline void yyupdateSplit (yyGLRStack* yystackp, yyGLRState* yys) { if (yystackp->yysplitPoint != YY_NULLPTR && yystackp->yysplitPoint > yys) yystackp->yysplitPoint = yys; } /** Invalidate stack #YYK in *YYSTACKP. */ static inline void yymarkStackDeleted (yyGLRStack* yystackp, ptrdiff_t yyk) { if (yystackp->yytops.yystates[yyk] != YY_NULLPTR) yystackp->yylastDeleted = yystackp->yytops.yystates[yyk]; yystackp->yytops.yystates[yyk] = YY_NULLPTR; } /** Undelete the last stack in *YYSTACKP that was marked as deleted. Can only be done once after a deletion, and only when all other stacks have been deleted. */ static void yyundeleteLastStack (yyGLRStack* yystackp) { if (yystackp->yylastDeleted == YY_NULLPTR || yystackp->yytops.yysize != 0) return; yystackp->yytops.yystates[0] = yystackp->yylastDeleted; yystackp->yytops.yysize = 1; YY_DPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n")); yystackp->yylastDeleted = YY_NULLPTR; } static inline void yyremoveDeletes (yyGLRStack* yystackp) { ptrdiff_t yyi, yyj; yyi = yyj = 0; while (yyj < yystackp->yytops.yysize) { if (yystackp->yytops.yystates[yyi] == YY_NULLPTR) { if (yyi == yyj) YY_DPRINTF ((stderr, "Removing dead stacks.\n")); yystackp->yytops.yysize -= 1; } else { yystackp->yytops.yystates[yyj] = yystackp->yytops.yystates[yyi]; /* In the current implementation, it's unnecessary to copy yystackp->yytops.yylookaheadNeeds[yyi] since, after yyremoveDeletes returns, the parser immediately either enters deterministic operation or shifts a token. However, it doesn't hurt, and the code might evolve to need it. */ yystackp->yytops.yylookaheadNeeds[yyj] = yystackp->yytops.yylookaheadNeeds[yyi]; if (yyj != yyi) YY_DPRINTF ((stderr, "Rename stack %ld -> %ld.\n", YY_CAST (long, yyi), YY_CAST (long, yyj))); yyj += 1; } yyi += 1; } } /** Shift to a new state on stack #YYK of *YYSTACKP, corresponding to LR * state YYLRSTATE, at input position YYPOSN, with (resolved) semantic * value *YYVALP and source location *YYLOCP. */ static inline void yyglrShift (yyGLRStack* yystackp, ptrdiff_t yyk, yyStateNum yylrState, ptrdiff_t yyposn, YYSTYPE* yyvalp, YYLTYPE* yylocp) { yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; yynewState->yylrState = yylrState; yynewState->yyposn = yyposn; yynewState->yyresolved = yytrue; yynewState->yypred = yystackp->yytops.yystates[yyk]; yynewState->yysemantics.yysval = *yyvalp; yynewState->yyloc = *yylocp; yystackp->yytops.yystates[yyk] = yynewState; YY_RESERVE_GLRSTACK (yystackp); } /** Shift stack #YYK of *YYSTACKP, to a new state corresponding to LR * state YYLRSTATE, at input position YYPOSN, with the (unresolved) * semantic value of YYRHS under the action for YYRULE. */ static inline void yyglrShiftDefer (yyGLRStack* yystackp, ptrdiff_t yyk, yyStateNum yylrState, ptrdiff_t yyposn, yyGLRState* yyrhs, yyRuleNum yyrule) { yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; YY_ASSERT (yynewState->yyisState); yynewState->yylrState = yylrState; yynewState->yyposn = yyposn; yynewState->yyresolved = yyfalse; yynewState->yypred = yystackp->yytops.yystates[yyk]; yynewState->yysemantics.yyfirstVal = YY_NULLPTR; yystackp->yytops.yystates[yyk] = yynewState; /* Invokes YY_RESERVE_GLRSTACK. */ yyaddDeferredAction (yystackp, yyk, yynewState, yyrhs, yyrule); } #if !YYDEBUG # define YY_REDUCE_PRINT(Args) #else # define YY_REDUCE_PRINT(Args) \ do { \ if (yydebug) \ yy_reduce_print Args; \ } while (0) /*----------------------------------------------------------------------. | Report that stack #YYK of *YYSTACKP is going to be reduced by YYRULE. | `----------------------------------------------------------------------*/ static inline void yy_reduce_print (yybool yynormal, yyGLRStackItem* yyvsp, ptrdiff_t yyk, yyRuleNum yyrule, const char *what) { int yynrhs = yyrhsLength (yyrule); int yylow = 1; int yyi; YY_FPRINTF ((stderr, "Reducing stack %ld by rule %d (line %d):\n", YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule])); if (! yynormal) yyfillin (yyvsp, 1, -yynrhs); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YY_FPRINTF ((stderr, " $%d = ", yyi + 1)); yy_symbol_print (stderr, yystos[yyvsp[yyi - yynrhs + 1].yystate.yylrState], &yyvsp[yyi - yynrhs + 1].yystate.yysemantics.yysval, &(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL ((yyi + 1) - (yynrhs))].yystate.yyloc) , what); if (!yyvsp[yyi - yynrhs + 1].yystate.yyresolved) YY_FPRINTF ((stderr, " (unresolved)")); YY_FPRINTF ((stderr, "\n")); } } #endif /** Pop the symbols consumed by reduction #YYRULE from the top of stack * #YYK of *YYSTACKP, and perform the appropriate semantic action on their * semantic values. Assumes that all ambiguities in semantic values * have been previously resolved. Set *YYVALP to the resulting value, * and *YYLOCP to the computed location (if any). Return value is as * for userAction. */ static inline YYRESULTTAG yydoAction (yyGLRStack* yystackp, ptrdiff_t yyk, yyRuleNum yyrule, YYSTYPE* yyvalp, YYLTYPE *yylocp, const char *what) { int yynrhs = yyrhsLength (yyrule); if (yystackp->yysplitPoint == YY_NULLPTR) { /* Standard special case: single stack. */ yyGLRStackItem* yyrhs = YY_REINTERPRET_CAST (yyGLRStackItem*, yystackp->yytops.yystates[yyk]); YY_ASSERT (yyk == 0); yystackp->yynextFree -= yynrhs; yystackp->yyspaceLeft += yynrhs; yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate; YY_REDUCE_PRINT ((yytrue, yyrhs, yyk, yyrule, what)); return yyuserAction (yyrule, yynrhs, yyrhs, yystackp, yyvalp, yylocp, what); } else { yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1]; yyGLRState* yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yystackp->yytops.yystates[yyk]; int yyi; if (yynrhs == 0) /* Set default location. */ yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yys->yyloc; for (yyi = 0; yyi < yynrhs; yyi += 1) { yys = yys->yypred; YY_ASSERT (yys); } yyupdateSplit (yystackp, yys); yystackp->yytops.yystates[yyk] = yys; YY_REDUCE_PRINT ((yyfalse, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, yyk, yyrule, what)); return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, yystackp, yyvalp, yylocp, what); } } /** Pop items off stack #YYK of *YYSTACKP according to grammar rule YYRULE, * and push back on the resulting nonterminal symbol. Perform the * semantic action associated with YYRULE and store its value with the * newly pushed state, if YYFORCEEVAL or if *YYSTACKP is currently * unambiguous. Otherwise, store the deferred semantic action with * the new state. If the new state would have an identical input * position, LR state, and predecessor to an existing state on the stack, * it is identified with that existing state, eliminating stack #YYK from * *YYSTACKP. In this case, the semantic value is * added to the options for the existing state's semantic value. */ static inline YYRESULTTAG yyglrReduce (yyGLRStack* yystackp, ptrdiff_t yyk, yyRuleNum yyrule, yybool yyforceEval, const char *what) { ptrdiff_t yyposn = yystackp->yytops.yystates[yyk]->yyposn; if (yyforceEval || yystackp->yysplitPoint == YY_NULLPTR) { YYSTYPE yysval; YYLTYPE yyloc; YYRESULTTAG yyflag = yydoAction (yystackp, yyk, yyrule, &yysval, &yyloc, what); if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR) YY_DPRINTF ((stderr, "Parse on stack %ld rejected by rule %d (line %d).\n", YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1])); if (yyflag != yyok) return yyflag; YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc); yyglrShift (yystackp, yyk, yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState, yylhsNonterm (yyrule)), yyposn, &yysval, &yyloc); } else { ptrdiff_t yyi; int yyn; yyGLRState* yys, *yys0 = yystackp->yytops.yystates[yyk]; yyStateNum yynewLRState; for (yys = yystackp->yytops.yystates[yyk], yyn = yyrhsLength (yyrule); 0 < yyn; yyn -= 1) { yys = yys->yypred; YY_ASSERT (yys); } yyupdateSplit (yystackp, yys); yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule)); YY_DPRINTF ((stderr, "Reduced stack %ld by rule %d (line %d); action deferred. " "Now in state %d.\n", YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1], yynewLRState)); for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1) if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULLPTR) { yyGLRState *yysplit = yystackp->yysplitPoint; yyGLRState *yyp = yystackp->yytops.yystates[yyi]; while (yyp != yys && yyp != yysplit && yyp->yyposn >= yyposn) { if (yyp->yylrState == yynewLRState && yyp->yypred == yys) { yyaddDeferredAction (yystackp, yyk, yyp, yys0, yyrule); yymarkStackDeleted (yystackp, yyk); YY_DPRINTF ((stderr, "Merging stack %ld into stack %ld.\n", YY_CAST (long, yyk), YY_CAST (long, yyi))); return yyok; } yyp = yyp->yypred; } } yystackp->yytops.yystates[yyk] = yys; yyglrShiftDefer (yystackp, yyk, yynewLRState, yyposn, yys0, yyrule); } return yyok; } static ptrdiff_t yysplitStack (yyGLRStack* yystackp, ptrdiff_t yyk) { if (yystackp->yysplitPoint == YY_NULLPTR) { YY_ASSERT (yyk == 0); yystackp->yysplitPoint = yystackp->yytops.yystates[yyk]; } if (yystackp->yytops.yycapacity <= yystackp->yytops.yysize) { ptrdiff_t state_size = sizeof yystackp->yytops.yystates[0]; ptrdiff_t half_max_capacity = YYSIZEMAX / 2 / state_size; if (half_max_capacity < yystackp->yytops.yycapacity) yyMemoryExhausted (yystackp); yystackp->yytops.yycapacity *= 2; { yyGLRState** yynewStates = YY_CAST (yyGLRState**, YYREALLOC (yystackp->yytops.yystates, (YY_CAST (size_t, yystackp->yytops.yycapacity) * sizeof yynewStates[0]))); if (yynewStates == YY_NULLPTR) yyMemoryExhausted (yystackp); yystackp->yytops.yystates = yynewStates; } { yybool* yynewLookaheadNeeds = YY_CAST (yybool*, YYREALLOC (yystackp->yytops.yylookaheadNeeds, (YY_CAST (size_t, yystackp->yytops.yycapacity) * sizeof yynewLookaheadNeeds[0]))); if (yynewLookaheadNeeds == YY_NULLPTR) yyMemoryExhausted (yystackp); yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds; } } yystackp->yytops.yystates[yystackp->yytops.yysize] = yystackp->yytops.yystates[yyk]; yystackp->yytops.yylookaheadNeeds[yystackp->yytops.yysize] = yystackp->yytops.yylookaheadNeeds[yyk]; yystackp->yytops.yysize += 1; return yystackp->yytops.yysize - 1; } /** True iff YYY0 and YYY1 represent identical options at the top level. * That is, they represent the same rule applied to RHS symbols * that produce the same terminal symbols. */ static yybool yyidenticalOptions (yySemanticOption* yyy0, yySemanticOption* yyy1) { if (yyy0->yyrule == yyy1->yyrule) { yyGLRState *yys0, *yys1; int yyn; for (yys0 = yyy0->yystate, yys1 = yyy1->yystate, yyn = yyrhsLength (yyy0->yyrule); yyn > 0; yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1) if (yys0->yyposn != yys1->yyposn) return yyfalse; return yytrue; } else return yyfalse; } /** Assuming identicalOptions (YYY0,YYY1), destructively merge the * alternative semantic values for the RHS-symbols of YYY1 and YYY0. */ static void yymergeOptionSets (yySemanticOption* yyy0, yySemanticOption* yyy1) { yyGLRState *yys0, *yys1; int yyn; for (yys0 = yyy0->yystate, yys1 = yyy1->yystate, yyn = yyrhsLength (yyy0->yyrule); 0 < yyn; yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1) { if (yys0 == yys1) break; else if (yys0->yyresolved) { yys1->yyresolved = yytrue; yys1->yysemantics.yysval = yys0->yysemantics.yysval; } else if (yys1->yyresolved) { yys0->yyresolved = yytrue; yys0->yysemantics.yysval = yys1->yysemantics.yysval; } else { yySemanticOption** yyz0p = &yys0->yysemantics.yyfirstVal; yySemanticOption* yyz1 = yys1->yysemantics.yyfirstVal; while (yytrue) { if (yyz1 == *yyz0p || yyz1 == YY_NULLPTR) break; else if (*yyz0p == YY_NULLPTR) { *yyz0p = yyz1; break; } else if (*yyz0p < yyz1) { yySemanticOption* yyz = *yyz0p; *yyz0p = yyz1; yyz1 = yyz1->yynext; (*yyz0p)->yynext = yyz; } yyz0p = &(*yyz0p)->yynext; } yys1->yysemantics.yyfirstVal = yys0->yysemantics.yyfirstVal; } } } /** Y0 and Y1 represent two possible actions to take in a given * parsing state; return 0 if no combination is possible, * 1 if user-mergeable, 2 if Y0 is preferred, 3 if Y1 is preferred. */ static int yypreference (yySemanticOption* y0, yySemanticOption* y1) { yyRuleNum r0 = y0->yyrule, r1 = y1->yyrule; int p0 = yydprec[r0], p1 = yydprec[r1]; if (p0 == p1) { if (yymerger[r0] == 0 || yymerger[r0] != yymerger[r1]) return 0; else return 1; } if (p0 == 0 || p1 == 0) return 0; if (p0 < p1) return 3; if (p1 < p0) return 2; return 0; } static YYRESULTTAG yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp, const char *what); /** Resolve the previous YYN states starting at and including state YYS * on *YYSTACKP. If result != yyok, some states may have been left * unresolved possibly with empty semantic option chains. Regardless * of whether result = yyok, each state has been left with consistent * data so that yydestroyGLRState can be invoked if necessary. */ static YYRESULTTAG yyresolveStates (yyGLRState* yys, int yyn, yyGLRStack* yystackp, const char *what) { if (0 < yyn) { YY_ASSERT (yys->yypred); YYCHK (yyresolveStates (yys->yypred, yyn-1, yystackp, what)); if (! yys->yyresolved) YYCHK (yyresolveValue (yys, yystackp, what)); } return yyok; } /** Resolve the states for the RHS of YYOPT on *YYSTACKP, perform its * user action, and return the semantic value and location in *YYVALP * and *YYLOCP. Regardless of whether result = yyok, all RHS states * have been destroyed (assuming the user action destroys all RHS * semantic values if invoked). */ static YYRESULTTAG yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystackp, YYSTYPE* yyvalp, YYLTYPE *yylocp, const char *what) { yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1]; int yynrhs = yyrhsLength (yyopt->yyrule); YYRESULTTAG yyflag = yyresolveStates (yyopt->yystate, yynrhs, yystackp, what); if (yyflag != yyok) { yyGLRState *yys; for (yys = yyopt->yystate; yynrhs > 0; yys = yys->yypred, yynrhs -= 1) yydestroyGLRState ("Cleanup: popping", yys, what); return yyflag; } yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yyopt->yystate; if (yynrhs == 0) /* Set default location. */ yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yyopt->yystate->yyloc; { int yychar_current = yychar; YYSTYPE yylval_current = yylval; YYLTYPE yylloc_current = yylloc; yychar = yyopt->yyrawchar; yylval = yyopt->yyval; yylloc = yyopt->yyloc; yyflag = yyuserAction (yyopt->yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, yystackp, yyvalp, yylocp, what); yychar = yychar_current; yylval = yylval_current; yylloc = yylloc_current; } return yyflag; } #if YYDEBUG static void yyreportTree (yySemanticOption* yyx, int yyindent) { int yynrhs = yyrhsLength (yyx->yyrule); int yyi; yyGLRState* yys; yyGLRState* yystates[1 + YYMAXRHS]; yyGLRState yyleftmost_state; for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred) yystates[yyi] = yys; if (yys == YY_NULLPTR) { yyleftmost_state.yyposn = 0; yystates[0] = &yyleftmost_state; } else yystates[0] = yys; if (yyx->yystate->yyposn < yys->yyposn + 1) YY_FPRINTF ((stderr, "%*s%s -> \n", yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)), yyx->yyrule - 1)); else YY_FPRINTF ((stderr, "%*s%s -> \n", yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)), yyx->yyrule - 1, YY_CAST (long, yys->yyposn + 1), YY_CAST (long, yyx->yystate->yyposn))); for (yyi = 1; yyi <= yynrhs; yyi += 1) { if (yystates[yyi]->yyresolved) { if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn) YY_FPRINTF ((stderr, "%*s%s \n", yyindent+2, "", yytokenName (yystos[yystates[yyi]->yylrState]))); else YY_FPRINTF ((stderr, "%*s%s \n", yyindent+2, "", yytokenName (yystos[yystates[yyi]->yylrState]), YY_CAST (long, yystates[yyi-1]->yyposn + 1), YY_CAST (long, yystates[yyi]->yyposn))); } else yyreportTree (yystates[yyi]->yysemantics.yyfirstVal, yyindent+2); } } #endif static YYRESULTTAG yyreportAmbiguity (yySemanticOption* yyx0, yySemanticOption* yyx1, YYLTYPE *yylocp, const char *what) { YYUSE (yyx0); YYUSE (yyx1); #if YYDEBUG YY_FPRINTF ((stderr, "Ambiguity detected.\n")); YY_FPRINTF ((stderr, "Option 1,\n")); yyreportTree (yyx0, 2); YY_FPRINTF ((stderr, "\nOption 2,\n")); yyreportTree (yyx1, 2); YY_FPRINTF ((stderr, "\n")); #endif yyerror (yylocp, what, YY_("syntax is ambiguous")); return yyabort; } /** Resolve the locations for each of the YYN1 states in *YYSTACKP, * ending at YYS1. Has no effect on previously resolved states. * The first semantic option of a state is always chosen. */ static void yyresolveLocations (yyGLRState *yys1, int yyn1, yyGLRStack *yystackp, const char *what) { if (0 < yyn1) { yyresolveLocations (yys1->yypred, yyn1 - 1, yystackp, what); if (!yys1->yyresolved) { yyGLRStackItem yyrhsloc[1 + YYMAXRHS]; int yynrhs; yySemanticOption *yyoption = yys1->yysemantics.yyfirstVal; YY_ASSERT (yyoption); yynrhs = yyrhsLength (yyoption->yyrule); if (0 < yynrhs) { yyGLRState *yys; int yyn; yyresolveLocations (yyoption->yystate, yynrhs, yystackp, what); for (yys = yyoption->yystate, yyn = yynrhs; yyn > 0; yys = yys->yypred, yyn -= 1) yyrhsloc[yyn].yystate.yyloc = yys->yyloc; } else { /* Both yyresolveAction and yyresolveLocations traverse the GSS in reverse rightmost order. It is only necessary to invoke yyresolveLocations on a subforest for which yyresolveAction would have been invoked next had an ambiguity not been detected. Thus the location of the previous state (but not necessarily the previous state itself) is guaranteed to be resolved already. */ yyGLRState *yyprevious = yyoption->yystate; yyrhsloc[0].yystate.yyloc = yyprevious->yyloc; } YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs); } } } /** Resolve the ambiguity represented in state YYS in *YYSTACKP, * perform the indicated actions, and set the semantic value of YYS. * If result != yyok, the chain of semantic options in YYS has been * cleared instead or it has been left unmodified except that * redundant options may have been removed. Regardless of whether * result = yyok, YYS has been left with consistent data so that * yydestroyGLRState can be invoked if necessary. */ static YYRESULTTAG yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp, const char *what) { yySemanticOption* yyoptionList = yys->yysemantics.yyfirstVal; yySemanticOption* yybest = yyoptionList; yySemanticOption** yypp; yybool yymerge = yyfalse; YYSTYPE yysval; YYRESULTTAG yyflag; YYLTYPE *yylocp = &yys->yyloc; for (yypp = &yyoptionList->yynext; *yypp != YY_NULLPTR; ) { yySemanticOption* yyp = *yypp; if (yyidenticalOptions (yybest, yyp)) { yymergeOptionSets (yybest, yyp); *yypp = yyp->yynext; } else { switch (yypreference (yybest, yyp)) { case 0: yyresolveLocations (yys, 1, yystackp, what); return yyreportAmbiguity (yybest, yyp, yylocp, what); break; case 1: yymerge = yytrue; break; case 2: break; case 3: yybest = yyp; yymerge = yyfalse; break; default: /* This cannot happen so it is not worth a YY_ASSERT (yyfalse), but some compilers complain if the default case is omitted. */ break; } yypp = &yyp->yynext; } } if (yymerge) { yySemanticOption* yyp; int yyprec = yydprec[yybest->yyrule]; yyflag = yyresolveAction (yybest, yystackp, &yysval, yylocp, what); if (yyflag == yyok) for (yyp = yybest->yynext; yyp != YY_NULLPTR; yyp = yyp->yynext) { if (yyprec == yydprec[yyp->yyrule]) { YYSTYPE yysval_other; YYLTYPE yydummy; yyflag = yyresolveAction (yyp, yystackp, &yysval_other, &yydummy, what); if (yyflag != yyok) { yydestruct ("Cleanup: discarding incompletely merged value for", yystos[yys->yylrState], &yysval, yylocp, what); break; } yyuserMerge (yymerger[yyp->yyrule], &yysval, &yysval_other); } } } else yyflag = yyresolveAction (yybest, yystackp, &yysval, yylocp, what); if (yyflag == yyok) { yys->yyresolved = yytrue; yys->yysemantics.yysval = yysval; } else yys->yysemantics.yyfirstVal = YY_NULLPTR; return yyflag; } static YYRESULTTAG yyresolveStack (yyGLRStack* yystackp, const char *what) { if (yystackp->yysplitPoint != YY_NULLPTR) { yyGLRState* yys; int yyn; for (yyn = 0, yys = yystackp->yytops.yystates[0]; yys != yystackp->yysplitPoint; yys = yys->yypred, yyn += 1) continue; YYCHK (yyresolveStates (yystackp->yytops.yystates[0], yyn, yystackp , what)); } return yyok; } static void yycompressStack (yyGLRStack* yystackp) { yyGLRState* yyp, *yyq, *yyr; if (yystackp->yytops.yysize != 1 || yystackp->yysplitPoint == YY_NULLPTR) return; for (yyp = yystackp->yytops.yystates[0], yyq = yyp->yypred, yyr = YY_NULLPTR; yyp != yystackp->yysplitPoint; yyr = yyp, yyp = yyq, yyq = yyp->yypred) yyp->yypred = yyr; yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems; yystackp->yynextFree = YY_REINTERPRET_CAST (yyGLRStackItem*, yystackp->yysplitPoint) + 1; yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems; yystackp->yysplitPoint = YY_NULLPTR; yystackp->yylastDeleted = YY_NULLPTR; while (yyr != YY_NULLPTR) { yystackp->yynextFree->yystate = *yyr; yyr = yyr->yypred; yystackp->yynextFree->yystate.yypred = &yystackp->yynextFree[-1].yystate; yystackp->yytops.yystates[0] = &yystackp->yynextFree->yystate; yystackp->yynextFree += 1; yystackp->yyspaceLeft -= 1; } } static YYRESULTTAG yyprocessOneStack (yyGLRStack* yystackp, ptrdiff_t yyk, ptrdiff_t yyposn, YYLTYPE *yylocp, const char *what) { while (yystackp->yytops.yystates[yyk] != YY_NULLPTR) { yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState; YY_DPRINTF ((stderr, "Stack %ld Entering state %d\n", YY_CAST (long, yyk), yystate)); YY_ASSERT (yystate != YYFINAL); if (yyisDefaultedState (yystate)) { YYRESULTTAG yyflag; yyRuleNum yyrule = yydefaultAction (yystate); if (yyrule == 0) { YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yyk))); yymarkStackDeleted (yystackp, yyk); return yyok; } yyflag = yyglrReduce (yystackp, yyk, yyrule, yyimmediate[yyrule], what); if (yyflag == yyerr) { YY_DPRINTF ((stderr, "Stack %ld dies " "(predicate failure or explicit user error).\n", YY_CAST (long, yyk))); yymarkStackDeleted (yystackp, yyk); return yyok; } if (yyflag != yyok) return yyflag; } else { yySymbol yytoken = yygetToken (&yychar, yystackp, what); const short* yyconflicts; const int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts); yystackp->yytops.yylookaheadNeeds[yyk] = yytrue; while (*yyconflicts != 0) { YYRESULTTAG yyflag; ptrdiff_t yynewStack = yysplitStack (yystackp, yyk); YY_DPRINTF ((stderr, "Splitting off stack %ld from %ld.\n", YY_CAST (long, yynewStack), YY_CAST (long, yyk))); yyflag = yyglrReduce (yystackp, yynewStack, *yyconflicts, yyimmediate[*yyconflicts], what); if (yyflag == yyok) YYCHK (yyprocessOneStack (yystackp, yynewStack, yyposn, yylocp, what)); else if (yyflag == yyerr) { YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yynewStack))); yymarkStackDeleted (yystackp, yynewStack); } else return yyflag; yyconflicts += 1; } if (yyisShiftAction (yyaction)) break; else if (yyisErrorAction (yyaction)) { YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yyk))); yymarkStackDeleted (yystackp, yyk); break; } else { YYRESULTTAG yyflag = yyglrReduce (yystackp, yyk, -yyaction, yyimmediate[-yyaction], what); if (yyflag == yyerr) { YY_DPRINTF ((stderr, "Stack %ld dies " "(predicate failure or explicit user error).\n", YY_CAST (long, yyk))); yymarkStackDeleted (yystackp, yyk); break; } else if (yyflag != yyok) return yyflag; } } } return yyok; } static void yyreportSyntaxError (yyGLRStack* yystackp, const char *what) { if (yystackp->yyerrState != 0) return; #if ! YYERROR_VERBOSE yyerror (&yylloc, what, YY_("syntax error")); #else { yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); yybool yysize_overflow = yyfalse; char* yymsg = YY_NULLPTR; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", one per "expected"). */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Actual size of YYARG. */ int yycount = 0; /* Cumulated lengths of YYARG. */ ptrdiff_t yysize = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[yystackp->yytops.yystates[0]->yylrState]; ptrdiff_t yysize0 = yytnamerr (YY_NULLPTR, yytokenName (yytoken)); yysize = yysize0; yyarg[yycount++] = yytokenName (yytoken); if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytokenName (yyx); { ptrdiff_t yysz = yytnamerr (YY_NULLPTR, yytokenName (yyx)); if (YYSIZEMAX - yysize < yysz) yysize_overflow = yytrue; else yysize += yysz; } } } } switch (yycount) { #define YYCASE_(N, S) \ case N: \ yyformat = S; \ break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ } { /* Don't count the "%s"s in the final size, but reserve room for the terminator. */ ptrdiff_t yysz = YY_CAST (ptrdiff_t, strlen (yyformat)) - 2 * yycount + 1; if (YYSIZEMAX - yysize < yysz) yysize_overflow = yytrue; else yysize += yysz; } if (!yysize_overflow) yymsg = YY_CAST (char *, YYMALLOC (YY_CAST (size_t, yysize))); if (yymsg) { char *yyp = yymsg; int yyi = 0; while ((*yyp = *yyformat)) { if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { ++yyp; ++yyformat; } } yyerror (&yylloc, what, yymsg); YYFREE (yymsg); } else { yyerror (&yylloc, what, YY_("syntax error")); yyMemoryExhausted (yystackp); } } #endif /* YYERROR_VERBOSE */ yynerrs += 1; } /* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP, yylval, and yylloc are the syntactic category, semantic value, and location of the lookahead. */ static void yyrecoverSyntaxError (yyGLRStack* yystackp, const char *what) { if (yystackp->yyerrState == 3) /* We just shifted the error token and (perhaps) took some reductions. Skip tokens until we can proceed. */ while (yytrue) { yySymbol yytoken; int yyj; if (yychar == YYEOF) yyFail (yystackp, &yylloc, what, YY_NULLPTR); if (yychar != YYEMPTY) { /* We throw away the lookahead, but the error range of the shifted error token must take it into account. */ yyGLRState *yys = yystackp->yytops.yystates[0]; yyGLRStackItem yyerror_range[3]; yyerror_range[1].yystate.yyloc = yys->yyloc; yyerror_range[2].yystate.yyloc = yylloc; YYLLOC_DEFAULT ((yys->yyloc), yyerror_range, 2); yytoken = YYTRANSLATE (yychar); yydestruct ("Error: discarding", yytoken, &yylval, &yylloc, what); yychar = YYEMPTY; } yytoken = yygetToken (&yychar, yystackp, what); yyj = yypact[yystackp->yytops.yystates[0]->yylrState]; if (yypact_value_is_default (yyj)) return; yyj += yytoken; if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken) { if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0) return; } else if (! yytable_value_is_error (yytable[yyj])) return; } /* Reduce to one stack. */ { ptrdiff_t yyk; for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1) if (yystackp->yytops.yystates[yyk] != YY_NULLPTR) break; if (yyk >= yystackp->yytops.yysize) yyFail (yystackp, &yylloc, what, YY_NULLPTR); for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1) yymarkStackDeleted (yystackp, yyk); yyremoveDeletes (yystackp); yycompressStack (yystackp); } /* Now pop stack until we find a state that shifts the error token. */ yystackp->yyerrState = 3; while (yystackp->yytops.yystates[0] != YY_NULLPTR) { yyGLRState *yys = yystackp->yytops.yystates[0]; int yyj = yypact[yys->yylrState]; if (! yypact_value_is_default (yyj)) { yyj += YYTERROR; if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR && yyisShiftAction (yytable[yyj])) { /* Shift the error token. */ int yyaction = yytable[yyj]; /* First adjust its location.*/ YYLTYPE yyerrloc; yystackp->yyerror_range[2].yystate.yyloc = yylloc; YYLLOC_DEFAULT (yyerrloc, (yystackp->yyerror_range), 2); YY_SYMBOL_PRINT ("Shifting", yystos[yyaction], &yylval, &yyerrloc); yyglrShift (yystackp, 0, yyaction, yys->yyposn, &yylval, &yyerrloc); yys = yystackp->yytops.yystates[0]; break; } } yystackp->yyerror_range[1].yystate.yyloc = yys->yyloc; if (yys->yypred != YY_NULLPTR) yydestroyGLRState ("Error: popping", yys, what); yystackp->yytops.yystates[0] = yys->yypred; yystackp->yynextFree -= 1; yystackp->yyspaceLeft += 1; } if (yystackp->yytops.yystates[0] == YY_NULLPTR) yyFail (yystackp, &yylloc, what, YY_NULLPTR); } #define YYCHK1(YYE) \ do { \ switch (YYE) { \ case yyok: \ break; \ case yyabort: \ goto yyabortlab; \ case yyaccept: \ goto yyacceptlab; \ case yyerr: \ goto yyuser_error; \ default: \ goto yybuglab; \ } \ } while (0) /*----------. | yyparse. | `----------*/ int yyparse (const char *what) { int yyresult; yyGLRStack yystack; yyGLRStack* const yystackp = &yystack; ptrdiff_t yyposn; YY_DPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; yylval = yyval_default; yylloc = yyloc_default; if (! yyinitGLRStack (yystackp, YYINITDEPTH)) goto yyexhaustedlab; switch (YYSETJMP (yystack.yyexception_buffer)) { case 0: break; case 1: goto yyabortlab; case 2: goto yyexhaustedlab; default: goto yybuglab; } yyglrShift (&yystack, 0, 0, 0, &yylval, &yylloc); yyposn = 0; while (yytrue) { /* For efficiency, we have two loops, the first of which is specialized to deterministic operation (single stack, no potential ambiguity). */ /* Standard mode */ while (yytrue) { yyStateNum yystate = yystack.yytops.yystates[0]->yylrState; YY_DPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) goto yyacceptlab; if (yyisDefaultedState (yystate)) { yyRuleNum yyrule = yydefaultAction (yystate); if (yyrule == 0) { yystack.yyerror_range[1].yystate.yyloc = yylloc; yyreportSyntaxError (&yystack, what); goto yyuser_error; } YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue, what)); } else { yySymbol yytoken = yygetToken (&yychar, yystackp, what); const short* yyconflicts; int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts); if (*yyconflicts != 0) break; if (yyisShiftAction (yyaction)) { YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yychar = YYEMPTY; yyposn += 1; yyglrShift (&yystack, 0, yyaction, yyposn, &yylval, &yylloc); if (0 < yystack.yyerrState) yystack.yyerrState -= 1; } else if (yyisErrorAction (yyaction)) { yystack.yyerror_range[1].yystate.yyloc = yylloc; yyreportSyntaxError (&yystack, what); goto yyuser_error; } else YYCHK1 (yyglrReduce (&yystack, 0, -yyaction, yytrue, what)); } } while (yytrue) { yySymbol yytoken_to_shift; ptrdiff_t yys; for (yys = 0; yys < yystack.yytops.yysize; yys += 1) yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY; /* yyprocessOneStack returns one of three things: - An error flag. If the caller is yyprocessOneStack, it immediately returns as well. When the caller is finally yyparse, it jumps to an error label via YYCHK1. - yyok, but yyprocessOneStack has invoked yymarkStackDeleted (&yystack, yys), which sets the top state of yys to NULL. Thus, yyparse's following invocation of yyremoveDeletes will remove the stack. - yyok, when ready to shift a token. Except in the first case, yyparse will invoke yyremoveDeletes and then shift the next token onto all remaining stacks. This synchronization of the shift (that is, after all preceding reductions on all stacks) helps prevent double destructor calls on yylval in the event of memory exhaustion. */ for (yys = 0; yys < yystack.yytops.yysize; yys += 1) YYCHK1 (yyprocessOneStack (&yystack, yys, yyposn, &yylloc, what)); yyremoveDeletes (&yystack); if (yystack.yytops.yysize == 0) { yyundeleteLastStack (&yystack); if (yystack.yytops.yysize == 0) yyFail (&yystack, &yylloc, what, YY_("syntax error")); YYCHK1 (yyresolveStack (&yystack, what)); YY_DPRINTF ((stderr, "Returning to deterministic operation.\n")); yystack.yyerror_range[1].yystate.yyloc = yylloc; yyreportSyntaxError (&yystack, what); goto yyuser_error; } /* If any yyglrShift call fails, it will fail after shifting. Thus, a copy of yylval will already be on stack 0 in the event of a failure in the following loop. Thus, yychar is set to YYEMPTY before the loop to make sure the user destructor for yylval isn't called twice. */ yytoken_to_shift = YYTRANSLATE (yychar); yychar = YYEMPTY; yyposn += 1; for (yys = 0; yys < yystack.yytops.yysize; yys += 1) { yyStateNum yystate = yystack.yytops.yystates[yys]->yylrState; const short* yyconflicts; int yyaction = yygetLRActions (yystate, yytoken_to_shift, &yyconflicts); /* Note that yyconflicts were handled by yyprocessOneStack. */ YY_DPRINTF ((stderr, "On stack %ld, ", YY_CAST (long, yys))); YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc); yyglrShift (&yystack, yys, yyaction, yyposn, &yylval, &yylloc); YY_DPRINTF ((stderr, "Stack %ld now in state #%d\n", YY_CAST (long, yys), yystack.yytops.yystates[yys]->yylrState)); } if (yystack.yytops.yysize == 1) { YYCHK1 (yyresolveStack (&yystack, what)); YY_DPRINTF ((stderr, "Returning to deterministic operation.\n")); yycompressStack (&yystack); break; } } continue; yyuser_error: yyrecoverSyntaxError (&yystack, what); yyposn = yystack.yytops.yystates[0]->yyposn; } yyacceptlab: yyresult = 0; goto yyreturn; yybuglab: YY_ASSERT (yyfalse); goto yyabortlab; yyabortlab: yyresult = 1; goto yyreturn; yyexhaustedlab: yyerror (&yylloc, what, YY_("memory exhausted")); yyresult = 2; goto yyreturn; yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", YYTRANSLATE (yychar), &yylval, &yylloc, what); /* If the stack is well-formed, pop the stack until it is empty, destroying its entries as we go. But free the stack regardless of whether it is well-formed. */ if (yystack.yyitems) { yyGLRState** yystates = yystack.yytops.yystates; if (yystates) { ptrdiff_t yysize = yystack.yytops.yysize; ptrdiff_t yyk; for (yyk = 0; yyk < yysize; yyk += 1) if (yystates[yyk]) { while (yystates[yyk]) { yyGLRState *yys = yystates[yyk]; yystack.yyerror_range[1].yystate.yyloc = yys->yyloc; if (yys->yypred != YY_NULLPTR) yydestroyGLRState ("Cleanup: popping", yys, what); yystates[yyk] = yys->yypred; yystack.yynextFree -= 1; yystack.yyspaceLeft += 1; } break; } } yyfreeGLRStack (&yystack); } return yyresult; } /* DEBUGGING ONLY */ #if YYDEBUG static void yy_yypstack (yyGLRState* yys) { if (yys->yypred) { yy_yypstack (yys->yypred); YY_FPRINTF ((stderr, " -> ")); } YY_FPRINTF ((stderr, "%d@%ld", yys->yylrState, YY_CAST (long, yys->yyposn))); } static void yypstates (yyGLRState* yyst) { if (yyst == YY_NULLPTR) YY_FPRINTF ((stderr, "")); else yy_yypstack (yyst); YY_FPRINTF ((stderr, "\n")); } static void yypstack (yyGLRStack* yystackp, ptrdiff_t yyk) { yypstates (yystackp->yytops.yystates[yyk]); } static void yypdumpstack (yyGLRStack* yystackp) { #define YYINDEX(YYX) \ YY_CAST (long, \ ((YYX) \ ? YY_REINTERPRET_CAST (yyGLRStackItem*, (YYX)) - yystackp->yyitems \ : -1)) yyGLRStackItem* yyp; for (yyp = yystackp->yyitems; yyp < yystackp->yynextFree; yyp += 1) { YY_FPRINTF ((stderr, "%3ld. ", YY_CAST (long, yyp - yystackp->yyitems))); if (*YY_REINTERPRET_CAST (yybool *, yyp)) { YY_ASSERT (yyp->yystate.yyisState); YY_ASSERT (yyp->yyoption.yyisState); YY_FPRINTF ((stderr, "Res: %d, LR State: %d, posn: %ld, pred: %ld", yyp->yystate.yyresolved, yyp->yystate.yylrState, YY_CAST (long, yyp->yystate.yyposn), YYINDEX (yyp->yystate.yypred))); if (! yyp->yystate.yyresolved) YY_FPRINTF ((stderr, ", firstVal: %ld", YYINDEX (yyp->yystate.yysemantics.yyfirstVal))); } else { YY_ASSERT (!yyp->yystate.yyisState); YY_ASSERT (!yyp->yyoption.yyisState); YY_FPRINTF ((stderr, "Option. rule: %d, state: %ld, next: %ld", yyp->yyoption.yyrule - 1, YYINDEX (yyp->yyoption.yystate), YYINDEX (yyp->yyoption.yynext))); } YY_FPRINTF ((stderr, "\n")); } YY_FPRINTF ((stderr, "Tops:")); { ptrdiff_t yyi; for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1) YY_FPRINTF ((stderr, "%ld: %ld; ", YY_CAST (long, yyi), YYINDEX (yystackp->yytops.yystates[yyi]))); YY_FPRINTF ((stderr, "\n")); } #undef YYINDEX } #endif #undef yylval #undef yychar #undef yynerrs #undef yylloc #line 1013 "../lexer/theme-parser.y" rofi-1.7.1/lexer/theme-parser.y0000644000175100001710000010371114150243117013303 00000000000000/* * rofi * * MIT/X11 License * Copyright 2013-2017 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ %define api.pure %define parse.error verbose %locations %glr-parser %skeleton "glr.c" %parse-param {const char *what} %code requires { #include "theme.h" #include "xrmoptions.h" #include "css-colors.h" #include "rofi.h" typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; char *filename; } YYLTYPE; # define YYLTYPE_IS_DECLARED 1 /* alert the parser that we have our own definition */ # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ (Current).filename = YYRHSLOC (Rhs, 1).filename; \ } \ else \ { /* empty RHS */ \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ (Current).filename = NULL; /* new */ \ } \ while (0) } %{ #include "config.h" #include #include #include #include "theme-parser.h" ThemeWidget *rofi_theme = NULL; void yyerror(YYLTYPE *yylloc, const char *what, const char* s); int yylex (YYSTYPE *, YYLTYPE *); static int check_in_range ( double index, double low, double high, YYLTYPE *loc ) { if ( index > high || index < low ) { gchar *str = g_strdup_printf("Value out of range: \n\t\tValue: X = %.2lf;\n\t\tRange: %.2lf <= X <= %.2lf.", index, low, high ); yyerror ( loc, loc->filename, str); g_free(str); return FALSE; } return TRUE; } static double hue2rgb ( double p, double q, double t ) { t += (t<0)?1.0:0.0; t -= (t>1)?1.0:0.0; if ( t < (1/6.0) ) { return p + (q - p) * 6 * t; } if ( t < (1/2.0) ) { return q; } if ( t < (2/3.0) ) { return p + (q - p) * (2/3.0 - t) * 6; } return p; } static ThemeColor hsl_to_rgb ( double h, double s, double l ) { ThemeColor colour; colour.alpha = 1.0; if (s < 0.001 && s > -0.001) { colour.red = colour.green = colour.blue = l; // achromatic } else { double q = l < 0.5 ? l * (1 + s) : l + s - l * s; double p = 2 * l - q; colour.red = hue2rgb(p, q, h + 1/3.0); colour.green = hue2rgb(p, q, h); colour.blue = hue2rgb(p, q, h - 1/3.0); } return colour; } static ThemeColor hwb_to_rgb ( double h, double w, double b ) { ThemeColor retv = hsl_to_rgb ( h, 1.0, 0.5); retv.red *= ( 1. - w - b ); retv.red += w; retv.green *= ( 1. - w - b ); retv.green += w; retv.blue *= ( 1. - w - b ); retv.blue += w; return retv; } %} %union { int ival; double fval; char *sval; char cval; int bval; WindowLocation wloc; ThemeColor colorval; ThemeWidget *theme; GList *list; Property *property; GHashTable *property_list; RofiDistance distance; RofiDistanceUnit *distance_unit; } %token T_END 0 "end of file" %token T_ERROR 1 "error from file parser" %token T_ERROR_PROPERTY 2 "invalid property value" %token T_ERROR_SECTION 3 "invalid property name" %token T_ERROR_NAMESTRING 4 "invalid element name" %token T_ERROR_DEFAULTS 5 "invalid defaults name" %token T_ERROR_INCLUDE 6 "invalid import value" %token T_ERROR_ARGB_SPEC 7 "invalid argb color. Requires 8 (not 7) elements: argb:AARRGGBB." %token T_INT "Integer number" %token T_DOUBLE "Floating-point number" %token T_STRING "UTF-8 encoded string" %token T_CHAR "Character" %token T_PROP_NAME "property name" %token T_COLOR_NAME "Color value by name" %token T_NAME_ELEMENT "Element name" %token T_BOOLEAN "Boolean value (true or false)" %token T_COLOR "Hexidecimal color value" %token T_LINK "Reference" %token T_ELEMENT "Name of element" %token T_POS_CENTER "Center" %token T_POS_EAST "East" %token T_POS_WEST "West" %token T_POS_NORTH "North" %token T_POS_SOUTH "South" %token T_MEDIA "@media" %token T_NONE "None" %token T_BOLD "Bold" %token T_ITALIC "Italic" %token T_UNDERLINE "Underline" %token T_STRIKETHROUGH "Strikethrough" %token T_SMALLCAPS "Small CAPS" %token T_DASH "Dash" %token T_SOLID "Solid" %token T_UNIT_PX "pixels" %token T_UNIT_MM "mm" %token T_UNIT_EM "em" %token T_UNIT_CH "ch" %token T_UNIT_PERCENT "%" %token T_ANGLE_DEG "Degrees" %token T_ANGLE_GRAD "Gradians" %token T_ANGLE_RAD "Radians" %token T_ANGLE_TURN "Turns" %token ORIENTATION_HORI "Horizontal" %token ORIENTATION_VERT "Vertical" %token CURSOR_DEF "Default" %token CURSOR_PTR "Pointer" %token CURSOR_TXT "Text" %token T_COL_RGBA "rgb[a] colorscheme" %token T_COL_HSL "hsl colorscheme" %token T_COL_HWB "hwb colorscheme" %token T_COL_CMYK "cmyk colorscheme" %token T_URL "an URL" %token T_WIDTH "an WIDTH" %token T_HEIGHT "an HEIGHT" %token T_BOTH "an BOTH" %token T_TO "an TO" %token T_LEFT "an LEFT" %token T_RIGHT "an RIGHT" %token T_TOP "an TOP" %token T_BOTTOM "an BOTTOM" %type t_property_direction %type t_property_scale_type %token T_LINEAR_GRADIENT "a linear gradient" %token T_PARENT_LEFT "Parent left ('(')" %token T_PARENT_RIGHT "Parent right (')')" %token T_COMMA "comma separator (',')" %token T_OPTIONAL_COMMA "Optional comma separator (',')" %token T_FORWARD_SLASH "forward slash ('/')" %token T_PERCENT "Percent sign ('%')" %token T_LIST_OPEN "List open ('[')" %token T_LIST_CLOSE "List close (']')" %token T_MODIFIER_ADD "Add ('+')" %token T_MODIFIER_SUBTRACT "Subtract ('-')" %token T_MODIFIER_MULTIPLY "Multiply ('*')" %token T_MODIFIER_MAX "Max ('max')" %token T_MODIFIER_MIN "Min ('min')" %token T_CALC "calc" %token T_BOPEN "bracket open ('{')" %token T_BCLOSE "bracket close ('}')" %token T_PSEP "property separator (':')" %token T_PCLOSE "property close (';')" %token T_NSEP "Name separator (' ' or '.')" %token T_SSEP "Selector separator (',')" %token T_NAME_PREFIX "Element section ('# {name} { ... }')" %token T_WHITESPACE "White space" %token T_PDEFAULTS "Default settings section ( '* { ... }')" %token T_CONFIGURATION "Configuration block" %token T_RESET_THEME "Reset Theme" %token T_COLOR_TRANSPARENT "Transparent" %token T_INHERIT "Inherit" %token T_MEDIA_WIDTH "Width" %token T_MEDIA_HEIGHT "Height" %token T_MEDIA_MIN "Min" %token T_MEDIA_MONITOR_ID "Monitor-ID" %token T_MEDIA_MAX "Max" %token T_MEDIA_SEP "-" %token T_VAR_START "var" %token T_ENV_START "env" %type t_entry_list %type t_entry_list_included %type t_entry_name_path %type t_entry_name_path_selectors %type t_color_list %type t_property %type t_property_element %type t_property_list %type t_property_list_optional %type t_property_color %type t_property_color_value %type t_property_color_opt_alpha_c %type t_property_color_opt_alpha_ws %type t_property_color_value_unit %type t_property_color_value_angle %type t_property_name %type t_property_distance %type t_property_distance_zero %type t_property_distance_unit_math %type t_property_distance_unit_math2 %type t_property_distance_unit_math3 %type t_property_distance_unit %type t_property_unit %type t_property_position %type t_property_position_ew %type t_property_position_sn %type t_property_highlight_styles %type t_property_highlight_style %type t_property_line_style %type t_property_element_list %type t_property_element_list_optional %type t_property_orientation %type t_property_cursor %type t_name_prefix_optional %start t_main %% /** * First have the configuration blocks, then the theme. */ t_main : t_configuration_list t_entry_list_included { // Dummy at this point. if ( rofi_theme == NULL ) { rofi_theme_reset(); } rofi_theme_widget_add_properties ( rofi_theme, $2->properties ); for ( unsigned int i = 0; i < $2->num_widgets; i++ ) { ThemeWidget *d = $2->widgets[i]; rofi_theme_parse_merge_widgets(rofi_theme, d); } rofi_theme_free ( $2 ); } ; t_configuration_list: %empty { if ( rofi_configuration == NULL ) { rofi_configuration = g_slice_new0 ( ThemeWidget ); rofi_configuration->name = g_strdup ( "Root" ); } } | t_configuration_list T_CONFIGURATION T_BOPEN t_config_property_list_optional T_BCLOSE {}; /** * Small dummy object to make the prefix optional. */ t_name_prefix_optional : T_NAME_PREFIX {} | %empty {} ; t_entry_list_included: t_entry_list { $$ =$1; } | t_entry_list_included T_RESET_THEME t_entry_list { rofi_theme_reset(); rofi_theme_free($1); $$ = $3; } t_entry_list: %empty { $$ = g_slice_new0 ( ThemeWidget ); } | t_entry_list t_name_prefix_optional t_entry_name_path_selectors T_BOPEN t_property_list_optional T_BCLOSE { for ( GList *liter = g_list_first ( $3); liter; liter = g_list_next ( liter ) ) { ThemeWidget *widget = $1; for ( GList *iter = g_list_first ( (GList*)liter->data ); widget && iter ; iter = g_list_next ( iter ) ) { widget = rofi_theme_find_or_create_name ( widget, iter->data ); } g_list_free_full ( (GList*)liter->data, g_free ); widget->set = TRUE; rofi_theme_widget_add_properties ( widget, $5); } if ( $5 ) { g_hash_table_destroy ( $5 ); } g_list_free ( $3 ); } | t_entry_list T_PDEFAULTS T_BOPEN t_property_list_optional T_BCLOSE { ThemeWidget *widget = rofi_theme_find_or_create_name ( $1, "*" ); rofi_theme_widget_add_properties (widget, $4); if ( $4 ) { g_hash_table_destroy ( $4 ); } } | t_entry_list T_MEDIA T_PARENT_LEFT T_STRING T_PSEP T_INT T_PARENT_RIGHT T_BOPEN t_entry_list T_BCLOSE { gchar *name = g_strdup_printf("@media ( %s: %d )",$4, $6); ThemeWidget *widget = rofi_theme_find_or_create_name ( $1, name ); widget->set = TRUE; widget->media = g_slice_new0(ThemeMedia); widget->media->type = rofi_theme_parse_media_type ( $4 ); widget->media->value = (double)$6; for ( unsigned int i = 0; i < $9->num_widgets; i++ ) { ThemeWidget *d = $9->widgets[i]; rofi_theme_parse_merge_widgets(widget, d); } g_free ( $4 ); g_free ( name ); } | t_entry_list T_MEDIA T_PARENT_LEFT T_STRING T_PSEP T_DOUBLE T_PARENT_RIGHT T_BOPEN t_entry_list T_BCLOSE { gchar *name = g_strdup_printf("@media ( %s: %f )",$4, $6); ThemeWidget *widget = rofi_theme_find_or_create_name ( $1, name ); widget->set = TRUE; widget->media = g_slice_new0(ThemeMedia); widget->media->type = rofi_theme_parse_media_type ( $4 ); widget->media->value = $6; for ( unsigned int i = 0; i < $9->num_widgets; i++ ) { ThemeWidget *d = $9->widgets[i]; rofi_theme_parse_merge_widgets(widget, d); } g_free ( $4 ); g_free ( name ); } | t_entry_list T_MEDIA T_PARENT_LEFT T_STRING T_PSEP T_INT T_UNIT_PX T_PARENT_RIGHT T_BOPEN t_entry_list T_BCLOSE { gchar *name = g_strdup_printf("@media ( %s: %d px )",$4, $6); ThemeWidget *widget = rofi_theme_find_or_create_name ( $1, name ); widget->set = TRUE; widget->media = g_slice_new0(ThemeMedia); widget->media->type = rofi_theme_parse_media_type ( $4 ); widget->media->value = (double)$6; for ( unsigned int i = 0; i < $10->num_widgets; i++ ) { ThemeWidget *d = $10->widgets[i]; rofi_theme_parse_merge_widgets(widget, d); } g_free ( $4 ); g_free ( name ); } ; t_config_property_list_optional : %empty {} | t_config_property_list ; t_config_property_list : t_config_property { } | t_config_property_list t_config_property { }; t_config_property : t_property { char *error = NULL; if ( config_parse_set_property ( $1, &error ) ) { // TODO Generate error. #ifdef FATAL_CONFIG_ERROR yyerror ( &(@$), @$.filename, error ); #else g_warning("%s:%d:%d: %s\n", @$.filename, @$.first_line, @$.first_column, error); GString *str = g_string_new(""); g_string_append_printf(str,"%s:%d:%d: %s\n", @$.filename, @$.first_line, @$.first_column, error); rofi_add_error_message(str); #endif g_free(error); } // We don't keep any reference to this after this point, so the property can be free'ed. rofi_theme_property_free ( $1 ); } | t_property_name T_BOPEN t_property_list_optional T_BCLOSE { ThemeWidget *widget = rofi_configuration; widget = rofi_theme_find_or_create_name ( widget, $1 ); widget->set = TRUE; rofi_theme_widget_add_properties ( widget, $3); if ( $3 ) { g_hash_table_destroy ( $3 ); } g_free ( $1 ); } ; /** * properties */ t_property_list_optional : %empty { $$ = NULL; } | t_property_list { $$ = $1; } ; t_property_list: t_property { $$ = g_hash_table_new_full ( g_str_hash, g_str_equal, NULL, (GDestroyNotify)rofi_theme_property_free ); g_hash_table_replace ( $$, $1->name, $1 ); } | t_property_list t_property { // Old will be free'ed, and key/value will be replaced. g_hash_table_replace ( $$, $2->name, $2 ); } ; t_property : t_property_name T_PSEP t_property_element T_PCLOSE { $$ = $3; $$->name = $1; } | t_property_name T_PSEP T_VAR_START T_PARENT_LEFT T_ELEMENT T_PARENT_RIGHT T_PCLOSE{ $$ = rofi_theme_property_create ( P_LINK ); $$->name = $1; $$->value.link.name = $5; } | t_property_name T_PSEP T_VAR_START T_PARENT_LEFT T_ELEMENT T_COMMA t_property_element T_PARENT_RIGHT T_PCLOSE{ $$ = rofi_theme_property_create ( P_LINK ); $$->name = $1; $$->value.link.name = $5; $$->value.link.def_value = $7; } | t_property_name T_PSEP T_ENV_START T_PARENT_LEFT T_COMMA t_property_element T_PARENT_RIGHT T_PCLOSE { $$ = $6; $$->name = $1; } | t_property_name T_PSEP T_ENV_START T_PARENT_LEFT t_property_element T_COMMA t_property_element T_PARENT_RIGHT T_PCLOSE { $$ = $5; $$->name = $1; } t_property_element : T_INHERIT { $$ = rofi_theme_property_create ( P_INHERIT ); } | T_INT { $$ = rofi_theme_property_create ( P_INTEGER ); $$->value.i = $1; } | T_DOUBLE { $$ = rofi_theme_property_create ( P_DOUBLE ); $$->value.f = $1; } | T_STRING { $$ = rofi_theme_property_create ( P_STRING ); $$->value.s = $1; } | T_CHAR { $$ = rofi_theme_property_create ( P_CHAR ); $$->value.c = $1; } | T_LINK { $$ = rofi_theme_property_create ( P_LINK ); $$->value.link.name = $1; } | T_BOOLEAN { $$ = rofi_theme_property_create ( P_BOOLEAN ); $$->value.b = $1; } | t_property_distance { $$ = rofi_theme_property_create ( P_PADDING ); $$->value.padding = (RofiPadding){ $1, rofi_theme_property_copy_distance($1), rofi_theme_property_copy_distance($1), rofi_theme_property_copy_distance($1) }; } | t_property_distance_zero t_property_distance_zero { $$ = rofi_theme_property_create ( P_PADDING ); $$->value.padding = (RofiPadding){ $1, $2, rofi_theme_property_copy_distance($1), rofi_theme_property_copy_distance($2) }; } | t_property_distance_zero t_property_distance_zero t_property_distance_zero { $$ = rofi_theme_property_create ( P_PADDING ); $$->value.padding = (RofiPadding){ $1, $2, $3, rofi_theme_property_copy_distance($2) }; } | t_property_distance_zero t_property_distance_zero t_property_distance_zero t_property_distance_zero { $$ = rofi_theme_property_create ( P_PADDING ); $$->value.padding = (RofiPadding){ $1, $2, $3, $4 }; } | t_property_position { $$ = rofi_theme_property_create ( P_POSITION ); $$->value.i = $1; } | t_property_highlight_styles t_property_color { $$ = rofi_theme_property_create ( P_HIGHLIGHT ); $$->value.highlight.style = $1|ROFI_HL_COLOR; $$->value.highlight.color = $2; } | t_property_highlight_styles { $$ = rofi_theme_property_create ( P_HIGHLIGHT ); $$->value.highlight.style = $1; } | t_property_color { $$ = rofi_theme_property_create ( P_COLOR ); $$->value.color = $1; } | T_LIST_OPEN t_property_element_list_optional T_LIST_CLOSE { $$ = rofi_theme_property_create ( P_LIST ); $$->value.list = $2; } | t_property_orientation { $$ = rofi_theme_property_create ( P_ORIENTATION ); $$->value.i = $1; } | t_property_cursor { $$ = rofi_theme_property_create ( P_CURSOR ); $$->value.i = $1; } | T_URL T_PARENT_LEFT T_STRING T_PARENT_RIGHT { $$ = rofi_theme_property_create ( P_IMAGE ); $$->value.image.type = ROFI_IMAGE_URL; $$->value.image.url = $3; } | T_URL T_PARENT_LEFT T_STRING T_COMMA t_property_scale_type T_PARENT_RIGHT { $$ = rofi_theme_property_create ( P_IMAGE ); $$->value.image.type = ROFI_IMAGE_URL; $$->value.image.url = $3; $$->value.image.scaling = $5; } | T_LINEAR_GRADIENT T_PARENT_LEFT t_color_list T_PARENT_RIGHT { $$ = rofi_theme_property_create ( P_IMAGE ); $$->value.image.type = ROFI_IMAGE_LINEAR_GRADIENT; $$->value.image.dir = ROFI_DIRECTION_RIGHT; $$->value.image.colors = $3; } | T_LINEAR_GRADIENT T_PARENT_LEFT T_TO t_property_direction T_COMMA t_color_list T_PARENT_RIGHT { $$ = rofi_theme_property_create ( P_IMAGE ); $$->value.image.type = ROFI_IMAGE_LINEAR_GRADIENT; $$->value.image.dir = $4; $$->value.image.colors = $6; } | T_LINEAR_GRADIENT T_PARENT_LEFT t_property_color_value_angle T_COMMA t_color_list T_PARENT_RIGHT { $$ = rofi_theme_property_create ( P_IMAGE ); $$->value.image.type = ROFI_IMAGE_LINEAR_GRADIENT; $$->value.image.dir = ROFI_DIRECTION_ANGLE; $$->value.image.angle = $3; $$->value.image.colors = $5; } ; t_property_direction : T_RIGHT { $$ = ROFI_DIRECTION_RIGHT; } | T_LEFT { $$ = ROFI_DIRECTION_LEFT; } | T_TOP { $$ = ROFI_DIRECTION_TOP; } | T_BOTTOM { $$ = ROFI_DIRECTION_BOTTOM; } ; t_property_scale_type : T_BOTH { $$ = ROFI_SCALE_BOTH; } | T_WIDTH { $$ = ROFI_SCALE_WIDTH; } | T_HEIGHT { $$ = ROFI_SCALE_HEIGHT; } | T_NONE { $$ = ROFI_SCALE_NONE; } ; t_color_list : t_property_color { $$ = g_list_append ( NULL, g_memdup ( (gconstpointer)&($1), sizeof ( ThemeColor ))); } | t_color_list T_COMMA t_property_color { $$ = g_list_append ($1, g_memdup ( (gconstpointer)&($3), sizeof ( ThemeColor ))); } ; /** List of elements */ t_property_element_list_optional : %empty { $$ = NULL; } | t_property_element_list { $$ = $1; } ; t_property_element_list : T_ELEMENT { $$ = g_list_append ( NULL, $1); } | t_property_element_list T_COMMA T_ELEMENT { $$ = g_list_append ( $1, $3 ); } ; /** * Position can be either center, * East or West, North Or South * Or combi of East or West and North or South */ t_property_position : T_POS_CENTER { $$ =WL_CENTER;} | t_property_position_ew | t_property_position_sn | t_property_position_ew t_property_position_sn { $$ = $1|$2;} | t_property_position_sn t_property_position_ew { $$ = $1|$2;} ; t_property_position_ew : T_POS_EAST { $$ = WL_EAST;} | T_POS_WEST { $$ = WL_WEST;} ; t_property_position_sn : T_POS_NORTH { $$ = WL_NORTH;} | T_POS_SOUTH { $$ = WL_SOUTH;} ; /** * Highlight style, allow mulitple styles to be combined. * Empty not allowed */ t_property_highlight_styles : t_property_highlight_style { $$ = $1;} | t_property_highlight_styles t_property_highlight_style { $$ = $1|$2;} ; /** Single style. */ t_property_highlight_style : T_NONE { $$ = ROFI_HL_NONE; } | T_BOLD { $$ = ROFI_HL_BOLD; } | T_UNDERLINE { $$ = ROFI_HL_UNDERLINE; } | T_STRIKETHROUGH { $$ = ROFI_HL_STRIKETHROUGH; } | T_ITALIC { $$ = ROFI_HL_ITALIC; } | T_SMALLCAPS { $$ = ROFI_HL_SMALL_CAPS; } ; t_property_distance_zero : T_INT t_property_line_style { $$.base.distance = (double) $1; $$.base.type = ROFI_PU_PX; $$.base.left = NULL; $$.base.right = NULL; $$.base.modtype = ROFI_DISTANCE_MODIFIER_NONE; $$.style = $2; } | t_property_distance { $$ = $1;} ; /** Distance. */ t_property_distance_unit : T_INT t_property_unit { $$ = g_slice_new0(RofiDistanceUnit); $$->distance = (double)$1; $$->type = $2; $$->left = NULL; $$->right = NULL; $$->modtype = ROFI_DISTANCE_MODIFIER_NONE; } | T_INT { $$ = g_slice_new0(RofiDistanceUnit); $$->distance = (double)$1; $$->type = ROFI_PU_PX; $$->left = NULL; $$->right = NULL; $$->modtype = ROFI_DISTANCE_MODIFIER_NONE; } | T_DOUBLE t_property_unit { $$ = g_slice_new0(RofiDistanceUnit); $$->distance = (double)$1; $$->type = $2; $$->left = NULL; $$->right = NULL; $$->modtype = ROFI_DISTANCE_MODIFIER_NONE; } | T_PARENT_LEFT t_property_distance_unit_math3 T_PARENT_RIGHT { $$ = g_slice_new0(RofiDistanceUnit); $$->distance = 0; $$->type = ROFI_PU_PX; $$->left = $2; $$->right = 0; $$->modtype = ROFI_DISTANCE_MODIFIER_GROUP; }; /** * Multiply/divide with auto-grouping. */ t_property_distance_unit_math : t_property_distance_unit_math T_MODIFIER_MULTIPLY t_property_distance_unit { $$ = g_slice_new0(RofiDistanceUnit); $$->left = $1; $$->right = $3; $$->modtype = ROFI_DISTANCE_MODIFIER_MULTIPLY; } | t_property_distance_unit_math T_FORWARD_SLASH t_property_distance_unit { $$ = g_slice_new0(RofiDistanceUnit); $$->left = $1; $$->right = $3; $$->modtype = ROFI_DISTANCE_MODIFIER_DIVIDE; } | t_property_distance_unit_math T_PERCENT t_property_distance_unit { $$ = g_slice_new0(RofiDistanceUnit); $$->left = $1; $$->right = $3; $$->modtype = ROFI_DISTANCE_MODIFIER_MODULO; } | t_property_distance_unit { $$ = $1; }; /** Level 2 (+-)*/ t_property_distance_unit_math2 : t_property_distance_unit_math2 T_MODIFIER_ADD t_property_distance_unit_math { $$ = g_slice_new0(RofiDistanceUnit); $$->left = $1; $$->right = $3; $$->modtype = ROFI_DISTANCE_MODIFIER_ADD; } | t_property_distance_unit_math2 T_MODIFIER_SUBTRACT t_property_distance_unit_math { $$ = g_slice_new0(RofiDistanceUnit); $$->left = $1; $$->right = $3; $$->modtype = ROFI_DISTANCE_MODIFIER_SUBTRACT; } | t_property_distance_unit_math { $$ = $1; }; /** Level 3 (min max)*/ t_property_distance_unit_math3 : t_property_distance_unit_math3 T_MODIFIER_MIN t_property_distance_unit_math2 { $$ = g_slice_new0(RofiDistanceUnit); $$->left = $1; $$->right = $3; $$->modtype = ROFI_DISTANCE_MODIFIER_MIN; } | t_property_distance_unit_math3 T_MODIFIER_MAX t_property_distance_unit_math2 { $$ = g_slice_new0(RofiDistanceUnit); $$->left = $1; $$->right = $3; $$->modtype = ROFI_DISTANCE_MODIFIER_MAX; } | t_property_distance_unit_math2 { $$ = $1; }; t_property_distance /** Integer unit and line style */ : T_INT t_property_unit t_property_line_style { $$.base.distance = (double)$1; $$.base.type = $2; $$.base.left = NULL; $$.base.right = NULL; $$.base.modtype = ROFI_DISTANCE_MODIFIER_NONE; $$.style = $3; } /** Double unit and line style */ | T_DOUBLE t_property_unit t_property_line_style { $$.base.distance = (double)$1; $$.base.type = $2; $$.base.modtype = ROFI_DISTANCE_MODIFIER_NONE; $$.base.left = NULL; $$.base.right = NULL; $$.style = $3; } | T_CALC T_PARENT_LEFT t_property_distance_unit_math3 T_PARENT_RIGHT t_property_line_style { $$.base.distance = 0; $$.base.type = ROFI_PU_PX; $$.base.left = $3; $$.base.right = NULL; $$.base.modtype = ROFI_DISTANCE_MODIFIER_GROUP; $$.style = $5; }; /** distance unit. px, em, % */ t_property_unit : T_UNIT_PX { $$ = ROFI_PU_PX; } | T_UNIT_MM { $$ = ROFI_PU_MM; } | T_UNIT_EM { $$ = ROFI_PU_EM; } | T_UNIT_CH { $$ = ROFI_PU_CH; } | T_PERCENT { $$ = ROFI_PU_PERCENT; } ; /****** * Line style * If not set, solid. */ t_property_line_style : %empty { $$ = ROFI_HL_SOLID; } | T_SOLID { $$ = ROFI_HL_SOLID; } | T_DASH { $$ = ROFI_HL_DASH; } ; /** * Color formats */ t_property_color /** rgba ( 0-255 , 0-255, 0-255, 0-1.0 ) */ : T_COL_RGBA T_PARENT_LEFT T_INT T_COMMA T_INT T_COMMA T_INT t_property_color_opt_alpha_c T_PARENT_RIGHT { if ( ! check_in_range($3,0,255, &(@$)) ) { YYABORT; } if ( ! check_in_range($5,0,255, &(@$)) ) { YYABORT; } if ( ! check_in_range($7,0,255, &(@$)) ) { YYABORT; } $$.alpha = $8; $$.red = $3/255.0; $$.green = $5/255.0; $$.blue = $7/255.0; } /** rgba ( 0-255 0-255 0-255 / 0-1.0 ) */ | T_COL_RGBA T_PARENT_LEFT T_INT T_INT T_INT t_property_color_opt_alpha_ws T_PARENT_RIGHT { if ( ! check_in_range($3,0,255, &(@$)) ) { YYABORT; } if ( ! check_in_range($4,0,255, &(@$)) ) { YYABORT; } if ( ! check_in_range($5,0,255, &(@$)) ) { YYABORT; } $$.alpha = $6; $$.red = $3/255.0; $$.green = $4/255.0; $$.blue = $5/255.0; } /** rgba ( 0-100% , 0-100%, 0-100%, 0-1.0 ) */ | T_COL_RGBA T_PARENT_LEFT t_property_color_value T_PERCENT T_COMMA t_property_color_value T_PERCENT T_COMMA t_property_color_value T_PERCENT t_property_color_opt_alpha_c T_PARENT_RIGHT { if ( ! check_in_range($3,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($6,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($9,0,100, &(@$)) ) { YYABORT; } $$.alpha = $11; $$.red = $3/100.0; $$.green = $6/100.0; $$.blue = $9/100.0; } /** rgba ( 0-100% 0-100% 0-100% / 0-1.0 ) */ | T_COL_RGBA T_PARENT_LEFT t_property_color_value T_PERCENT t_property_color_value T_PERCENT t_property_color_value T_PERCENT t_property_color_opt_alpha_ws T_PARENT_RIGHT { if ( ! check_in_range($3,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($5,0,100, &(@$)) ) { YYABORT; } if ( ! check_in_range($7,0,100, &(@$)) ) { YYABORT; } $$.alpha = $9; $$.red = $3/100.0; $$.green = $5/100.0; $$.blue = $7/100.0; } /** hwb with comma */ | T_COL_HWB T_PARENT_LEFT t_property_color_value_angle T_COMMA t_property_color_value_unit T_COMMA t_property_color_value_unit t_property_color_opt_alpha_c T_PARENT_RIGHT { double h = $3, w = $5, b = $7; $$ = hwb_to_rgb ( h, w, b ); $$.alpha = $8; } /** hwb whitespace */ | T_COL_HWB T_PARENT_LEFT t_property_color_value_angle t_property_color_value_unit t_property_color_value_unit t_property_color_opt_alpha_ws T_PARENT_RIGHT { double h = $3, w = $4, b = $5; $$ = hwb_to_rgb ( h, w, b ); $$.alpha = $6; } /** cmyk with comma */ | T_COL_CMYK T_PARENT_LEFT t_property_color_value_unit T_COMMA t_property_color_value_unit T_COMMA t_property_color_value_unit T_COMMA t_property_color_value_unit t_property_color_opt_alpha_c T_PARENT_RIGHT { $$.alpha = $10; double c = $3, m = $5, y = $7, k = $9; $$.red = (1.0-c)*(1.0-k); $$.green = (1.0-m)*(1.0-k); $$.blue = (1.0-y)*(1.0-k); } /** cmyk whitespace edition. */ | T_COL_CMYK T_PARENT_LEFT t_property_color_value_unit t_property_color_value_unit t_property_color_value_unit t_property_color_value_unit t_property_color_opt_alpha_ws T_PARENT_RIGHT { $$.alpha = $7; double c = $3, m = $4, y = $5, k = $6; $$.red = (1.0-c)*(1.0-k); $$.green = (1.0-m)*(1.0-k); $$.blue = (1.0-y)*(1.0-k); } /** hsl ( 0-360 0-100 % 0 - 100 % / alpha) */ | T_COL_HSL T_PARENT_LEFT t_property_color_value_angle t_property_color_value_unit t_property_color_value_unit t_property_color_opt_alpha_ws T_PARENT_RIGHT { double h = $3, s = $4, l = $5; $$ = hsl_to_rgb ( h, s, l ); $$.alpha = $6; } /** hsl ( 0-360 , 0-100 %, 0 - 100 %) */ | T_COL_HSL T_PARENT_LEFT t_property_color_value_angle T_COMMA t_property_color_value_unit T_COMMA t_property_color_value_unit t_property_color_opt_alpha_c T_PARENT_RIGHT { double h = $3, s = $5, l = $7; $$ = hsl_to_rgb ( h, s, l ); $$.alpha = $8; } /** Hex colors parsed by lexer. */ | T_COLOR { $$ = $1; } | T_COLOR_TRANSPARENT { $$.alpha = 0.0; $$.red = $$.green = $$.blue = 0.0; } | T_COLOR_NAME t_property_color_opt_alpha_ws { $$ = $1; $$.alpha = $2; } ; t_property_color_opt_alpha_c : %empty { $$ = 1.0; } | T_COMMA t_property_color_value_unit { $$ = $2;} ; t_property_color_opt_alpha_ws : %empty { $$ = 1.0; } | T_FORWARD_SLASH t_property_color_value_unit { $$ = $2;} ; t_property_color_value_angle : t_property_color_value { $$ = $1/360.0; if ( ! check_in_range ( $1, 0, 360, &(@$))){YYABORT;}} | t_property_color_value T_ANGLE_DEG { $$ = $1/360.0; if ( ! check_in_range ( $1, 0, 360, &(@$))){YYABORT;}} | t_property_color_value T_ANGLE_RAD { $$ = $1/(2*G_PI); if ( ! check_in_range ( $1, 0.0, (2*G_PI), &(@$))){YYABORT;}} | t_property_color_value T_ANGLE_GRAD { $$ = $1/400.0; if ( ! check_in_range ( $1, 0, 400, &(@$))){YYABORT;}} | t_property_color_value T_ANGLE_TURN { $$ = $1; if ( ! check_in_range ( $1, 0.0, 1.0, &(@$))){YYABORT;}} ; t_property_color_value_unit : t_property_color_value T_PERCENT { $$ = $1/100.0; if ( !check_in_range ( $1, 0, 100, &(@$))){YYABORT;}} | t_property_color_value { $$ = $1; if ( !check_in_range ( $1, 0.0, 1.0, &(@$))){YYABORT;}} ; /** Color value to be double or integer. */ t_property_color_value : T_DOUBLE { $$ = $1; } | T_INT { $$ = $1; } ; t_property_orientation : ORIENTATION_HORI { $$ = ROFI_ORIENTATION_HORIZONTAL; } | ORIENTATION_VERT { $$ = ROFI_ORIENTATION_VERTICAL; } ; t_property_cursor : CURSOR_DEF { $$ = ROFI_CURSOR_DEFAULT; } | CURSOR_PTR { $$ = ROFI_CURSOR_POINTER; } | CURSOR_TXT { $$ = ROFI_CURSOR_TEXT; } ; /** Property name */ t_property_name : T_PROP_NAME { $$ = $1; } ; t_entry_name_path_selectors: t_entry_name_path { $$ = g_list_append ( NULL, $1 ); } | t_entry_name_path_selectors T_SSEP t_entry_name_path { $$ = g_list_append ( $1, $3); } | t_entry_name_path_selectors T_SSEP { $$ = $1; } ; t_entry_name_path: T_NAME_ELEMENT { $$ = g_list_append ( NULL, $1 );} | t_entry_name_path T_NSEP T_NAME_ELEMENT { $$ = g_list_append ( $1, $3);} | t_entry_name_path T_NSEP { $$ = $1; } ; %% rofi-1.7.1/Examples/0000755000175100001710000000000014150243223011227 500000000000000rofi-1.7.1/Examples/test_script_mode.sh0000755000175100001710000000116214150243117015057 00000000000000#!/usr/bin/env bash if [ "$*" = "quit" ] then exit 0 fi if [ "$@" ] then # Override the previously set prompt. echo -en "\x00prompt\x1fChange prompt\n" for a in {1..10} do echo "$a" done echo "quit" else echo -en "\x00prompt\x1ftesting\n" echo -en "\0urgent\x1f0,2\n" echo -en "\0active\x1f1\n" echo -en "\0markup-rows\x1ftrue\n" echo -en "\0message\x1fSpecial boldmessage\n" echo -en "aap\0icon\x1ffolder\n" echo "noot" echo "mies" echo -en "-------------\0nonselectable\x1ftrue\n" echo "testing" echo "Bold" echo "quit" fi rofi-1.7.1/Examples/rofi-file-browser.sh0000755000175100001710000000542214150243117015050 00000000000000#!/usr/bin/env bash # Various options for the file browser script: ROFI_FB_GENERIC_FO="xdg-open" # command used for opening the selection ROFI_FB_PREV_LOC_FILE=~/.local/share/rofi/rofi_fb_prevloc ROFI_FB_HISTORY_FILE=~/.local/share/rofi/rofi_fb_history ROFI_FB_HISTORY_MAXCOUNT=5 # maximum number of history entries # Comment the next variable to always start in the last visited directory, # otherwise rofi_fb will start in the specified directory: ROFI_FB_START_DIR=$HOME # starting directory # Uncomment the following line to disable history: # ROFI_FB_NO_HISTORY=1 # Beginning of the script: # Create the directory for the files of the script if [ ! -d "$(dirname "${ROFI_FB_PREV_LOC_FILE}")" ] then mkdir -p "$(dirname "${ROFI_FB_PREV_LOC_FILE}")" fi if [ ! -d "$(dirname "${ROFI_FB_HISTORY_FILE}")" ] then mkdir -p "$(dirname "${ROFI_FB_HISTORY_FILE}")" fi # Initialize $ROFI_FB_CUR_DIR if [ -d "${ROFI_FB_START_DIR}" ] then ROFI_FB_CUR_DIR="${ROFI_FB_START_DIR}" else ROFI_FB_CUR_DIR="$PWD" fi # Read last location, otherwise we default to $ROFI_FB_START_DIR or $PWD. if [ -f "${ROFI_FB_PREV_LOC_FILE}" ] then ROFI_FB_CUR_DIR=$(cat "${ROFI_FB_PREV_LOC_FILE}") fi # Handle argument. if [ -n "$@" ] then if [[ "$@" == /* ]] then ROFI_FB_CUR_DIR="$@" else ROFI_FB_CUR_DIR="${ROFI_FB_CUR_DIR}/$@" fi fi # If argument is no directory. if [ ! -d "${ROFI_FB_CUR_DIR}" ] then if [ -x "${ROFI_FB_CUR_DIR}" ] then coproc ( "${ROFI_FB_CUR_DIR}" >/dev/null 2>&1 ) exec 1>&- exit; elif [ -f "${ROFI_FB_CUR_DIR}" ] then if [[ "${ROFI_FB_NO_HISTORY}" -ne 1 ]] then # Append selected entry to history and remove exceeding entries sed -i "s|${ROFI_FB_CUR_DIR}|##deleted##|g" "${ROFI_FB_HISTORY_FILE}" sed -i '/##deleted##/d' "${ROFI_FB_HISTORY_FILE}" echo "${ROFI_FB_CUR_DIR}" >> "${ROFI_FB_HISTORY_FILE}" if [ "$( wc -l < "${ROFI_FB_HISTORY_FILE}" )" -gt "${ROFI_FB_HISTORY_MAXCOUNT}" ] then sed -i 1d "${ROFI_FB_HISTORY_FILE}" fi fi # Open the selected entry with $ROFI_FB_GENERIC_FO coproc ( "${ROFI_FB_GENERIC_FO}" "${ROFI_FB_CUR_DIR}" >/dev/null 2>&1 ) if [ -d "${ROFI_FB_START_DIR}" ] then echo "${ROFI_FB_START_DIR}" > "${ROFI_FB_PREV_LOC_FILE}" fi exit; fi exit; fi # Process current dir. if [ -n "${ROFI_FB_CUR_DIR}" ] then ROFI_FB_CUR_DIR=$(readlink -e "${ROFI_FB_CUR_DIR}") echo "${ROFI_FB_CUR_DIR}" > "${ROFI_FB_PREV_LOC_FILE}" pushd "${ROFI_FB_CUR_DIR}" >/dev/null fi # Output to rofi if [[ "${ROFI_FB_NO_HISTORY}" -ne 1 ]] then tac "${ROFI_FB_HISTORY_FILE}" | grep "${ROFI_FB_CUR_DIR}" fi echo ".." ls # vim:sw=4:ts=4:et: rofi-1.7.1/Examples/i3_empty_workspace.sh0000755000175100001710000000045314150243117015321 00000000000000#!/usr/bin/env bash MAX_DESKTOPS=20 WORKSPACES=$(seq -s '\n' 1 1 "${MAX_DESKTOPS}") EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \ echo -e "${WORKSPACES}" ) | sort -n | uniq -u | head -n 1) i3-msg workspace "${EMPTY_WORKSPACE}" rofi-1.7.1/Examples/i3_switch_workspaces.sh0000755000175100001710000000061414150243117015646 00000000000000#!/usr/bin/env bash if [ -z $@ ] then gen_workspaces() { i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n } echo empty; gen_workspaces else WORKSPACE=$@ if [ "${WORKSPACE}" = "empty" ] then i3_empty_workspace.sh >/dev/null elif [ -n "${WORKSPACE}" ] then i3-msg workspace "${WORKSPACE}" >/dev/null fi fi rofi-1.7.1/configure.ac0000644000175100001710000002107614150243117011667 00000000000000AC_INIT([rofi], [1.7.1], [https://github.com/davatorium/rofi/],[],[https://reddit.com/r/qtools/]) AC_CONFIG_SRCDIR([source/rofi.c]) AC_CONFIG_HEADER([config.h]) AH_BOTTOM([#include "gitconfig.h"]) dnl --------------------------------------------------------------------- dnl Lex & Bison language parser. dnl --------------------------------------------------------------------- AC_PROG_LEX AC_PROG_YACC AC_DEFUN([AX_PROG_BISON], [ AC_REQUIRE([AC_PROG_YACC]) AC_REQUIRE([AC_PROG_EGREP]) AC_CACHE_CHECK([if bison is the parser generator],[ax_cv_prog_bison],[ AS_IF([$YACC --version 2>/dev/null | $EGREP -q '^bison '], [ax_cv_prog_bison=yes], [ax_cv_prog_bison=no]) ]) AS_IF([test "$ax_cv_prog_bison" = "yes"], [ dnl replace the yacc-compatible compiler with the real bison, as dnl otherwise autoconf limits us to the POSIX yacc. dnl We also change the generated filename to the old one, so that dnl automake's ylwrap can deal with it. YACC="${YACC% -y} -o y.tab.c" ] m4_ifnblank([$1], [[$1]]), m4_ifnblank([$2], [[$2]]) ) ]) AX_PROG_BISON([],[AC_MSG_ERROR("Failed to find bison")]) m4_include([m4/ax_prog_flex_version.m4]) m4_include([m4/ax_compare_version.m4]) AC_SUBST([FLEX], [${LEX}]) AX_PROG_FLEX_VERSION([2.5.39],,AC_MSG_ERROR("Require flex version 2.5.39 or higher")) # dnl --------------------------------------------------------------------- dnl Setup automake to be silent and in foreign mode. dnl We want xz distribution dnl --------------------------------------------------------------------- AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects dist-xz]) AM_SILENT_RULES([yes]) dnl --------------------------------------------------------------------- dnl Check for compiler dnl --------------------------------------------------------------------- AC_PROG_CC([clang gcc cc]) dnl --------------------------------------------------------------------- dnl C99 standard dnl --------------------------------------------------------------------- AC_PROG_CC_C99 dnl --------------------------------------------------------------------- dnl C to Object rules. dnl --------------------------------------------------------------------- AM_PROG_CC_C_O dnl --------------------------------------------------------------------- dnl System extensions dnl --------------------------------------------------------------------- AC_USE_SYSTEM_EXTENSIONS dnl --------------------------------------------------------------------- dnl Static libraries programs dnl --------------------------------------------------------------------- AC_PROG_RANLIB AM_PROG_AR dnl --------------------------------------------------------------------- dnl Base CFLAGS dnl --------------------------------------------------------------------- AM_CFLAGS="-Wall -Wextra -Wparentheses -Winline -pedantic -Wunreachable-code" dnl --------------------------------------------------------------------- dnl Enable source code coverage reporting for GCC dnl --------------------------------------------------------------------- AC_ARG_ENABLE([gcov], [AS_HELP_STRING ([--enable-gcov],[Enable source code coverage testing using gcov])], [AM_CFLAGS="${AM_CFLAGS} -coverage"]) AS_IF([test "x${enable_gcov}" = "xyes" ], [AC_DEFINE([ENABLE_GCOV], [1], [Enable gcov profiling])]) AC_ARG_ENABLE([asan], [AS_HELP_STRING ([--enable-asan],[Enable asan support])]) AS_IF([test "x${enable_asan}" = "xyes" ], [ AC_DEFINE([ENABLE_ASAN], [1], [Enable libasan]) AM_CFLAGS="${AM_CFLAGS} -fsanitize=address -fno-omit-frame-pointer -g3"] ]) dnl -------------------------------------------------------------------- dnl DRun dialog dnl -------------------------------------------------------------------- AC_ARG_ENABLE([drun], AS_HELP_STRING([--disable-drun],[Disable desktop file run dialog])) AS_IF([test "x${enable_drun}" != "xno"], [AC_DEFINE([ENABLE_DRUN], [1], [Enable desktop file run dialog])]) dnl --------------------------------------------------------------------- dnl Disable window mode dnl --------------------------------------------------------------------- AC_ARG_ENABLE([windowmode], AS_HELP_STRING([--disable-windowmode],[Disable window mode])) AS_IF([ test "x$enable_windowmode" != "xno"], [AC_DEFINE([WINDOW_MODE],[1],[Enable the window mode])]) dnl --------------------------------------------------------------------- dnl Check for C functions. dnl --------------------------------------------------------------------- AC_CHECK_FUNC([getline],, AC_MSG_ERROR("Could not find getline in c library")) AC_CHECK_FUNC([open],, AC_MSG_ERROR("Could not find open in c library")) AC_CHECK_FUNC([sysconf],, AC_MSG_ERROR("Could not find sysconf")) AC_CHECK_FUNC([strtok_r],, AC_MSG_ERROR("Could not find strtok_r")) AC_CHECK_FUNC([flock],, AC_MSG_ERROR("Could not find flock")) AC_CHECK_FUNC([ftruncate],,AC_MSG_ERROR("Could not find ftruncate")) AC_CHECK_FUNC([fcntl],, AC_MSG_ERROR("Could not find fcntl")) AC_CHECK_FUNC([setlocale],,AC_MSG_ERROR("Could not find setlocale")) AC_CHECK_FUNC([atexit],, AC_MSG_ERROR("Could not find atexit in c library")) AC_CHECK_FUNC([glob],, AC_MSG_ERROR("Could not find glob in c library")) AC_CHECK_FUNC([readdir],, AC_MSG_ERROR("Could not find readdir in c library")) AC_CHECK_HEADER([math.h],, AC_MSG_ERROR("Could not find math.h header file")) AC_SEARCH_LIBS([floor],[m],, AC_MSG_ERROR("Could not find floor in math library")) AC_SEARCH_LIBS([ceil], [m],, AC_MSG_ERROR("Could not find ceil in math library")) AC_CHECK_HEADER([sysexits.h],, AC_MSG_ERROR("Could not find the sysexists.h header file")) AC_CHECK_HEADER([setjmp.h],, AC_MSG_ERROR("Could not find the setjmp.h header file")) dnl --------------------------------------------------------------------- dnl Check dependencies dnl --------------------------------------------------------------------- PKG_PROG_PKG_CONFIG dnl --------------------------------------------------------------------- dnl PKG_CONFIG based dependencies dnl --------------------------------------------------------------------- glib_min_major="2" glib_min_minor="40" glib_min_version="${glib_min_major}.${glib_min_minor}" NK_INIT([bindings xdg-theme]) PKG_CHECK_MODULES([glib], [glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0]) AC_DEFINE_UNQUOTED([GLIB_VERSION_MIN_REQUIRED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The lower GLib version supported]) AC_DEFINE_UNQUOTED([GLIB_VERSION_MAX_ALLOWED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The highest GLib version supported]) GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama]) PKG_CHECK_MODULES([pango], [pango pangocairo]) PKG_CHECK_MODULES([cairo], [cairo cairo-xcb]) PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 ]) PKG_CHECK_MODULES([gdkpixbuf], [gdk-pixbuf-2.0]) dnl --------------------------------------------------------------------- dnl check - Unit testing. dnl --------------------------------------------------------------------- AC_ARG_ENABLE([check], AS_HELP_STRING([--disable-check], [Build with checks using check library (default: enabled)])) AS_IF([test "x${enable_check}" != "xno"], [ PKG_CHECK_MODULES([check],[check >= 0.11.0], [HAVE_CHECK=1]) ]) AM_CONDITIONAL([USE_CHECK], [test "x${enable_check}" != "xno" && test "$HAVE_CHECK" -eq 1]) dnl --------------------------------------------------------------------- dnl Gets the resource compile tool path. dnl --------------------------------------------------------------------- AM_PATH_GLIB_2_0 dnl --------------------------------------------------------------------- dnl Add extra compiler flags dnl --------------------------------------------------------------------- AC_SUBST([AM_CFLAGS]) AC_CONFIG_FILES([Makefile doc/rofi.doxy pkgconfig/rofi.pc]) AC_OUTPUT echo "" echo "-------------------------------------" if test x$enable_drun != xno; then echo "Desktop File drun dialog Enabled" else echo "Desktop File drun dialog Disabled" fi if test x$enable_windowmode != xno; then echo "Window Switcher dialog Enabled" else echo "Window Switcher dialog Disabled" fi if test x$enable_asan = xyes; then echo "Asan address sanitize Enabled" else echo "Asan address sanitize Disabled" fi if test x$enable_gcov = xyes; then echo "Code Coverage Enabled" else echo "Code Coverage Disabled" fi if test "x${enable_check}" != "xno" && test "$HAVE_CHECK" -eq 1; then echo "Check based tests Enabled" else echo "Check based tests Disabled" fi echo "-------------------------------------" echo "Now type 'make' to build" echo "" rofi-1.7.1/COPYING0000644000175100001710000000217514150243117010433 00000000000000MIT/X11 License Modified 2013-2020 Qball Cow Copyright (c) 2012 Sean Pringle Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. rofi-1.7.1/doc/0000755000175100001710000000000014150243223010216 500000000000000rofi-1.7.1/doc/rofi-theme.50000644000175100001710000012312614150243117012272 00000000000000.nh .TH ROFI\-THEME 5 rofi\-theme .SH NAME .PP \fBrofi\-theme\fP \- Rofi theme format files .SH DEFAULT THEME LOADING .PP By default, rofi loads the default theme. This theme is \fBalways\fP loaded. In the default (always loaded) configuration it does: .PP .RS .nf @theme "default" .fi .RE .PP To unload the default theme, and load another theme, add \fB\fC@theme\fR to your \fB\fCconfig.rasi\fR file. .PP If you have a theme loaded by \fB\fC@theme\fR or use the default theme, you can tweak it by adding overriding elements at the end of your \fB\fCconfig.rasi\fR file. .PP For the difference between \fB\fC@import\fR and \fB\fC@theme\fR see the \fB\fCMultiple file handling\fR section in this manpage. .PP To see the default theme, run the following command: .PP .RS .nf rofi \-no\-config \-dump\-theme .fi .RE .SH DESCRIPTION .PP The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a user\-friendly way. Therefore, a new file format has been created, replacing the old one. .SH FORMAT SPECIFICATION .SH Encoding .PP The encoding of the file is utf\-8. Both unix (\fB\fC\\n\fR) and windows (\fB\fC\\r\\n\fR) newlines format are supported. But unix is preferred. .SH Comments .PP C and C++ file comments are supported. .RS .IP \(bu 2 Anything after \fB\fC//\fR and before a newline is considered a comment. .IP \(bu 2 Everything between \fB\fC/*\fR and \fB\fC*/\fR is a comment. .RE .PP Comments can be nested and the C comments can be inline. .PP The following is valid: .PP .RS .nf // Magic comment. property: /* comment */ value; .fi .RE .PP However, this is not: .PP .RS .nf prop/*comment*/erty: value; .fi .RE .SH White space .PP White space and newlines, like comments, are ignored by the parser. .PP This: .PP .RS .nf property: name; .fi .RE .PP Is identical to: .PP .RS .nf property : name ; .fi .RE .SH File extension .PP The preferred file extension for the new theme format is \fBrasi\fP\&. This is an abbreviation for \fBr\fPofi \fBa\fPdvanced \fBs\fPtyle \fBi\fPnformation. .SH Basic Structure .PP Each element has a section with defined properties. Global properties can be defined in section \fB\fC* { }\fR\&. Sub\-\§ion names begin with a hash symbol \fB\fC#\fR\&. .PP It is advised to define the \fIglobal properties section\fP on top of the file to make inheritance of properties clearer. .PP .RS .nf /* Global properties section */ * { // list of properties } /* Element theme section. */ {element path} { // list of properties } {elements... } { // list of properties } .fi .RE .PP If there are multiple sections with the same name, they are merged. Duplicate properties are overwritten and the last parsed entry kept. .SH Global properties section .PP A theme can have one or more global properties sections. If there is more than one, they will be merged. .PP The global properties section denotes the defaults for each element. Each property of this section can be referenced with \fB\fC@{identifier}\fR (See Properties section) .PP A global properties section is indicated with a \fB\fC*\fR as element path. .SH Element theme section .PP A theme can have multiple element theme sections. .PP The element path can consist of multiple names separated by whitespace or dots. Each element may contain any number of letters, numbers and \fB\fC\-\fR\&'s. The first element in the element path should always start with a \fB\fC#\fR\&. Multiple elements can be specified by a \fB\fC,\fR\&. .PP This is a valid element name: .PP .RS .nf element normal.normal { background\-color: blue; } button { background\-color: blue; } .fi .RE .PP And is identical to: .PP .RS .nf element normal normal, button { background\-color: blue; } .fi .RE .PP Each section inherits the global properties. Properties can be explicitly inherited from their parent with the \fB\fCinherit\fR keyword. In the following example: .PP .RS .nf window { a: 1; b: 2; children: [ mainbox ]; } mainbox { a: inherit; b: 4; c: 8; } .fi .RE .PP The element \fB\fCmainbox\fR will have the following set of properties (if \fB\fCmainbox\fR is a child of \fB\fCwindow\fR): .PP .RS .nf a: 1; b: 4; c: 8; .fi .RE .PP If multiple sections are defined with the same name, they are merged by the parser. If multiple properties with the same name are defined in one section, the last encountered property is used. .SH Properties Format .PP The properties in a section consist of: .PP .RS .nf {identifier}: {value}; .fi .RE .PP Both fields are mandatory for a property. .PP The \fB\fCidentifier\fR names the specified property. Identifiers can consist of any combination of numbers, letters and '\-'. It must not contain any whitespace. The structure of the \fB\fCvalue\fR defines the type of the property. The current parser does not define or enforce a certain type of a particular \fB\fCidentifier\fR\&. When used, values with the wrong type that cannot be converted are ignored. .PP The current theme format supports different types: .RS .IP \(bu 2 a string .IP \(bu 2 an integer number .IP \(bu 2 a fractional number .IP \(bu 2 a boolean value .IP \(bu 2 a color .IP \(bu 2 image .IP \(bu 2 text style .IP \(bu 2 line style .IP \(bu 2 a distance .IP \(bu 2 a padding .IP \(bu 2 a border .IP \(bu 2 a position .IP \(bu 2 a reference .IP \(bu 2 an orientation .IP \(bu 2 a cursor .IP \(bu 2 a list of keywords .IP \(bu 2 an environment variable .IP \(bu 2 Inherit .RE .PP Some of these types are a combination of other types. .SH String .RS .IP \(bu 2 Format: \fB\fC"[:print:]+"\fR .RE .PP A string is always surrounded by double quotes (\fB\fC"\fR). Between the quotes there can be any printable character. .PP For example: .PP .RS .nf font: "Awasome 12"; .fi .RE .PP The string must be valid UTF\-8. .SH Integer .RS .IP \(bu 2 Format: \fB\fC[\-+]?[:digit:]+\fR .RE .PP An integer may contain any number. .PP For examples: .PP .RS .nf lines: 12; .fi .RE .SH Real .RS .IP \(bu 2 Format: \fB\fC[\-+]?[:digit:]+(\\.[:digit:]+)?\fR .RE .PP A real is an integer with an optional fraction. .PP For example: .PP .RS .nf real: 3.4; .fi .RE .PP The following is not valid: \fB\fC\&.3\fR, \fB\fC3.\fR or scientific notation: \fB\fC3.4e\-3\fR\&. .SH Boolean .RS .IP \(bu 2 Format: \fB\fC(true|false)\fR .RE .PP Boolean value is either \fB\fCtrue\fR or \fB\fCfalse\fR\&. This is case\-\&sensitive. .PP For example: .PP .RS .nf dynamic: false; .fi .RE .SH Image .PP \fBrofi\fP support a limited set of background\-image formats. .RS .IP \(bu 2 Format: url("path to image"); .IP \(bu 2 Format: url("path to image", scale); where scale is: none, both, width, height .IP \(bu 2 Format: linear\-gradient(stop color,stop1, color, stop2 color, ...); .IP \(bu 2 Format: linear\-gradient(to direction, stop color,stop1, color, stop2 color, ...); where direction is: top,left,right,bottom. .IP \(bu 2 Format: linear\-gradient(angle, stop color,stop1, color, stop2 color, ...); Angle in deg,rad,grad (as used in color). .RE .PP Where the \fB\fCpath\fR is a string, and \fB\fCstop\fR color is of type color. .SH Color .PP \fBrofi\fP supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4) .RS .IP \(bu 2 Format: \fB\fC#{HEX}{3}\fR (rgb) .IP \(bu 2 Format: \fB\fC#{HEX}{4}\fR (rgba) .IP \(bu 2 Format: \fB\fC#{HEX}{6}\fR (rrggbb) .IP \(bu 2 Format: \fB\fC#{HEX}{8}\fR (rrggbbaa) .IP \(bu 2 Format: \fB\fCrgb[a]({INTEGER},{INTEGER},{INTEGER}[, {PERCENTAGE}])\fR .IP \(bu 2 Format: \fB\fCrgb[a]({INTEGER}%,{INTEGER}%,{INTEGER}%[, {PERCENTAGE}])\fR .IP \(bu 2 Format: \fB\fChsl[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])\fR .IP \(bu 2 Format: \fB\fChwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])\fR .IP \(bu 2 Format: \fB\fCcmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE} ])\fR .IP \(bu 2 Format: \fB\fC{named\-color} [ / {PERCENTAGE} ]\fR .RE .PP The white\-space format proposed in CSS4 is also supported. .PP The different values are: .RS .IP \(bu 2 \fB\fC{HEX}\fR is a hexadecimal number ('0\-9a\-f' case insensitive). .IP \(bu 2 \fB\fC{INTEGER}\fR value can be between 0 and 255 or 0\-100 when representing percentage. .IP \(bu 2 \fB\fC{ANGLE}\fR is the angle on the color wheel, can be in \fB\fCdeg\fR, \fB\fCrad\fR, \fB\fCgrad\fR or \fB\fCturn\fR\&. When no unit is specified, degrees is assumed. .IP \(bu 2 \fB\fC{PERCENTAGE}\fR can be between 0\-1.0, or 0%\-100% .IP \(bu 2 \fB\fC{named\-color}\fR is one of the following colors:AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, DimGray, DimGrey, DodgerBlue, FireBrick, FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, GoldenRod, Gray, Grey, Green, GreenYellow, HoneyDew, HotPink, IndianRed, Indigo, Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, LemonChiffon, LightBlue, LightCoral, LightCyan, LightGoldenRodYellow, LightGray, LightGrey, LightGreen, LightPink, LightSalmon, LightSeaGreen, LightSkyBlue, LightSlateGray, LightSlateGrey, LightSteelBlue, LightYellow, Lime, LimeGreen, Linen, Magenta, Maroon, MediumAquaMarine, MediumBlue, MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, MintCream, MistyRose, Moccasin, NavajoWhite, Navy, OldLace, Olive, OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenRod, PaleGreen, PaleTurquoise, PaleVioletRed, PapayaWhip, PeachPuff, Peru, Pink, Plum, PowderBlue, Purple, RebeccaPurple, Red, RosyBrown, RoyalBlue, SaddleBrown, Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, SlateGray, SlateGrey, Snow, SpringGreen, SteelBlue, Tan, Teal, Thistle, Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, YellowGreen,transparent .RE .PP For example: .PP .RS .nf background\-color: #FF0000; border\-color: rgba(0,0,1, 0.5); text\-color: SeaGreen; .fi .RE .PP or .PP .RS .nf background\-color: transparent; text\-color: Black; .fi .RE .SH Text style .RS .IP \(bu 2 Format: \fB\fC(bold|italic|underline|strikethrough|none)\fR .RE .PP Text style indicates how the highlighted text is emphasized. \fB\fCNone\fR indicates that no emphasis should be applied. .RS .IP \(bu 2 \fB\fCbold\fR: make the text thicker then the surrounding text. .IP \(bu 2 \fB\fCitalic\fR: put the highlighted text in script type (slanted). .IP \(bu 2 \fB\fCunderline\fR: put a line under the highlighted text. .IP \(bu 2 \fB\fCstrikethrough\fR: put a line through the highlighted text. .RE .SH Line style .RS .IP \(bu 2 Format: \fB\fC(dash|solid)\fR .RE .PP Indicates how a line should be drawn. It currently supports: * \fB\fCdash\fR: a dashed line, where the gap is the same width as the dash * \fB\fCsolid\fR: a solid line .SH Distance .RS .IP \(bu 2 Format: \fB\fC{Integer}px\fR .IP \(bu 2 Format: \fB\fC{Real}em\fR .IP \(bu 2 Format: \fB\fC{Real}ch\fR .IP \(bu 2 Format: \fB\fC{Real}%\fR .IP \(bu 2 Format: \fB\fC{Integer}mm\fR .RE .PP A distance can be specified in 3 different units: .RS .IP \(bu 2 \fB\fCpx\fR: Screen pixels. .IP \(bu 2 \fB\fCem\fR: Relative to text height. .IP \(bu 2 \fB\fCch\fR: Relative to width of a single number. .IP \(bu 2 \fB\fCmm\fR: Actual size in millimeters (based on dpi). .IP \(bu 2 \fB\fC%\fR: Percentage of the \fBmonitor\fP size. .RE .PP Distances used in the horizontal direction use the monitor width. Distances in the vertical direction use the monitor height. For example: .PP .RS .nf padding: 10%; .fi .RE .PP On a full\-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left and right side and 108 pixels on the top and bottom. .SS Calculating sizes .PP Rofi supports some maths in calculating sizes. For this it uses the CSS syntax: .PP .RS .nf width: calc( 100% \- 37px ); .fi .RE .PP It supports the following operations: .RS .IP \(bu 2 \fB\fC+\fR : Add .IP \(bu 2 \fB\fC\-\fR : Subtract .IP \(bu 2 \fB\fC/\fR : Divide .IP \(bu 2 \fB\fC*\fR : Multiply .IP \(bu 2 \fB\fC%\fR : Multiply .IP \(bu 2 \fB\fCmin\fR : Minimum of l or rvalue; .IP \(bu 2 \fB\fCmax\fR : Maximum of l or rvalue; .RE .PP It uses the C precedence ordering. .SH Padding .RS .IP \(bu 2 Format: \fB\fC{Integer}\fR .IP \(bu 2 Format: \fB\fC{Distance}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Distance}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Distance} {Distance}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Distance} {Distance} {Distance}\fR .RE .PP If no unit is specified, pixels are assumed. .PP The different number of fields in the formats are parsed like: .RS .IP \(bu 2 1 field: \fB\fCall\fR .IP \(bu 2 2 fields: \fB\fCtop\&bottom\fR \fB\fCleft\&right\fR .IP \(bu 2 3 fields: \fB\fCtop\fR, \fB\fCleft\&right\fR, \fB\fCbottom\fR .IP \(bu 2 4 fields: \fB\fCtop\fR, \fB\fCright\fR, \fB\fCbottom\fR, \fB\fCleft\fR .RE .SH Border .RS .IP \(bu 2 Format: \fB\fC{Integer}\fR .IP \(bu 2 Format: \fB\fC{Distance}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Distance}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Distance} {Distance}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Distance} {Distance} {Distance}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Line style}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Line style} {Distance} {Line style}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Line style} {Distance} {Line style} {Distance} {Line style}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Line style} {Distance} {Line style} {Distance} {Line style} {Distance} {Line style}\fR .RE .PP Borders are identical to padding, except that each distance field has a line style property. .PP .RS .PP When no unit is specified, pixels are assumed. .RE .SH Position .PP Indicate a place on the window/monitor. .RS .IP \(bu 2 Format: \fB\fC(center|east|north|west|south|north east|north west|south west|south east)\fR \fB\fC north west | north | north east \-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-\-\-\-\-\-\-\-\-\- west | center | east \-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-\-\-\-\-\-\-\-\-\- south west | south | south east \fR .RE .SH Visibility .PP It is possible to hide widgets: .PP inputbar { enabled: false; } .SH Reference .RS .IP \(bu 2 Format: \fB\fC@{PROPERTY NAME}\fR .RE .PP A reference can point to another reference. Currently, the maximum number of redirects is 20. A property always refers to another property. It cannot be used for a subpart of the property. For example, this is not valid: .PP .RS .nf highlight: bold @pink; .fi .RE .PP But this is: .PP .RS .nf * { myhigh: bold #FAA; } window { highlight: @myhigh; } .fi .RE .RS .IP \(bu 2 Format: \fB\fCvar(PROPERTY NAME, DEFAULT)\fR .RE .PP A reference can point to another reference. Currently, the maximum number of redirects is 20. A property always refers to another property. It cannot be used for a subpart of the property. .PP Example: .PP .RS .nf window { width: var( width, 30%); } .fi .RE .PP If the property \fB\fCwidth\fR is set globally (\fB\fC*{}\fR) that value is used, if the property \fB\fCwidth\fR is not set, the default value is used. .SH Orientation .RS .IP \(bu 2 Format: \fB\fC(horizontal|vertical)\fR .RE .PP Specify the orientation of the widget. .SH Cursor .RS .IP \(bu 2 Format: \fB\fC(default|pointer|text)\fR .RE .PP Specify the type of mouse cursor that is set when the mouse pointer is over the widget. .SH List of keywords .RS .IP \(bu 2 Format: \fB\fC[ keyword, keyword ]\fR .RE .PP A list starts with a '[' and ends with a ']'. The entries in the list are comma\-separated. The \fB\fCkeyword\fR in the list refers to an widget name. .SH Environment variable .RS .IP \(bu 2 Format: \fB\fC${:alnum:}\fR .RE .PP This will parse the environment variable as the property value. (that then can be any of the above types). The environment variable should be an alphanumeric string without white\-space. .PP .RS .nf * { background\-color: ${BG}; } .fi .RE .RS .IP \(bu 2 Format: \fB\fCenv(ENVIRONMENT, default)\fR .RE .PP This will parse the environment variable as the property value. (that then can be any of the above types). The environment variable should be an alphanumeric string without white\-space. If the environment value is not found, the default value is used. .PP .RS .nf window { width: env(WIDTH, 40%); } .fi .RE .PP If environment WIDTH is set, then that value is parsed, otherwise the default value (\fB\fC40%\fR). .SH Inherit .RS .IP \(bu 2 Format: \fB\fCinherit\fR .RE .PP Inherits the property from its parent widget. .PP .RS .nf mainbox { border\-color: inherit; } .fi .RE .SH ELEMENTS PATHS .PP Element paths exists of two parts, the first part refers to the actual widget by name. Some widgets have an extra state. .PP For example: .PP .RS .nf element selected { } .fi .RE .PP Here \fB\fCelement selected\fR is the name of the widget, \fB\fCselected\fR is the state of the widget. .PP The difference between dots and spaces is purely cosmetic. These are all the same: .PP .RS .nf element .selected { element.selected { } element selected { } .fi .RE .SH SUPPORTED ELEMENT PATH .SH Name .PP The current widgets available in \fBrofi\fP: .RS .IP \(bu 2 \fB\fCwindow\fR .RS .IP \(bu 2 \fB\fCoverlay\fR: the overlay widget. .IP \(bu 2 \fB\fCmainbox\fR: The mainbox box. .IP \(bu 2 \fB\fCinputbar\fR: The input bar box. .RS .IP \(bu 2 \fB\fCbox\fR: the horizontal @box packing the widgets .IP \(bu 2 \fB\fCcase\-indicator\fR: the case/sort indicator @textbox .IP \(bu 2 \fB\fCprompt\fR: the prompt @textbox .IP \(bu 2 \fB\fCentry\fR: the main entry @textbox .IP \(bu 2 \fB\fCnum\-rows\fR: Shows the total number of rows. .IP \(bu 2 \fB\fCnum\-filtered\-rows\fR: Shows the total number of rows after filtering. .RE .IP \(bu 2 \fB\fClistview\fR: The listview. .RS .IP \(bu 2 \fB\fCscrollbar\fR: the listview scrollbar .IP \(bu 2 \fB\fCelement\fR: a box in the listview holding the entries .RS .IP \(bu 2 \fB\fCelement\-icon\fR: the widget in the listview's entry showing the (optional) icon .IP \(bu 2 \fB\fCelement\-index\fR: the widget in the listview's entry keybindable index (1,2,3..0) .IP \(bu 2 \fB\fCelement\-text\fR: the widget in the listview's entry showing the text. .RE .RE .IP \(bu 2 \fB\fCmode\-switcher\fR: the main horizontal @box packing the buttons. .RS .IP \(bu 2 \fB\fCbutton\fR: the buttons @textbox for each mode .RE .IP \(bu 2 \fB\fCmessage\fR: The container holding the textbox. .RS .IP \(bu 2 \fB\fCtextbox\fR: the message textbox .RE .RE .RE .PP Note that these path names match the default theme. Themes that provide a custom layout will have different elements, and structure. .SH State .PP State: State of widget .PP Optional flag(s) indicating state of the widget, used for theming. .PP These are appended after the name or class of the widget. .SS Example: .PP \fB\fCbutton selected.normal { }\fR .PP \fB\fCelement selected.urgent { }\fR .PP Currently only the entrybox and scrollbar have states: .SS Entrybox: .PP \fB\fC{visible modifier}.{state}\fR .PP Where \fB\fCvisible modifier\fR can be: * normal: no modification * selected: the entry is selected/highlighted by user * alternate: the entry is at an alternating row (uneven row) .PP Where \fB\fCstate\fR is: * normal: no modification * urgent: this entry is marked urgent * active: this entry is marked active .PP These can be mixed. .PP Example: .PP .RS .nf nametotextbox selected.active { background\-color: #003642; text\-color: #008ed4; } .fi .RE .PP Sets all selected textboxes marked active to the given text and background color. Note that a state modifies the original element, it therefore contains all the properties of that element. .SS Scrollbar .PP The scrollbar uses the \fB\fChandle\fR state when drawing the small scrollbar handle. This allows the colors used for drawing the handle to be set independently. .SH SUPPORTED PROPERTIES .PP The following properties are currently supported: .SS all widgets: .RS .IP \(bu 2 \fBenabled\fP: enable/disable the widget .IP \(bu 2 \fBpadding\fP: padding Padding on the inside of the widget .IP \(bu 2 \fBmargin\fP: padding Margin on the outside of the widget .IP \(bu 2 \fBborder\fP: border Border around the widget (between padding and margin)/ .IP \(bu 2 \fBborder\-radius\fP: padding Sets a radius on the corners of the borders. .IP \(bu 2 \fBbackground\-color\fP: color Background color .IP \(bu 2 \fBbackground\-image\fP: image Background image .IP \(bu 2 \fBborder\-color\fP: color Color of the border .IP \(bu 2 \fBcursor\fP: cursor Type of mouse cursor that is set when the mouse pointer is hovered over the widget. .RE .SS window: .RS .IP \(bu 2 \fBfont\fP: string The font used in the window .IP \(bu 2 \fBtransparency\fP: string Indicating if transparency should be used and what type: \fBreal\fP \- True transparency. Only works with a compositor. \fBbackground\fP \- Take a screenshot of the background image and use that. \fBscreenshot\fP \- Take a screenshot of the screen and use that. \fBPath\fP to png file \- Use an image. .IP \(bu 2 \fBlocation\fP: position The place of the anchor on the monitor .IP \(bu 2 \fBanchor\fP: anchor The anchor position on the window .IP \(bu 2 \fBfullscreen\fP: boolean Window is fullscreen. .IP \(bu 2 \fBwidth\fP: distance The width of the window .IP \(bu 2 \fBx\-offset\fP: distance .IP \(bu 2 \fBy\-offset\fP: distance The offset of the window to the anchor point, allowing you to push the window left/right/up/down .RE .SS scrollbar: .RS .IP \(bu 2 \fBbackground\-color\fP: color .IP \(bu 2 \fBhandle\-width\fP: distance .IP \(bu 2 \fBhandle\-color\fP: color .IP \(bu 2 \fBborder\-color\fP: color .RE .SS box: .RS .IP \(bu 2 \fBorientation\fP: orientation Set the direction the elements are packed. .IP \(bu 2 \fBspacing\fP: distance Distance between the packed elements. .RE .SS textbox: .RS .IP \(bu 2 \fBbackground\-color\fP: color .IP \(bu 2 \fBborder\-color\fP: the color used for the border around the widget. .IP \(bu 2 \fBfont\fP: the font used by this textbox (string). .IP \(bu 2 \fBstr\fP: the string to display by this textbox (string). .IP \(bu 2 \fBvertical\-align\fP: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). .IP \(bu 2 \fBhorizontal\-align\fP: Horizontal alignment of the text. A number between 0 (left) and 1 (right). .IP \(bu 2 \fBtext\-color\fP: the text color to use. .IP \(bu 2 \fBhighlight\fP: text style {color}. color is optional, multiple highlight styles can be added like: bold underline italic #000000; This option is only available on the \fB\fCelement\-text\fR widget. .IP \(bu 2 \fBwidth\fP: override the desired width for the textbox. .IP \(bu 2 \fBcontent\fP: Set the displayed text (String). .IP \(bu 2 \fBplaceholder\fP: Set the displayed text (String) when nothing is entered. .IP \(bu 2 \fBplaceholder\-color\fP: Color of the placeholder text. .IP \(bu 2 \fBblink\fP: Enable/Disable blinking on an input textbox (Boolean). .IP \(bu 2 \fBmarkup\fP: Force markup on, beware that only valid pango markup strings are shown. .RE .SS listview: .RS .IP \(bu 2 \fBcolumns\fP: integer Number of columns to show (at least 1) .IP \(bu 2 \fBfixed\-height\fP: boolean Always show \fB\fClines\fR rows, even if fewer elements are available. .IP \(bu 2 \fBdynamic\fP: boolean \fB\fCTrue\fR if the size should change when filtering the list, \fB\fCFalse\fR if it should keep the original height. .IP \(bu 2 \fBscrollbar\fP: boolean If the scrollbar should be enabled/disabled. .IP \(bu 2 \fBscrollbar\-width\fP: distance Width of the scrollbar .IP \(bu 2 \fBcycle\fP: boolean When navigating, it should wrap around .IP \(bu 2 \fBspacing\fP: distance Spacing between the elements (both vertical and horizontal) .IP \(bu 2 \fBlines\fP: integer Number of rows to show in the list view. .IP \(bu 2 \fBlayout\fP: orientation Indicate how elements are stacked. Horizontal implements the dmenu style. .IP \(bu 2 \fBreverse\fP: boolean Reverse the ordering (top down to bottom up). .IP \(bu 2 \fBfixed\-columns\fP: boolean Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. .RE .PP Each element is a \fB\fCbox\fR called \fB\fCelement\fR\&. Each \fB\fCelement\fR can contain an \fB\fCelement\-icon\fR and \fB\fCelement\-text\fR\&. .SS listview text highlight: .PP The \fB\fCelement\-text\fR widget in the \fB\fClistview\fR is the one used to show the text. On this widget set the \fB\fChighlight\fR property (only place this property is used) to change the style of highlighting. The \fB\fChighlight\fR property consist of the \fB\fCtext\-style\fR property and a color. .PP To disable highlighting: .PP .RS .nf element\-text { highlight: None; } .fi .RE .PP To set to red underlined: .PP .RS .nf element\-text { highlight: underline red; } .fi .RE .SH Layout .PP The new format allows the layout of the \fBrofi\fP window to be tweaked extensively. For each widget, the themer can specify padding, margin, border, font, and more. It even allows, as an advanced feature, to pack widgets in a custom structure. .SS Basic structure .PP The whole view is made out of boxes that pack other boxes or widgets. The box can be vertical or horizontal. This is loosely inspired by GTK \[la]http://gtk.org/\[ra]\&. .PP The current layout of \fBrofi\fP is structured as follows: .PP .RS .nf |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | window {BOX:vertical} | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | mainbox {BOX:vertical} | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | inputbar {BOX:horizontal} | | | | | | |\-\-\-\-\-\-\-\-\-| |\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-| |\-\-\-| |\-\-\-| |\-\-\-| | | | | | | | prompt | |:| | entry |#fr| | / | |#ns| |ci | | | | | | | |\-\-\-\-\-\-\-\-\-| |\_| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-| |\-\-\-| |\-\-\-| |\-\-\-| | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | message | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | | | textbox | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | listview | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-] | | | | | | element | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-] | | | | | | | |element\-icon | |element\-text | | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-] | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | mode\-switcher {BOX:horizontal} | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | | | Button | | Button | | Button | | Button | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| .fi .RE .PP .RS .RS .IP \(bu 2 ci is the case\-indicator .IP \(bu 2 fr is the num\-filtered\-rows .IP \(bu 2 ns is the num\-rows .RE .RE .SS Error message structure .PP .RS .nf |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | window {BOX:vertical} | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | error\-message {BOX:vertical} | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | textbox | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| .fi .RE .SS Advanced layout .PP The layout of \fBrofi\fP can be tweaked by packing the 'fixed' widgets in a custom structure. .PP The following widgets are fixed, as they provide core \fBrofi\fP functionality: .RS .IP \(bu 2 prompt .IP \(bu 2 entry .IP \(bu 2 overlay .IP \(bu 2 case\-indicator .IP \(bu 2 message .IP \(bu 2 listview .IP \(bu 2 mode\-switcher .IP \(bu 2 num\-rows .IP \(bu 2 num\-filtered\-rows .RE .PP The following keywords are defined and can be used to automatically pack a subset of the widgets. These are used in the default theme as depicted in the figure above. .RS .IP \(bu 2 mainbox Packs: \fB\fCinputbar, message, listview, mode\-switcher\fR .IP \(bu 2 inputbar Packs: \fB\fCprompt,entry,case\-indicator\fR .RE .PP Any widget name starting with \fB\fCtextbox\fR is a textbox widget, others are box widgets and can pack other widgets. .PP There are several special widgets that can be used by prefixing the name of the widget: .SS textbox .PP This is a read\-only textbox widget. The displayed string can be set with \fB\fCcontent\fR\&. .PP Example: .PP .RS .nf textbox\-custom { expand: false; content: "My Message"; } .fi .RE .SS Icon .PP This is an icon widget. The displayed icon can be set with \fB\fCfilename\fR and size with \fB\fCsize\fR\&. If the property \fB\fCaction\fR is set, it acts as a button. \fB\fCaction\fR can be set to a keybinding name and completes that action. (see rofi \-show keys for a list). .PP If the \fB\fCsquared\fR property is set to \fBfalse\fP the widget height and width are not forced to be equal. .PP Example: .PP .RS .nf icon\-paste { expand: false; filename: "gtk\-paste"; size: 24; vertical\-align: 0.5; action: "kb\-primary\-paste"; } .fi .RE .SS button .PP This is a textbox widget that can have a 'clickable' action. The \fB\fCaction\fR can be set to: \fB\fCkeybinding\fR: accepts a keybinding name and completes that action. (see rofi \-show keys for a list). .PP .RS .nf button\-paste { expand: false; content: "My Clickable Message"; vertical\-align: 0.5; action: "kb\-primary\-paste"; } .fi .RE .SS Children .PP To specify children, set the \fB\fCchildren\fR property (this always happens on the \fB\fCbox\fR child, see example below): .PP .RS .nf inputbar { children: [prompt,entry,overlay,case\-indicator]; } .fi .RE .PP The theme needs to be updated to match the hierarchy specified. .PP Below is an example of a theme emulating dmenu: .PP .RS .nf * { background\-color: Black; text\-color: White; border\-color: White; font: "Times New Roman 12"; } window { anchor: north; location: north; width: 100%; padding: 4px; children: [ horibox ]; } horibox { orientation: horizontal; children: [ prompt, entry, listview ]; } listview { layout: horizontal; spacing: 5px; lines: 10; } entry { expand: false; width: 10em; } element { padding: 0px 2px; } element selected { background\-color: SteelBlue; } .fi .RE .SS Padding and margin .PP Just like CSS, \fBrofi\fP uses the box model for each widget. .PP .RS .nf |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | margin | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | border | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | padding | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | | | content | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | | | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| .fi .RE .PP Explanation of the different parts: .RS .IP \(bu 2 Content \- The content of the widget. .IP \(bu 2 Padding \- Clears an area around the widget. The padding shows the background color of the widget. .IP \(bu 2 Border \- A border that goes around the padding and content. The border use the border\-color of the widget. .IP \(bu 2 Margin \- Clears an area outside the border. The margin is transparent. .RE .PP The box model allows us to add a border around elements, and to define space between elements. .PP The size of each margin, border, and padding can be set. For the border, a linestyle and radius can be set. .SS Spacing .PP Widgets that can pack more then one child widget (currently box and listview) have the \fB\fCspacing\fR property. This property sets the distance between the packed widgets (both horizontally and vertically). .PP .RS .nf |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | |\-\-\-\-\-\-\-\-| s |\-\-\-\-\-\-\-\-| s |\-\-\-\-\-\-\-| | | | child | p | child | p | child | | | | | a | | a | | | | | | c | | c | | | | | | i | | i | | | | | | n | | n | | | | |\-\-\-\-\-\-\-\-| g |\-\-\-\-\-\-\-\-| g |\-\-\-\-\-\-\-| | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| .fi .RE .SS Advanced box packing .PP More dynamic spacing can be achieved by adding dummy widgets, for example to make one widget centered: .PP .RS .nf |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | |\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-| | | | dummy | | child | | dummy | | | | expand: y | | | | expand: y | | | | | | | | | | | | | | | | | | | | | | | | | | | |\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-| | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| .fi .RE .PP If both dummy widgets are set to expand, \fB\fCchild\fR will be centered. Depending on the \fB\fCexpand\fR flag of child the remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets (expand disabled). .SH DEBUGGING .PP To get debug information from the parser, run rofi like: .PP .RS .nf G\_MESSAGES\_DEBUG=Parser rofi \-show run .fi .RE .PP Syntax errors are shown in a popup and printed out to command line with the above command. .PP To see the elements queried during running, run: .PP .RS .nf G\_MESSAGES\_DEBUG=Theme rofi \-show run .fi .RE .PP To test minor changes, part of the theme can be passed on the command line, for example to set it to full\-screen: .PP .RS .nf rofi \-theme\-str 'window { fullscreen:true;}' \-show run .fi .RE .PP To print the current theme, run: .PP .RS .nf rofi \-dump\-theme .fi .RE .SH Media support .PP Parts of the theme can be conditionally loaded, like the CSS \fB\fC@media\fR option. .PP .RS .nf @media ( min\-width: 120 ) { } .fi .RE .PP It supports the following keys as constraint: .RS .IP \(bu 2 \fB\fCmin\-width\fR: load when width is bigger or equal then value. .IP \(bu 2 \fB\fCmax\-width\fR: load when width is smaller then value. .IP \(bu 2 \fB\fCmin\-height\fR: load when height is bigger or equal then value. .IP \(bu 2 \fB\fCmax\-height\fR: load when height is smaller then value. .IP \(bu 2 \fB\fCmin\-aspect\-ratio\fR load when aspect ratio is over value. .IP \(bu 2 \fB\fCmax\-aspect\-ratio\fR: load when aspect ratio is under value. .IP \(bu 2 \fB\fCmonitor\-id\fR: The monitor id, see rofi \-help for id's. .RE .PP @media takes an integer number or a fraction, for integer number \fB\fCpx\fR can be added. .PP .RS .nf @media ( min\-width: 120 px ) { } .fi .RE .SH Font Parsing .PP Rofi uses pango \[la]https://pango.gnome.org/\[ra] for font rendering. The font should be specified in a format that pango understands. This normally is the font name followed by the font size. For example: .PP .RS .nf mono 18 .fi .RE .PP Or .PP .RS .nf FontAwesome 22 .fi .RE .SH Multiple file handling .PP The rasi file format offers two methods of including other files. This can be used to modify existing themes, or have multiple variations on a theme. .RS .IP \(bu 2 import: Import and parse a second file. .IP \(bu 2 theme: Discard theme, and load file as a fresh theme. .RE .PP Syntax: .PP .RS .nf @import "myfile" @theme "mytheme" .fi .RE .PP The specified file can either by \fIname\fP, \fIfilename\fP,\fIfull path\fP\&. .PP If a filename is provided, it will try to resolve it in the following order: .RS .IP \(bu 2 \fB\fC${XDG\_CONFIG\_HOME}/rofi/themes/\fR .IP \(bu 2 \fB\fC${XDG\_CONFIG\_HOME}/rofi/\fR .IP \(bu 2 \fB\fC${XDG\_DATA\_HOME}/rofi/themes/\fR .IP \(bu 2 \fB\fC${INSTALL PREFIX}/share/rofi/themes/\fR .RE .PP A name is resolved as a filename by appending the \fB\fC\&.rasi\fR extension. .SH EXAMPLES .PP Several examples are installed together with \fBrofi\fP\&. These can be found in \fB\fC{datadir}/rofi/themes/\fR, where \fB\fC{datadir}\fR is the install path of \fBrofi\fP data. When installed using a package manager, this is usually: \fB\fC/usr/share/\fR\&. .SH SEE ALSO .PP rofi(1), rofi\-script(5), rofi\-theme\-selector(1) rofi-1.7.1/doc/rofi-script.50000644000175100001710000001105014150243117012464 00000000000000.nh .TH ROFI\-SCRIPT 5 rofi\-script .SH NAME .PP \fBrofi script mode\fP \- Rofi format for scriptable modi. .SH DESCRIPTION .PP \fBrofi\fP supports modes that use simple scripts in the background to generate a list and process the result from user actions. This provide a simple interface to make simple extensions to rofi. .SH USAGE .PP To specify a script mode, set a mode with the following syntax: "{name}:{executable}" .PP For example: .PP .RS .nf rofi \-show fb \-modi "fb:file\_browser.sh" .fi .RE .PP The name should be unique. .SH API .PP Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline (\fB\fC\\n\fR) (This can be changed by the script). If the user selects an option, rofi calls the executable with the text of that option as the first argument. If the script returns no entries, rofi quits. .PP A simple script would be: .PP .RS .nf #!/usr/bin/env bash if [ x"$@" = x"quit" ] then exit 0 fi echo "reload" echo "quit" .fi .RE .PP This shows two entries, reload and quit. When the quit entry is selected, rofi closes. .SH Environment .PP Rofi sets the following environment variable when executing the script: .SS \fB\fCROFI\_RETV\fR .PP An integer number with the current state: .RS .IP \(bu 2 \fB0\fP: Initial call of script. .IP \(bu 2 \fB1\fP: Selected an entry. .IP \(bu 2 \fB2\fP: Selected a custom entry. .IP \(bu 2 \fB10\-28\fP: Custom keybinding 1\-19 ( need to be explicitly enabled by script ). .RE .SS \fB\fCROFI\_INFO\fR .PP Environment get set when selected entry get set with the property value of the 'info' row option, if set. .SH Passing mode options .PP Extra options, like setting the prompt, can be set by the script. Extra options are lines that start with a NULL character (\fB\fC\\0\fR) followed by a key, separator (\fB\fC\\x1f\fR) and value. .PP For example to set the prompt: .PP .RS .nf echo \-en "\\0prompt\\x1fChange prompt\\n" .fi .RE .PP The following extra options exists: .RS .IP \(bu 2 \fBprompt\fP: Update the prompt text. .IP \(bu 2 \fBmessage\fP: Update the message text. .IP \(bu 2 \fBmarkup\-rows\fP: If 'true' renders markup in the row. .IP \(bu 2 \fBurgent\fP: Mark rows as urgent. (for syntax see the urgent option in dmenu mode) .IP \(bu 2 \fBactive\fP: Mark rows as active. (for syntax see the active option in dmenu mode) .IP \(bu 2 \fBdelim\fP: Set the delimiter for for next rows. Default is '\\n' and this option should finish with this. Only call this on first call of script, it is remembered for consecutive calls. .IP \(bu 2 \fBno\-custom\fP: If set to 'true'; only accept listed entries, ignore custom input. .IP \(bu 2 \fBuse\-hot\-keys\fP: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow. .RE .SH Parsing row options .PP Extra options for individual rows can be set. The extra option can be specified following the same syntax as mode option, but following the entry. .PP For example: .PP .RS .nf echo \-en "aap\\0icon\\x1ffolder\\n" .fi .RE .PP The following options are supported: .RS .IP \(bu 2 \fBicon\fP: Set the icon for that row. .IP \(bu 2 \fBmeta\fP: Specify invisible search terms. .IP \(bu 2 \fBnonselectable\fP: If true the row cannot activated. .IP \(bu 2 \fBinfo\fP: Info that, on selection, gets placed in the \fB\fCROFI\_INFO\fR environment variable. This entry does not get searched. .RE .PP multiple entries can be passed using the \fB\fC\\x1f\fR separator. .PP .RS .nf echo \-en "aap\\0icon\\x1ffolder\\x1finfo\\x1ftest\\n" .fi .RE .SH Executing external program .PP If you want to launch an external program from the script, you need to make sure it is launched in the background. If not rofi will wait for its output (to display). .PP In bash the best way to do this is using \fB\fCcoproc\fR\&. .PP .RS .nf coproc ( myApp > /dev/null 2>\&1 ) .fi .RE .SH DASH shell .PP If you use the \fB\fCdash\fR shell for your script, take special care with how dash handles escaped values for the separators. See issue #1201 on github. .SH SEE ALSO .PP rofi(1), rofi\-sensible\-terminal(1), dmenu(1), rofi\-theme(5), rofi\-theme\-selector(1) .SH AUTHOR .PP Qball Cow qball@gmpclient.org \[la]mailto:qball@gmpclient.org\[ra] .PP Rasmus Steinke rasi@xssn.at \[la]mailto:rasi@xssn.at\[ra] .PP Quentin Glidic sardemff7+rofi@sardemff7.net \[la]mailto:sardemff7+rofi@sardemff7.net\[ra] .PP Original code based on work by: Sean Pringle sean.pringle@gmail.com \[la]mailto:sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the AUTHORS file. rofi-1.7.1/doc/rofi-sensible-terminal.10000644000175100001710000000225014150243117014573 00000000000000.nh .TH rofi\-sensible\-terminal 1 rofi\-sensible\-terminal .SH NAME .PP \fBrofi\-sensible\-terminal\fP \- launches $TERMINAL with fallbacks .SH SYNOPSIS .PP rofi\-sensible\-terminal [arguments] .SH DESCRIPTION .PP rofi\-sensible\-terminal is invoked in the rofi default config to start a terminal. This wrapper script is necessary since there is no distribution\-independent terminal launcher (but for example Debian has x\-terminal\-emulator). Distribution packagers are responsible for shipping this script in a way which is appropriate for the distribution. .PP It tries to start one of the following (in that order): .RS .IP \(bu 2 \fB\fC$TERMINAL\fR (this is a non\-standard variable) .IP \(bu 2 x\-terminal\-emulator .IP \(bu 2 urxvt .IP \(bu 2 rxvt .IP \(bu 2 st .IP \(bu 2 terminology .IP \(bu 2 qterminal .IP \(bu 2 Eterm .IP \(bu 2 aterm .IP \(bu 2 uxterm .IP \(bu 2 xterm .IP \(bu 2 roxterm .IP \(bu 2 xfce4\-terminal.wrapper .IP \(bu 2 mate\-terminal .IP \(bu 2 lxterminal .IP \(bu 2 konsole .IP \(bu 2 alacritty .IP \(bu 2 kitty .RE .SH SEE ALSO .PP rofi(1) .SH AUTHORS .PP Dave Davenport and contributors .PP Copied script from i3: Michael Stapelberg and contributors rofi-1.7.1/doc/default_theme.rasi0000644000175100001710000001136114150243117013630 00000000000000/** * rofi -dump-theme output. **/ * { red: rgba ( 220, 50, 47, 100 % ); selected-active-foreground: var(background); lightfg: rgba ( 88, 104, 117, 100 % ); separatorcolor: var(foreground); urgent-foreground: var(red); alternate-urgent-background: var(lightbg); lightbg: rgba ( 238, 232, 213, 100 % ); spacing: 2; border-color: var(foreground); normal-background: var(background); background-color: rgba ( 0, 0, 0, 0 % ); alternate-active-background: var(lightbg); active-foreground: var(blue); blue: rgba ( 38, 139, 210, 100 % ); urgent-background: var(background); alternate-normal-foreground: var(foreground); selected-active-background: var(blue); background: rgba ( 253, 246, 227, 100 % ); selected-normal-foreground: var(lightbg); active-background: var(background); alternate-active-foreground: var(blue); alternate-normal-background: var(lightbg); foreground: rgba ( 0, 43, 54, 100 % ); selected-urgent-background: var(red); selected-urgent-foreground: var(background); normal-foreground: var(foreground); alternate-urgent-foreground: var(red); selected-normal-background: var(lightfg); } element { padding: 1px ; spacing: 5px ; border: 0; cursor: pointer; } element normal.normal { background-color: var(normal-background); text-color: var(normal-foreground); } element normal.urgent { background-color: var(urgent-background); text-color: var(urgent-foreground); } element normal.active { background-color: var(active-background); text-color: var(active-foreground); } element selected.normal { background-color: var(selected-normal-background); text-color: var(selected-normal-foreground); } element selected.urgent { background-color: var(selected-urgent-background); text-color: var(selected-urgent-foreground); } element selected.active { background-color: var(selected-active-background); text-color: var(selected-active-foreground); } element alternate.normal { background-color: var(alternate-normal-background); text-color: var(alternate-normal-foreground); } element alternate.urgent { background-color: var(alternate-urgent-background); text-color: var(alternate-urgent-foreground); } element alternate.active { background-color: var(alternate-active-background); text-color: var(alternate-active-foreground); } element-text { background-color: rgba ( 0, 0, 0, 0 % ); text-color: inherit; highlight: inherit; cursor: inherit; } element-icon { background-color: rgba ( 0, 0, 0, 0 % ); size: 1.0000em ; text-color: inherit; cursor: inherit; } window { padding: 5; background-color: var(background); border: 1; } mainbox { padding: 0; border: 0; } message { padding: 1px ; border-color: var(separatorcolor); border: 2px dash 0px 0px ; } textbox { text-color: var(foreground); } listview { padding: 2px 0px 0px ; scrollbar: true; border-color: var(separatorcolor); spacing: 2px ; fixed-height: 0; border: 2px dash 0px 0px ; } scrollbar { width: 4px ; padding: 0; handle-width: 8px ; border: 0; handle-color: var(normal-foreground); } sidebar { border-color: var(separatorcolor); border: 2px dash 0px 0px ; } button { spacing: 0; text-color: var(normal-foreground); cursor: pointer; } button selected { background-color: var(selected-normal-background); text-color: var(selected-normal-foreground); } num-filtered-rows, num-rows { text-color: grey; expand: false; } textbox-num-sep { text-color: grey; expand: false; str: "/"; } inputbar { padding: 1px ; spacing: 0px ; text-color: var(normal-foreground); children: [ prompt,textbox-prompt-colon,entry, num-filtered-rows, textbox-num-sep, num-rows, case-indicator ]; } case-indicator { spacing: 0; text-color: var(normal-foreground); } entry { spacing: 0; text-color: var(normal-foreground); placeholder-color: grey; placeholder: "Type to filter"; cursor: text; } prompt { spacing: 0; text-color: var(normal-foreground); } textbox-prompt-colon { margin: 0px 0.3000em 0.0000em 0.0000em ; expand: false; str: ":"; text-color: inherit; } rofi-1.7.1/doc/rofi-theme.5.markdown0000644000175100001710000010441714150243117014115 00000000000000# ROFI-THEME 5 rofi-theme ## NAME **rofi-theme** - Rofi theme format files ## DEFAULT THEME LOADING By default, rofi loads the default theme. This theme is **always** loaded. In the default (always loaded) configuration it does: ```css @theme "default" ``` To unload the default theme, and load another theme, add `@theme` to your `config.rasi` file. If you have a theme loaded by `@theme` or use the default theme, you can tweak it by adding overriding elements at the end of your `config.rasi` file. For the difference between `@import` and `@theme` see the `Multiple file handling` section in this manpage. To see the default theme, run the following command: ```bash rofi -no-config -dump-theme ``` ## DESCRIPTION The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a user-friendly way. Therefore, a new file format has been created, replacing the old one. ## FORMAT SPECIFICATION ## Encoding The encoding of the file is utf-8. Both unix (`\n`) and windows (`\r\n`) newlines format are supported. But unix is preferred. ## Comments C and C++ file comments are supported. * Anything after `// ` and before a newline is considered a comment. * Everything between `/*` and `*/` is a comment. Comments can be nested and the C comments can be inline. The following is valid: ```css // Magic comment. property: /* comment */ value; ``` However, this is not: ```css prop/*comment*/erty: value; ``` ## White space White space and newlines, like comments, are ignored by the parser. This: ```css property: name; ``` Is identical to: ```css property : name ; ``` ## File extension The preferred file extension for the new theme format is **rasi**. This is an abbreviation for **r**ofi **a**dvanced **s**tyle **i**nformation. ## Basic Structure Each element has a section with defined properties. Global properties can be defined in section `* { }`. Sub-section names begin with a hash symbol `#`. It is advised to define the *global properties section* on top of the file to make inheritance of properties clearer. ```css /* Global properties section */ * { // list of properties } /* Element theme section. */ {element path} { // list of properties } {elements... } { // list of properties } ``` If there are multiple sections with the same name, they are merged. Duplicate properties are overwritten and the last parsed entry kept. ## Global properties section A theme can have one or more global properties sections. If there is more than one, they will be merged. The global properties section denotes the defaults for each element. Each property of this section can be referenced with `@{identifier}` (See Properties section) A global properties section is indicated with a `*` as element path. ## Element theme section A theme can have multiple element theme sections. The element path can consist of multiple names separated by whitespace or dots. Each element may contain any number of letters, numbers and `-`'s. The first element in the element path should always start with a `#`. Multiple elements can be specified by a `,`. This is a valid element name: ```css element normal.normal { background-color: blue; } button { background-color: blue; } ``` And is identical to: ```css element normal normal, button { background-color: blue; } ``` Each section inherits the global properties. Properties can be explicitly inherited from their parent with the `inherit` keyword. In the following example: ```css window { a: 1; b: 2; children: [ mainbox ]; } mainbox { a: inherit; b: 4; c: 8; } ``` The element `mainbox` will have the following set of properties (if `mainbox` is a child of `window`): ```css a: 1; b: 4; c: 8; ``` If multiple sections are defined with the same name, they are merged by the parser. If multiple properties with the same name are defined in one section, the last encountered property is used. ## Properties Format The properties in a section consist of: ```css {identifier}: {value}; ``` Both fields are mandatory for a property. The `identifier` names the specified property. Identifiers can consist of any combination of numbers, letters and '-'. It must not contain any whitespace. The structure of the `value` defines the type of the property. The current parser does not define or enforce a certain type of a particular `identifier`. When used, values with the wrong type that cannot be converted are ignored. The current theme format supports different types: * a string * an integer number * a fractional number * a boolean value * a color * image * text style * line style * a distance * a padding * a border * a position * a reference * an orientation * a cursor * a list of keywords * an environment variable * Inherit Some of these types are a combination of other types. ## String * Format: `"[:print:]+"` A string is always surrounded by double quotes (`"`). Between the quotes there can be any printable character. For example: ```css font: "Awasome 12"; ``` The string must be valid UTF-8. ## Integer * Format: `[-+]?[:digit:]+` An integer may contain any number. For examples: ```css lines: 12; ``` ## Real * Format: `[-+]?[:digit:]+(\.[:digit:]+)?` A real is an integer with an optional fraction. For example: ```css real: 3.4; ``` The following is not valid: `.3`, `3.` or scientific notation: `3.4e-3`. ## Boolean * Format: `(true|false)` Boolean value is either `true` or `false`. This is case-sensitive. For example: ```css dynamic: false; ``` ## Image **rofi** support a limited set of background-image formats. * Format: url("path to image"); * Format: url("path to image", scale); where scale is: none, both, width, height * Format: linear-gradient(stop color,stop1, color, stop2 color, ...); * Format: linear-gradient(to direction, stop color,stop1, color, stop2 color, ...); where direction is: top,left,right,bottom. * Format: linear-gradient(angle, stop color,stop1, color, stop2 color, ...); Angle in deg,rad,grad (as used in color). Where the `path` is a string, and `stop` color is of type color. ## Color **rofi** supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4) * Format: `#{HEX}{3}` (rgb) * Format: `#{HEX}{4}` (rgba) * Format: `#{HEX}{6}` (rrggbb) * Format: `#{HEX}{8}` (rrggbbaa) * Format: `rgb[a]({INTEGER},{INTEGER},{INTEGER}[, {PERCENTAGE}])` * Format: `rgb[a]({INTEGER}%,{INTEGER}%,{INTEGER}%[, {PERCENTAGE}])` * Format: `hsl[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])` * Format: `hwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])` * Format: `cmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE} ])` * Format: `{named-color} [ / {PERCENTAGE} ]` The white-space format proposed in CSS4 is also supported. The different values are: * `{HEX}` is a hexadecimal number ('0-9a-f' case insensitive). * `{INTEGER}` value can be between 0 and 255 or 0-100 when representing percentage. * `{ANGLE}` is the angle on the color wheel, can be in `deg`, `rad`, `grad` or `turn`. When no unit is specified, degrees is assumed. * `{PERCENTAGE}` can be between 0-1.0, or 0%-100% * `{named-color}` is one of the following colors: AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, DimGray, DimGrey, DodgerBlue, FireBrick, FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, GoldenRod, Gray, Grey, Green, GreenYellow, HoneyDew, HotPink, IndianRed, Indigo, Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, LemonChiffon, LightBlue, LightCoral, LightCyan, LightGoldenRodYellow, LightGray, LightGrey, LightGreen, LightPink, LightSalmon, LightSeaGreen, LightSkyBlue, LightSlateGray, LightSlateGrey, LightSteelBlue, LightYellow, Lime, LimeGreen, Linen, Magenta, Maroon, MediumAquaMarine, MediumBlue, MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, MintCream, MistyRose, Moccasin, NavajoWhite, Navy, OldLace, Olive, OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenRod, PaleGreen, PaleTurquoise, PaleVioletRed, PapayaWhip, PeachPuff, Peru, Pink, Plum, PowderBlue, Purple, RebeccaPurple, Red, RosyBrown, RoyalBlue, SaddleBrown, Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, SlateGray, SlateGrey, Snow, SpringGreen, SteelBlue, Tan, Teal, Thistle, Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, YellowGreen,transparent For example: ```css background-color: #FF0000; border-color: rgba(0,0,1, 0.5); text-color: SeaGreen; ``` or ```css background-color: transparent; text-color: Black; ``` ## Text style * Format: `(bold|italic|underline|strikethrough|none)` Text style indicates how the highlighted text is emphasized. `None` indicates that no emphasis should be applied. * `bold`: make the text thicker then the surrounding text. * `italic`: put the highlighted text in script type (slanted). * `underline`: put a line under the highlighted text. * `strikethrough`: put a line through the highlighted text. ## Line style * Format: `(dash|solid)` Indicates how a line should be drawn. It currently supports: * `dash`: a dashed line, where the gap is the same width as the dash * `solid`: a solid line ## Distance * Format: `{Integer}px` * Format: `{Real}em` * Format: `{Real}ch` * Format: `{Real}%` * Format: `{Integer}mm` A distance can be specified in 3 different units: * `px`: Screen pixels. * `em`: Relative to text height. * `ch`: Relative to width of a single number. * `mm`: Actual size in millimeters (based on dpi). * `%`: Percentage of the **monitor** size. Distances used in the horizontal direction use the monitor width. Distances in the vertical direction use the monitor height. For example: ```css padding: 10%; ``` On a full-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left and right side and 108 pixels on the top and bottom. ### Calculating sizes Rofi supports some maths in calculating sizes. For this it uses the CSS syntax: ```css width: calc( 100% - 37px ); ``` It supports the following operations: * `+` : Add * `-` : Subtract * `/` : Divide * `*` : Multiply * `%` : Multiply * `min` : Minimum of l or rvalue; * `max` : Maximum of l or rvalue; It uses the C precedence ordering. ## Padding * Format: `{Integer}` * Format: `{Distance}` * Format: `{Distance} {Distance}` * Format: `{Distance} {Distance} {Distance}` * Format: `{Distance} {Distance} {Distance} {Distance}` If no unit is specified, pixels are assumed. The different number of fields in the formats are parsed like: * 1 field: `all` * 2 fields: `top&bottom` `left&right` * 3 fields: `top`, `left&right`, `bottom` * 4 fields: `top`, `right`, `bottom`, `left` ## Border * Format: `{Integer}` * Format: `{Distance}` * Format: `{Distance} {Distance}` * Format: `{Distance} {Distance} {Distance}` * Format: `{Distance} {Distance} {Distance} {Distance}` * Format: `{Distance} {Line style}` * Format: `{Distance} {Line style} {Distance} {Line style}` * Format: `{Distance} {Line style} {Distance} {Line style} {Distance} {Line style}` * Format: `{Distance} {Line style} {Distance} {Line style} {Distance} {Line style} {Distance} {Line style}` Borders are identical to padding, except that each distance field has a line style property. > When no unit is specified, pixels are assumed. ## Position Indicate a place on the window/monitor. * Format: `(center|east|north|west|south|north east|north west|south west|south east)` ``` north west | north | north east -------------|-------------|------------ west | center | east -------------|-------------|------------ south west | south | south east ``` ## Visibility It is possible to hide widgets: inputbar { enabled: false; } ## Reference * Format: `@{PROPERTY NAME}` A reference can point to another reference. Currently, the maximum number of redirects is 20. A property always refers to another property. It cannot be used for a subpart of the property. For example, this is not valid: ```css highlight: bold @pink; ``` But this is: ```css * { myhigh: bold #FAA; } window { highlight: @myhigh; } ``` * Format: `var(PROPERTY NAME, DEFAULT)` A reference can point to another reference. Currently, the maximum number of redirects is 20. A property always refers to another property. It cannot be used for a subpart of the property. Example: ```css window { width: var( width, 30%); } ``` If the property `width` is set globally (`*{}`) that value is used, if the property `width` is not set, the default value is used. ## Orientation * Format: `(horizontal|vertical)` Specify the orientation of the widget. ## Cursor * Format: `(default|pointer|text)` Specify the type of mouse cursor that is set when the mouse pointer is over the widget. ## List of keywords * Format: `[ keyword, keyword ]` A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. The `keyword` in the list refers to an widget name. ## Environment variable * Format: `${:alnum:}` This will parse the environment variable as the property value. (that then can be any of the above types). The environment variable should be an alphanumeric string without white-space. ```css * { background-color: ${BG}; } ``` * Format: `env(ENVIRONMENT, default)` This will parse the environment variable as the property value. (that then can be any of the above types). The environment variable should be an alphanumeric string without white-space. If the environment value is not found, the default value is used. ```css window { width: env(WIDTH, 40%); } ``` If environment WIDTH is set, then that value is parsed, otherwise the default value (`40%`). ## Inherit * Format: `inherit` Inherits the property from its parent widget. ```css mainbox { border-color: inherit; } ``` ## ELEMENTS PATHS Element paths exists of two parts, the first part refers to the actual widget by name. Some widgets have an extra state. For example: ```css element selected { } ``` Here `element selected` is the name of the widget, `selected` is the state of the widget. The difference between dots and spaces is purely cosmetic. These are all the same: ```css element .selected { element.selected { } element selected { } ``` ## SUPPORTED ELEMENT PATH ## Name The current widgets available in **rofi**: * `window` * `overlay`: the overlay widget. * `mainbox`: The mainbox box. * `inputbar`: The input bar box. * `box`: the horizontal @box packing the widgets * `case-indicator`: the case/sort indicator @textbox * `prompt`: the prompt @textbox * `entry`: the main entry @textbox * `num-rows`: Shows the total number of rows. * `num-filtered-rows`: Shows the total number of rows after filtering. * `listview`: The listview. * `scrollbar`: the listview scrollbar * `element`: a box in the listview holding the entries * `element-icon`: the widget in the listview's entry showing the (optional) icon * `element-index`: the widget in the listview's entry keybindable index (1,2,3..0) * `element-text`: the widget in the listview's entry showing the text. * `mode-switcher`: the main horizontal @box packing the buttons. * `button`: the buttons @textbox for each mode * `message`: The container holding the textbox. * `textbox`: the message textbox Note that these path names match the default theme. Themes that provide a custom layout will have different elements, and structure. ## State State: State of widget Optional flag(s) indicating state of the widget, used for theming. These are appended after the name or class of the widget. ### Example: `button selected.normal { }` `element selected.urgent { }` Currently only the entrybox and scrollbar have states: ### Entrybox: `{visible modifier}.{state}` Where `visible modifier` can be: * normal: no modification * selected: the entry is selected/highlighted by user * alternate: the entry is at an alternating row (uneven row) Where `state` is: * normal: no modification * urgent: this entry is marked urgent * active: this entry is marked active These can be mixed. Example: ```css nametotextbox selected.active { background-color: #003642; text-color: #008ed4; } ``` Sets all selected textboxes marked active to the given text and background color. Note that a state modifies the original element, it therefore contains all the properties of that element. ### Scrollbar The scrollbar uses the `handle` state when drawing the small scrollbar handle. This allows the colors used for drawing the handle to be set independently. ## SUPPORTED PROPERTIES The following properties are currently supported: ### all widgets: * **enabled**: enable/disable the widget * **padding**: padding Padding on the inside of the widget * **margin**: padding Margin on the outside of the widget * **border**: border Border around the widget (between padding and margin)/ * **border-radius**: padding Sets a radius on the corners of the borders. * **background-color**: color Background color * **background-image**: image Background image * **border-color**: color Color of the border * **cursor**: cursor Type of mouse cursor that is set when the mouse pointer is hovered over the widget. ### window: * **font**: string The font used in the window * **transparency**: string Indicating if transparency should be used and what type: **real** - True transparency. Only works with a compositor. **background** - Take a screenshot of the background image and use that. **screenshot** - Take a screenshot of the screen and use that. **Path** to png file - Use an image. * **location**: position The place of the anchor on the monitor * **anchor**: anchor The anchor position on the window * **fullscreen**: boolean Window is fullscreen. * **width**: distance The width of the window * **x-offset**: distance * **y-offset**: distance The offset of the window to the anchor point, allowing you to push the window left/right/up/down ### scrollbar: * **background-color**: color * **handle-width**: distance * **handle-color**: color * **border-color**: color ### box: * **orientation**: orientation Set the direction the elements are packed. * **spacing**: distance Distance between the packed elements. ### textbox: * **background-color**: color * **border-color**: the color used for the border around the widget. * **font**: the font used by this textbox (string). * **str**: the string to display by this textbox (string). * **vertical-align**: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). * **horizontal-align**: Horizontal alignment of the text. A number between 0 (left) and 1 (right). * **text-color**: the text color to use. * **highlight**: text style {color}. color is optional, multiple highlight styles can be added like: bold underline italic #000000; This option is only available on the `element-text` widget. * **width**: override the desired width for the textbox. * **content**: Set the displayed text (String). * **placeholder**: Set the displayed text (String) when nothing is entered. * **placeholder-color**: Color of the placeholder text. * **blink**: Enable/Disable blinking on an input textbox (Boolean). * **markup**: Force markup on, beware that only valid pango markup strings are shown. ### listview: * **columns**: integer Number of columns to show (at least 1) * **fixed-height**: boolean Always show `lines` rows, even if fewer elements are available. * **dynamic**: boolean `True` if the size should change when filtering the list, `False` if it should keep the original height. * **scrollbar**: boolean If the scrollbar should be enabled/disabled. * **scrollbar-width**: distance Width of the scrollbar * **cycle**: boolean When navigating, it should wrap around * **spacing**: distance Spacing between the elements (both vertical and horizontal) * **lines**: integer Number of rows to show in the list view. * **layout**: orientation Indicate how elements are stacked. Horizontal implements the dmenu style. * **reverse**: boolean Reverse the ordering (top down to bottom up). * **fixed-columns**: boolean Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. Each element is a `box` called `element`. Each `element` can contain an `element-icon` and `element-text`. ### listview text highlight: The `element-text` widget in the `listview` is the one used to show the text. On this widget set the `highlight` property (only place this property is used) to change the style of highlighting. The `highlight` property consist of the `text-style` property and a color. To disable highlighting: ```css element-text { highlight: None; } ``` To set to red underlined: ```css element-text { highlight: underline red; } ``` ## Layout The new format allows the layout of the **rofi** window to be tweaked extensively. For each widget, the themer can specify padding, margin, border, font, and more. It even allows, as an advanced feature, to pack widgets in a custom structure. ### Basic structure The whole view is made out of boxes that pack other boxes or widgets. The box can be vertical or horizontal. This is loosely inspired by [GTK](http://gtk.org/). The current layout of **rofi** is structured as follows: ``` |------------------------------------------------------------------------------------| | window {BOX:vertical} | | |-------------------------------------------------------------------------------| | | | mainbox {BOX:vertical} | | | | |---------------------------------------------------------------------------| | | | | | inputbar {BOX:horizontal} | | | | | | |---------| |-| |---------------------------------|---| |---| |---| |---| | | | | | | | prompt | |:| | entry |#fr| | / | |#ns| |ci | | | | | | | |---------| |_| |---------------------------------|---| |---| |---| |---| | | | | | |---------------------------------------------------------------------------| | | | | | | | | |---------------------------------------------------------------------------| | | | | | message | | | | | | |-----------------------------------------------------------------------| | | | | | | | textbox | | | | | | | |-----------------------------------------------------------------------| | | | | | |---------------------------------------------------------------------------| | | | | | | | | |-----------------------------------------------------------------------------| | | | | listview | | | | | |------------------------------------------------------------------------] | | | | | | element | | | | | | | |-----------------| |------------------------------------------------] | | | | | | | |element-icon | |element-text | | | | | | | | |-----------------| |------------------------------------------------| | | | | | | |------------------------------------------------------------------------] | | | | |-----------------------------------------------------------------------------| | | | | | | | |---------------------------------------------------------------------------| | | | | | mode-switcher {BOX:horizontal} | | | | | | |---------------| |---------------| |--------------| |---------------| | | | | | | | Button | | Button | | Button | | Button | | | | | | | |---------------| |---------------| |--------------| |---------------| | | | | | |---------------------------------------------------------------------------| | | | |-------------------------------------------------------------------------------| | |------------------------------------------------------------------------------------| ``` > * ci is the case-indicator > * fr is the num-filtered-rows > * ns is the num-rows ### Error message structure ``` |-----------------------------------------------------------------------------------| | window {BOX:vertical} | | |------------------------------------------------------------------------------| | | | error-message {BOX:vertical} | | | | |-------------------------------------------------------------------------| | | | | | textbox | | | | | |-------------------------------------------------------------------------| | | | |------------------------------------------------------------------------------| | |-----------------------------------------------------------------------------------| ``` ### Advanced layout The layout of **rofi** can be tweaked by packing the 'fixed' widgets in a custom structure. The following widgets are fixed, as they provide core **rofi** functionality: * prompt * entry * overlay * case-indicator * message * listview * mode-switcher * num-rows * num-filtered-rows The following keywords are defined and can be used to automatically pack a subset of the widgets. These are used in the default theme as depicted in the figure above. * mainbox Packs: `inputbar, message, listview, mode-switcher` * inputbar Packs: `prompt,entry,case-indicator` Any widget name starting with `textbox` is a textbox widget, others are box widgets and can pack other widgets. There are several special widgets that can be used by prefixing the name of the widget: #### textbox This is a read-only textbox widget. The displayed string can be set with `content`. Example: ```css textbox-custom { expand: false; content: "My Message"; } ``` #### Icon This is an icon widget. The displayed icon can be set with `filename` and size with `size`. If the property `action` is set, it acts as a button. `action` can be set to a keybinding name and completes that action. (see rofi -show keys for a list). If the `squared` property is set to **false** the widget height and width are not forced to be equal. Example: ```css icon-paste { expand: false; filename: "gtk-paste"; size: 24; vertical-align: 0.5; action: "kb-primary-paste"; } ``` #### button This is a textbox widget that can have a 'clickable' action. The `action` can be set to: `keybinding`: accepts a keybinding name and completes that action. (see rofi -show keys for a list). ```css button-paste { expand: false; content: "My Clickable Message"; vertical-align: 0.5; action: "kb-primary-paste"; } ``` #### Children To specify children, set the `children` property (this always happens on the `box` child, see example below): ```css inputbar { children: [prompt,entry,overlay,case-indicator]; } ``` The theme needs to be updated to match the hierarchy specified. Below is an example of a theme emulating dmenu: ```css * { background-color: Black; text-color: White; border-color: White; font: "Times New Roman 12"; } window { anchor: north; location: north; width: 100%; padding: 4px; children: [ horibox ]; } horibox { orientation: horizontal; children: [ prompt, entry, listview ]; } listview { layout: horizontal; spacing: 5px; lines: 10; } entry { expand: false; width: 10em; } element { padding: 0px 2px; } element selected { background-color: SteelBlue; } ``` ### Padding and margin Just like CSS, **rofi** uses the box model for each widget. ``` |-------------------------------------------------------------------| | margin | | |-------------------------------------------------------------| | | | border | | | | |---------------------------------------------------------| | | | | | padding | | | | | | |-----------------------------------------------------| | | | | | | | content | | | | | | | |-----------------------------------------------------| | | | | | |---------------------------------------------------------| | | | |-------------------------------------------------------------| | |-------------------------------------------------------------------| ``` Explanation of the different parts: * Content - The content of the widget. * Padding - Clears an area around the widget. The padding shows the background color of the widget. * Border - A border that goes around the padding and content. The border use the border-color of the widget. * Margin - Clears an area outside the border. The margin is transparent. The box model allows us to add a border around elements, and to define space between elements. The size of each margin, border, and padding can be set. For the border, a linestyle and radius can be set. ### Spacing Widgets that can pack more then one child widget (currently box and listview) have the `spacing` property. This property sets the distance between the packed widgets (both horizontally and vertically). ``` |---------------------------------------| | |--------| s |--------| s |-------| | | | child | p | child | p | child | | | | | a | | a | | | | | | c | | c | | | | | | i | | i | | | | | | n | | n | | | | |--------| g |--------| g |-------| | |---------------------------------------| ``` ### Advanced box packing More dynamic spacing can be achieved by adding dummy widgets, for example to make one widget centered: ``` |----------------------------------------------------| | |---------------| |--------| |---------------| | | | dummy | | child | | dummy | | | | expand: true; | | | | expand: true; | | | | | | | | | | | | | | | | | | | | | | | | | | | |---------------| |--------| |---------------| | |----------------------------------------------------| ``` If both dummy widgets are set to expand, `child` will be centered. Depending on the `expand` flag of child the remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets (expand disabled). ## DEBUGGING To get debug information from the parser, run rofi like: ``` G_MESSAGES_DEBUG=Parser rofi -show run ``` Syntax errors are shown in a popup and printed out to command line with the above command. To see the elements queried during running, run: ``` G_MESSAGES_DEBUG=Theme rofi -show run ``` To test minor changes, part of the theme can be passed on the command line, for example to set it to full-screen: ``` rofi -theme-str 'window { fullscreen:true;}' -show run ``` To print the current theme, run: ``` rofi -dump-theme ``` ## Media support Parts of the theme can be conditionally loaded, like the CSS `@media` option. ``` @media ( min-width: 120 ) { } ``` It supports the following keys as constraint: * `min-width`: load when width is bigger or equal then value. * `max-width`: load when width is smaller then value. * `min-height`: load when height is bigger or equal then value. * `max-height`: load when height is smaller then value. * `min-aspect-ratio` load when aspect ratio is over value. * `max-aspect-ratio`: load when aspect ratio is under value. * `monitor-id`: The monitor id, see rofi -help for id's. @media takes an integer number or a fraction, for integer number `px` can be added. ``` @media ( min-width: 120 px ) { } ``` ## Font Parsing Rofi uses [pango](https://pango.gnome.org/) for font rendering. The font should be specified in a format that pango understands. This normally is the font name followed by the font size. For example: ``` mono 18 ``` Or ``` FontAwesome 22 ``` ## Multiple file handling The rasi file format offers two methods of including other files. This can be used to modify existing themes, or have multiple variations on a theme. * import: Import and parse a second file. * theme: Discard theme, and load file as a fresh theme. Syntax: ``` @import "myfile" @theme "mytheme" ``` The specified file can either by *name*, *filename*,*full path*. If a filename is provided, it will try to resolve it in the following order: * `${XDG_CONFIG_HOME}/rofi/themes/` * `${XDG_CONFIG_HOME}/rofi/` * `${XDG_DATA_HOME}/rofi/themes/` * `${INSTALL PREFIX}/share/rofi/themes/` A name is resolved as a filename by appending the `.rasi` extension. ## EXAMPLES Several examples are installed together with **rofi**. These can be found in `{datadir}/rofi/themes/`, where `{datadir}` is the install path of **rofi** data. When installed using a package manager, this is usually: `/usr/share/`. ## SEE ALSO rofi(1), rofi-script(5), rofi-theme-selector(1) rofi-1.7.1/doc/meson_build_manpages.sh0000755000175100001710000000030514150243117014650 00000000000000#!/usr/bin/env bash ## Did not get this working in meson directly. ## not via generator or custom_target. pushd "${MESON_BUILD_ROOT}" for a in $@ do go-md2man -in $a -out ${a%.markdown} done rofi-1.7.1/doc/rofi-theme-selector.1.markdown0000644000175100001710000000201214150243117015713 00000000000000# rofi-theme-selector 1 rofi-theme-selector ## NAME **rofi-theme-selector** - Preview and apply themes for **rofi** ## DESCRIPTION **rofi-theme-selector** is a bash/rofi script to preview and apply themes for **rofi**. It's part of any installation of **rofi**. ## USAGE ### Running rofi-theme-selector **rofi-theme-selector** shows a list of all available themes in a **rofi** window. It lets you preview each theme with the Enter key and apply the theme to your **rofi** configuration file with Alt+a. ## Theme directories **rofi-theme-selector** searches the following directories for themes: * ${PREFIX}/share/rofi/themes * $XDG_CONFIG_HOME/rofi/themes * $XDG_DATA_HOME/share/rofi/themes ${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".
$XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config".
$XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share". ## SEE ALSO rofi(1) ## AUTHORS Qball Cow qball@gmpclient.org
Rasmus Steinke rasi@xssn.at rofi-1.7.1/doc/rofi.doxy.in0000644000175100001710000030403514150243117012416 00000000000000# Doxyfile 1.8.9.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "@PACKAGE@" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = "@VERSION@" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = @abs_builddir@/html/ # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class " \ "The $name widget " \ "The $name file " \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = YES # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = YES # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text " # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. # Note: If this tag is empty the current directory is searched. INPUT = @abs_top_srcdir@/source/ \ @abs_top_srcdir@/include/ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank the # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, # *.qsf, *.as and *.js. FILE_PATTERNS = *.h \ *.c # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). #EXAMPLE_PATH = ../example/ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = *.c # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = YES # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = NO # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /