mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 03:50:30 +01:00
WRaster: Create header for i18n helper functions
This patch is just adding a single header, but because it also modifies all the C files to add the #include, it was made as a patch on its own to ease review. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
aadd694a6b
commit
19202fd2db
@@ -40,6 +40,7 @@ libwraster_la_SOURCES = \
|
||||
flip.c \
|
||||
convolve.c \
|
||||
save_xpm.c \
|
||||
wr_i18n.h \
|
||||
xutil.c \
|
||||
xutil.h \
|
||||
load_ppm.c
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "wraster.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
void RCombineAlpha(unsigned char *d, unsigned char *s, int s_has_alpha,
|
||||
int width, int height, int dwi, int swi, int opacity) {
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "wraster.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
#define MIN(a,b) ((a)<(b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a)>(b) ? (a) : (b))
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "scale.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
#ifndef HAVE_FLOAT_MATHFUNC
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "wraster.h"
|
||||
#include "convert.h"
|
||||
#include "xutil.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
#define NFREE(n) if (n) free(n)
|
||||
|
||||
@@ -25,7 +25,10 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "wraster.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "wraster.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "rotate.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
static RImage *r_flip_vertically(RImage *source);
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "wraster.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
static RImage *renderHGradient(unsigned width, unsigned height, int r0, int g0, int b0, int rf, int gf, int bf);
|
||||
static RImage *renderVGradient(unsigned width, unsigned height, int r0, int g0, int b0, int rf, int gf, int bf);
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
typedef struct RCachedImage {
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
static int InterlacedOffset[] = { 0, 4, 2, 1 };
|
||||
static int InterlacedJumps[] = { 8, 8, 4, 2 };
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
/*
|
||||
* <setjmp.h> is used for the optional error recovery mechanism shown in
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
static int RInitMagickIfNeeded(void);
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
RImage *RLoadPNG(RContext *context, const char *file)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
/*
|
||||
* fileio.c - routines to read elements based on Netpbm
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
RImage *RLoadTIFF(const char *file, int index)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
RImage *RLoadWEBP(const char *file_name)
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
static RImage *create_rimage_from_xpm(RContext *context, XpmImage xpm)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
/*
|
||||
* Restricted support for XPM images.
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "convert.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
void RBevelImage(RImage * image, int bevel_type)
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "wraster.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "rotate.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
Bool RSaveImage(RImage * image, const char *filename, const char *format)
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "imgformat.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
/*
|
||||
* Restricted support for XPM images.
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "scale.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
|
||||
41
wrlib/wr_i18n.h
Normal file
41
wrlib/wr_i18n.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Window Maker window manager
|
||||
*
|
||||
* Copyright (c) 2021 Window Maker Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program, see the file COPYING.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file defines the basic stuff for WRaster's message
|
||||
* internationalization in the code
|
||||
*/
|
||||
|
||||
#ifndef WRASTER_I18N_H
|
||||
#define WRASTER_I18N_H
|
||||
|
||||
#if defined(HAVE_LIBINTL_H) && defined(I18N)
|
||||
# include <libintl.h>
|
||||
# define _(text) dgettext("WRaster", (text))
|
||||
#else
|
||||
# define _(text) (text)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* the N_ macro is used for initializers, it will make xgettext pick the
|
||||
* string for translation when generating PO files
|
||||
*/
|
||||
#define N_(text) (text)
|
||||
|
||||
#endif
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "wraster.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
static int get_shifts(unsigned long mask)
|
||||
{
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "wraster.h"
|
||||
#include "xutil.h"
|
||||
#include "wr_i18n.h"
|
||||
|
||||
|
||||
#ifdef USE_XSHM
|
||||
|
||||
|
||||
Reference in New Issue
Block a user