1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 12:00:31 +01:00

util: Created header to define functions that may be used in more that one place

Using local function prototype redefinition is dangerous, now the
prototype is seen in all concerned files.
This commit is contained in:
Christophe CURIS
2013-05-12 00:24:36 +02:00
committed by Carlos R. Mafra
parent f2824647f3
commit d44aa97243
6 changed files with 46 additions and 6 deletions

View File

@@ -28,17 +28,17 @@ wxpaste_LDADD = @XLFLAGS@ @XLIBS@
getstyle_LDADD = $(top_builddir)/WINGs/libWUtil.la $(liblist)
getstyle_SOURCES = getstyle.c fontconv.c
getstyle_SOURCES = getstyle.c fontconv.c common.h
setstyle_LDADD = \
$(top_builddir)/WINGs/libWUtil.la \
@XLFLAGS@ @XLIBS@ $(liblist)
setstyle_SOURCES = setstyle.c fontconv.c
setstyle_SOURCES = setstyle.c fontconv.c common.h
convertfonts_LDADD = $(top_builddir)/WINGs/libWUtil.la $(liblist)
convertfonts_SOURCES = convertfonts.c fontconv.c
convertfonts_SOURCES = convertfonts.c fontconv.c common.h
seticons_LDADD= $(top_builddir)/WINGs/libWUtil.la $(liblist)

33
util/common.h Normal file
View File

@@ -0,0 +1,33 @@
/*
* Command-line utilities for WindowMaker
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2004 Dan Pascu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
/*
* Functions that are used by more than one tool
*/
#ifndef UTIL_COMMON_H
#define UTIL_COMMON_H
/* ---[ util/fontconv.c ]------------------------------------------------- */
char *convertFont(char *font, Bool keepXLFD);
#endif

View File

@@ -35,6 +35,9 @@
#include "../src/wconfig.h"
#include "common.h"
char *FontOptions[] = {
"IconTitleFont",
"ClipTitleFont",
@@ -50,7 +53,6 @@ char *FontOptions[] = {
extern char *__progname;
extern char *convertFont(char *font, Bool keepXLFD);
void print_help(int print_usage, int exitval)
{

View File

@@ -7,6 +7,9 @@
#include "../src/wconfig.h"
#include "common.h"
#define DEFAULT_FONT "sans serif:pixelsize=12"
/* X Font Name Suffix field names */

View File

@@ -40,6 +40,8 @@
#include <WINGs/WUtil.h>
#include "common.h"
#define RETRY( x ) do { \
x; \
} while (errno == EINTR);
@@ -135,7 +137,6 @@ WMPropList *PixmapPath = NULL;
char *ThemePath = NULL;
extern char *convertFont(char *font, Bool keepXLFD);
void print_help(int print_usage, int exitval)
{

View File

@@ -38,6 +38,8 @@
#include "../src/wconfig.h"
#include "common.h"
#define MAX_OPTIONS 128
char *FontOptions[] = {
@@ -75,7 +77,6 @@ int ignoreCursors = 0;
Display *dpy;
extern char *convertFont(char *font, Bool keepXLFD);
static Bool isCursorOption(char *option)
{