1
0
Fork 0
mirror of https://github.com/Raymo111/i3lock-color.git synced 2024-12-02 14:05:43 -05:00

Merge everything from upstream except PR i3#280

This commit is contained in:
Raymond Li 2020-07-18 21:59:04 -04:00
parent b5724ab6d2
commit 79a9eacaed
No known key found for this signature in database
GPG key ID: A014EA89B62BBB1B
6 changed files with 13 additions and 15 deletions

View file

@ -8,3 +8,4 @@ IndentWidth: 4
PointerBindsToType: false PointerBindsToType: false
ColumnLimit: 0 ColumnLimit: 0
SpaceBeforeParens: ControlStatements SpaceBeforeParens: ControlStatements
SortIncludes: false

View file

@ -7,11 +7,7 @@ language: c
compiler: compiler:
- gcc - gcc
- clang - clang
addons:
apt:
packages:
- clang-format-3.5
script: script:
- clang-format-3.5 -i *.[ch] && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false)
- docker build --pull --no-cache --rm -t=i3lock -f travis/Dockerfile . - docker build --pull --no-cache --rm -t=i3lock -f travis/Dockerfile .
- docker run -e CC=$CC -v $PWD:/usr/src:rw i3lock /bin/sh -c 'clang-format-9 -i *.[ch] && git diff --exit-code || (echo "Code was not formatted using clang-format!"; false)'
- docker run -e CC=$CC -v $PWD:/usr/src:rw i3lock /bin/sh -c 'autoreconf -fi && mkdir -p build && cd build && (../configure || (cat config.log; false)) && make -j V=1 CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror"' - docker run -e CC=$CC -v $PWD:/usr/src:rw i3lock /bin/sh -c 'autoreconf -fi && mkdir -p build && cd build && (../configure || (cat config.log; false)) && make -j V=1 CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror"'

View file

@ -66,6 +66,7 @@ AC_FUNC_FORK
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_STRNLEN AC_FUNC_STRNLEN
AC_CHECK_FUNCS([atexit dup2 ftruncate getcwd gettimeofday localtime_r memchr memset mkdir rmdir setlocale socket strcasecmp strchr strdup strerror strncasecmp strndup strrchr strspn strstr strtol strtoul], , [AC_MSG_FAILURE([cannot find the $ac_func function, which i3lock requires])]) AC_CHECK_FUNCS([atexit dup2 ftruncate getcwd gettimeofday localtime_r memchr memset mkdir rmdir setlocale socket strcasecmp strchr strdup strerror strncasecmp strndup strrchr strspn strstr strtol strtoul], , [AC_MSG_FAILURE([cannot find the $ac_func function, which i3lock requires])])
AC_CHECK_FUNCS([explicit_bzero])
# Checks for libraries. # Checks for libraries.

View file

@ -18,7 +18,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <pwd.h> #include <pwd.h>
#include <sys/types.h> #include <sys/types.h>
#include <string.h>
#include <dirent.h> #include <dirent.h>
#include <unistd.h> #include <unistd.h>
#include <stdbool.h> #include <stdbool.h>
@ -29,7 +28,7 @@
#include <err.h> #include <err.h>
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#ifdef __OpenBSD__ #ifdef HAVE_EXPLICIT_BZERO
#include <bsd_auth.h> #include <bsd_auth.h>
#else #else
#include <security/pam_appl.h> #include <security/pam_appl.h>
@ -45,7 +44,7 @@
#include <xkbcommon/xkbcommon-x11.h> #include <xkbcommon/xkbcommon-x11.h>
#include <cairo.h> #include <cairo.h>
#include <cairo/cairo-xcb.h> #include <cairo/cairo-xcb.h>
#ifdef __OpenBSD__ #ifdef HAVE_EXPLICIT_BZERO
#include <strings.h> /* explicit_bzero(3) */ #include <strings.h> /* explicit_bzero(3) */
#endif #endif
#include <xcb/xcb_aux.h> #include <xcb/xcb_aux.h>
@ -906,7 +905,7 @@ static void process_xkb_event(xcb_generic_event_t *gevent) {
* and also redraw the image, if any. * and also redraw the image, if any.
* *
*/ */
void handle_screen_resize(void) { static void handle_screen_resize(void) {
xcb_get_geometry_cookie_t geomc; xcb_get_geometry_cookie_t geomc;
xcb_get_geometry_reply_t *geom; xcb_get_geometry_reply_t *geom;
geomc = xcb_get_geometry(conn, screen->root); geomc = xcb_get_geometry(conn, screen->root);

View file

@ -8,10 +8,11 @@
* This is important because xautolock (for example) closes stdout/stderr by * This is important because xautolock (for example) closes stdout/stderr by
* default, so just printing something to stdout will lead to the data ending * default, so just printing something to stdout will lead to the data ending
* up on the X11 socket (!). */ * up on the X11 socket (!). */
#define DEBUG(fmt, ...) \ #define DEBUG(fmt, ...) \
do { \ do { \
if (debug_mode) \ if (debug_mode) { \
printf("[i3lock-debug] " fmt, ##__VA_ARGS__); \ fprintf(stderr, "[i3lock-debug] " fmt, ##__VA_ARGS__); \
} \
} while (0) } while (0)
#endif #endif

View file

@ -11,7 +11,7 @@ RUN echo 'APT::Acquire::Retries "5";' > /etc/apt/apt.conf.d/80retry
# (3608 kB/s)). Hence, lets stick with httpredir.debian.org (default) for now. # (3608 kB/s)). Hence, lets stick with httpredir.debian.org (default) for now.
# Install mk-build-deps (for installing the i3 build dependencies), # Install mk-build-deps (for installing the i3 build dependencies),
# clang and clang-format-3.8 (for checking formatting and building with clang), # clang and clang-format-9 (for checking formatting and building with clang),
# lintian (for checking spelling errors), # lintian (for checking spelling errors),
# test suite dependencies (for running tests) # test suite dependencies (for running tests)
RUN apt-get update && \ RUN apt-get update && \
@ -19,7 +19,7 @@ RUN apt-get update && \
build-essential clang git autoconf automake libxcb-randr0-dev pkg-config libpam0g-dev \ build-essential clang git autoconf automake libxcb-randr0-dev pkg-config libpam0g-dev \
libcairo2-dev libxcb1-dev libxcb-dpms0-dev libxcb-image0-dev libxcb-util0-dev \ libcairo2-dev libxcb1-dev libxcb-dpms0-dev libxcb-image0-dev libxcb-util0-dev \
libxcb-xrm-dev libev-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev \ libxcb-xrm-dev libev-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev \
libxkbcommon-x11-dev && \ libxkbcommon-x11-dev clang-format-9 && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src WORKDIR /usr/src