Merge branch 'master' of git://github.com/xorg62/wmfs
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
# -*- mode: cmake -*-
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/parse)
|
||||
|
||||
SET(WMFS_SOURCES
|
||||
parse/parse.c
|
||||
parse/api.c
|
||||
barwin.c
|
||||
client.c
|
||||
config.c
|
||||
draw.c
|
||||
event.c
|
||||
ewmh.c
|
||||
frame.c
|
||||
getinfo.c
|
||||
infobar.c
|
||||
init.c
|
||||
launcher.c
|
||||
layout.c
|
||||
menu.c
|
||||
mouse.c
|
||||
screen.c
|
||||
status.c
|
||||
systray.c
|
||||
tag.c
|
||||
util.c
|
||||
viwmfs.c
|
||||
wmfs.c
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${WMFS_SOURCES})
|
||||
target_link_libraries(${PROJECT_NAME} ${CMAKE_LINK_LIBRARIES})
|
||||
INSTALL ( TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX} )
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* config.h
|
||||
* Copyright © 2008 Martin Duquesnoy <xorg62@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name of the nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
#define WMFS_VERSION "@VERSION@"
|
||||
#define WMFS_COMPILE_MACHINE "@CMAKE_SYSTEM_PROCESSOR@"
|
||||
#define WMFS_COMPILE_BY "@USERNAME@"
|
||||
#define WMFS_COMPILE_FLAGS "@CMAKE_C_FLAGS@"
|
||||
#define WMFS_LINKED_LIBS "@CMAKE_LINK_LIBRARIES@"
|
||||
#define XDG_CONFIG_DIR "@CMAKE_XDGCONFDIR@"
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
@@ -80,7 +80,9 @@ static struct keyword *
|
||||
push_keyword(struct keyword *tail, enum keyword_t type, char *buf, size_t *offset, struct files *file, int line)
|
||||
{
|
||||
struct keyword *kw;
|
||||
#ifdef DEBUG
|
||||
int i = 0;
|
||||
#endif
|
||||
|
||||
if (type == WORD && *offset == 0)
|
||||
return tail;
|
||||
@@ -165,8 +167,15 @@ parse_keywords(const char *filename)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (st.st_size == 0) {
|
||||
warnx("%s: empty file", filename);
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!realpath(filename, path)) {
|
||||
warn("%s", filename);
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -338,7 +347,7 @@ include(struct keyword *head)
|
||||
filename = head->name;
|
||||
|
||||
if (!(kw = parse_keywords(filename))) {
|
||||
warnx("no config fond in include file %s", head->name);
|
||||
warnx("no config found in include file %s", head->name);
|
||||
|
||||
if (filename != head->name)
|
||||
free(filename);
|
||||
|
||||
@@ -449,11 +449,7 @@ main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
printf("WMFS version : "WMFS_VERSION"\n"
|
||||
" Compilation settings :\n"
|
||||
" - Flags : "WMFS_COMPILE_FLAGS"\n"
|
||||
" - Linked Libs : "WMFS_LINKED_LIBS"\n"
|
||||
" - On "WMFS_COMPILE_MACHINE" by "WMFS_COMPILE_BY".\n");
|
||||
printf("WMFS "WMFS_VERSION"\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
break;
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
|
||||
/* Local headers */
|
||||
#include "parse/parse.h"
|
||||
#include "config.h"
|
||||
#include "structs.h"
|
||||
|
||||
/* Optional dependencies */
|
||||
|
||||
Reference in New Issue
Block a user