79 Commits

Author SHA1 Message Date
bd61e58821 Don't pass wmalloc'd memory to XFree.
This is enough to get the wmaker into a minimally running state. We should
complete this change by reviewing #1.
2025-10-23 14:46:56 -04:00
1a8d99b2c0 PropList array items should return NULL on OOB index access. 2025-10-23 14:46:56 -04:00
7bded0055f Drop unused wAbort function from WPrefs.app. 2025-10-23 14:46:56 -04:00
32c40643c2 Replace WUtil hashtable with a Rust impl.
This tweaks the hashtable API, and it is incomplete because the WUtil proplist
impl depends heavily on a feature of the old API that is being discontinued.

Moving the proplist code into Rust is our next objective.
2025-10-23 14:46:56 -04:00
157a8e0d5a Eliminate the retainKey and releaseKey hashtable callbacks.
These fields are only ever NULL, so there's no reason to keep them.
2025-10-23 14:46:56 -04:00
252362545e Drop WMStringHashCallbacks, which is unused. 2025-10-23 14:46:56 -04:00
f69227ce19 Remove support for PropList data nodes.
This type of PropList entry appears to be completely unused, so let's be rid of
it. This can be reversed in the future if we do want more complete support for
property lists, but for now it's code that we don't need.
2025-10-23 14:46:56 -04:00
bc163d13f6 Provide alloc_string impl. 2025-10-23 14:46:56 -04:00
2d2dd9febe Chasing memory bugs: be consistent about wmalloc/wfree. 2025-10-23 14:46:56 -04:00
14c316615e Chasing memory bugs in memory.rs: copy only the payload length in wrealloc. 2025-10-23 14:46:56 -04:00
6a98614d13 Clarify wmalloc contract - it's safe to read before writing. 2025-10-23 14:46:56 -04:00
dfdaa67b4d Chasing memory bugs in memory.rs: allocate the right layout. 2025-10-23 14:46:56 -04:00
e6fd7e49f8 Clean things up a little bit with refutable let. 2025-10-23 14:46:56 -04:00
12930739ec Allocate PropList description with memory::alloc_bytes.
All memory allocations passed back from FFI functions should be allocated with
`memory::alloc_bytes`, so that C code can call `memory::free_bytes` when it's
done with them.
2025-10-23 14:46:56 -04:00
cf588d6e27 Simplify path_from_cstr substantially (h/t cross). 2025-10-23 14:46:56 -04:00
f3961ba66f Reimplement the PropList data structure in Rust.
While this large change has some unit tests, it has not been integration tested
thoroughly. Removing the global case insensitivity flag may be an issue in
particular.

A few of PropList API functions have been modified (mostly to get rid of
varargs). The definition of one such function has been left in C for cleanup
later.
2025-10-23 14:46:56 -04:00
5b593fb19a Expose the GSUSER_SUBDIR preprocessor symbol to Rust.
This symbol's value must be known to port `wmkdirhier` and `wrmdirhier` from
`proplist.c` to Rust.

This change introduces a basic C library under wutil-rs that is linked into the
Rust code to expose preprocessor symbols and other Autotools configuration
decisions to Rust. See the rust rewrite notes at the top of
`wutil-rs/src/defines.rs` for further thoughts.
2025-10-23 14:46:56 -04:00
f2e9123db6 Port WINGs data.c (WMData) to Rust.
This is not tested super well, but I hope we can be rid of it soon enough. (Once
we have WMPropList migrated, WMData and other WINGs data structures should be
easier to prune.)
2025-10-23 14:46:56 -04:00
791149fe70 Correct oversight in how WMMapArray is supposed to work. 2025-10-23 14:46:56 -04:00
52b0e6b182 Drop WMData's destructor field.
WMData always owns its data and allocates it with wmalloc, so we can always free
it with wfree (and don't need to call anything else).
2025-10-23 14:46:56 -04:00
bbcf40ee47 Eliminate the WINGs function WMCreateDataWithBytesNoCopy.
This constructor was only needed in one particular place. We can duplidate the
data instead of borrowing it. This ensures that WMData always owns its data
segment, which simplifies porting to Rust significantly.
2025-10-23 14:46:56 -04:00
9d07e2d3d8 Eliminate the unused WINGs function WMGetSubdataWithRange. 2025-10-23 14:46:56 -04:00
dea8c36cd5 Eliminate the unused WINGs function WMCreatePLDataWithBytesNoCopy. 2025-10-23 14:46:56 -04:00
3beadbb6cb Forgot to add new array.rs impl. 2025-10-23 14:46:56 -04:00
dd36130730 Fix const qualifier on strings returned by wgethomedir. 2025-10-23 14:46:56 -04:00
6ede7a5cb0 Reimplement WINGs array.c in Rust.
This is another utility that should not be used in any new (Rust) code. (We
should prefer Vec or something similar.) This should be removed once dependents
are ported to Rust.
2025-10-23 14:46:56 -04:00
2b9b915768 Replace most WUtil functions in findfile.c with Rust impls.
This is not a bug-for-bug reimplementation, and it may need some shaking down to
ensure that everything still works. Once their dependents are ported, it would
be appropriate to dispose of them.
2025-10-23 14:46:56 -04:00
d50adaa1c8 Use free() on memory returned by FcNameUnparse and hand back wfree-managed pointers from our functions.
This is necessary because we now allocate memory through a special allocator of
our own on the Rust side. Passing raw malloc'd pointers to wfree will break
things.
2025-10-23 14:46:56 -04:00
5b0ad78f01 Remember to AC_SUBST the Rust compiler environment variables so they're visible in Makefiles. 2025-10-23 14:46:56 -04:00
46fcbb0ff1 Port custom allocators (WINGs memory.c) to Rust.
This introduces the crate wutil-rs, which is intended to be the destination for
migrating the API of WINGs/WINGs/WUtil.h to Rust.
2025-10-23 14:46:56 -04:00
e3fb8ddbc8 Rip out Boehm GC support.
This is done to simplify memory management across the boundary between C and
Rust. While rewriting WINGs, we may want to be able to malloc/free with the libc
allocator on both sides of that divide.
2025-10-23 14:46:56 -04:00
59ad67f4dc Provide a janky script for running Window Maker in a captive Xephyr X server.
If this becomes a permanent fixture, hard-coded values should be fixed.
2025-10-23 14:39:53 -04:00
5325e2d455 Improve automake integration with Rust build.
Now ./configure checks for cargo and rustc, and `make` will rebuild wmaker-rs if
any of its source code has changed.

There are still some steps to take for better integration (like ensuring that
deps are vendored correctly). See
https://viruta.org/librsvgs-build-infrastructure-autotools-and-rust.html for
suggestions on what else to do.
2025-09-19 20:02:54 -04:00
82c8b0c9b4 Rename wmakerlib dir to wmaker-rs for econsistency with future libs. 2025-09-13 14:54:13 -04:00
a67f7483fd Clean up parameters that were commented out. 2025-09-09 22:27:55 -04:00
cf87f7e83b Finish moving WApplication struct defn and methods into Rust. 2025-09-09 22:23:59 -04:00
b569889f21 Expose RRetainImage from wrlib for Rust. 2025-09-09 22:21:15 -04:00
383b3a1a7b Expose some WMHandlerID methods from WINGs for Rust. 2025-09-09 22:20:07 -04:00
4fd7d1e2c1 Forgot to include screen.rs earlier. 2025-09-09 22:19:41 -04:00
0131c493c0 Expose PropGetWMClass for Rust. 2025-09-09 22:19:16 -04:00
5f1317b885 Forgot to include global module in lib.rs. 2025-09-09 22:18:49 -04:00
5817c1f032 Expose a Rust type for WMenu. 2025-09-09 22:18:30 -04:00
6d09fbff93 Expose wDockFinishLaunch for WApplication. 2025-09-09 22:18:03 -04:00
b38fa197d7 Expose wDefaultFillAttributes for Rust. 2025-09-09 22:17:46 -04:00
4c617034b4 Expose AppMenu method used by WApplication. 2025-09-09 22:17:22 -04:00
f5daf2a76a Expose WAppIcon methods used by WApplication. 2025-09-09 22:16:31 -04:00
05895b40a2 Forgot to add wrlib module to lib.rs. 2025-09-09 22:07:37 -04:00
4f4ef94400 Expose start_hidden and emulate_appicon attrs of WWindow. 2025-09-09 21:57:17 -04:00
023ab177b2 Expose WWindow attributes so they can be seen from Rust. 2025-09-09 21:56:30 -04:00
279f369256 Expose w_global.context so it can be seen from Rust. 2025-09-09 20:16:02 -04:00
0a2ff4f055 Expose various other WWindow fields so they can be seen from Rust.
Fields: client_win, screen_ptr, wm_hints, wm_class, wm_instance,
defined_user_flags.
2025-09-09 19:41:12 -04:00
108c913c1d Expose WWindow::user_flags so that it can be seen from Rust. 2025-09-09 19:36:36 -04:00
8c669d57b2 Expose WWindow::net_icon_image so that it can be seen from Rust. 2025-09-09 19:34:57 -04:00
83fa8119d9 Expose WWindow::main_windowc so that it can be seen from Rust. 2025-09-09 17:00:57 -04:00
507e69e209 Expose WWindow::fake_group so that it can be seen from Rust. 2025-09-09 16:54:30 -04:00
70814cc235 Add a module for the WWindow type. 2025-09-09 16:52:21 -04:00
2ef6720890 Expose WIcon::highlighted so that it can be seen from Rust. 2025-09-09 15:52:33 -04:00
493d3c9738 Expose WScreen::root_win so that it can be seen from Rust. 2025-09-09 15:49:52 -04:00
917cc29160 Use repr(C) for Application flags to use them from an FFI interace. 2025-09-09 15:45:57 -04:00
3234e15388 Move WApplication refcount maintenance into Rust. 2025-09-05 02:24:03 -04:00
394b4d23cb Add forgotten use std::ptr. 2025-09-05 02:05:04 -04:00
274d1459aa Move wApplicationClearUrgentBounceTimer into Rust. 2025-09-05 02:02:34 -04:00
9a886baef8 Ditch linked list pointers in Rust application struct, too. 2025-09-05 02:00:48 -04:00
7ba66fbc00 Get rid of unused intrusive linked list in WApplication.
There is code to maintain this list in wApplicationDestroy, but use of it was
removed in 2001 (see commit 672c42cc48). So let's do some cleanup.
2025-09-05 01:49:20 -04:00
289ceb2991 First stab at defining WApplication methods in Rust.
This builds and appears to run.
2025-09-03 21:38:35 -04:00
ab7e188334 Add Cargo build outputs at prospective build path to .gitignore. 2025-09-03 20:59:39 -04:00
55d34ff0a1 Make bitfields in WApplication's flags struct into real fields.
This will ease interop with Rust.
2025-09-03 20:58:31 -04:00
0e7f125494 Move WApplication definition and remaining methods into a separate file.
This should provide a more solid interface boundary for a WApplication
replacement written in Rust.
2025-09-03 20:55:12 -04:00
9404c21fa8 Duplicate src/application.c to preserve revision history. 2025-09-03 20:43:59 -04:00
455aa71c19 Hide WAppIcon fields in favor of accessors. 2025-09-01 21:20:22 -04:00
18db22063c Hide WDock fields in favor of accessors. 2025-08-25 22:46:23 -04:00
b4d1dbe953 Hide WApplication fields in favor of accessors. 2025-08-24 23:41:16 -04:00
Doug Torrance
da676c9e9e Add WPrefs Serbian translation to EXTRA_DIST
Otherwise "make check" fails (script/check-translation-sources.sh).
2024-11-12 10:15:17 +00:00
Doug Torrance
4edf589a5b Remove cruft from autogen.sh 2024-11-12 10:15:17 +00:00
Doug Torrance
709eec4bce Update autogen.sh so that it can be run from build directory 2024-11-12 10:15:17 +00:00
Jeremy Sowden
b179803c11 Fix spelling errors
* "unknow" -> "unknown"
* "occured" -> "occurred"

Remove some entries from PO files where these entries contain spelling errors
and there are other entries that are identical except for these mistakes.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2024-11-10 16:59:03 +00:00
Jeremy Sowden
5cd40deb20 Add missing Language: headers to PO files
msgfmt complains.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2024-11-10 16:59:03 +00:00
Jeremy Sowden
9db1ea580d Ignore wrlib gettext artefacts
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2024-11-10 16:59:03 +00:00
Jeremy Sowden
9e56f58742 Remove obsolete autoconf macro
`AC_PROG_GCC_TRADITIONAL` is obsolete and is now just an alias for `AC_PROG_CC`,
which is already defined.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2024-11-10 16:59:03 +00:00
187 changed files with 7490 additions and 5156 deletions

5
.gitignore vendored
View File

@@ -133,8 +133,13 @@ WPrefs.app/WPrefs.desktop
/WPrefs.app/po/*.mo
/util/po/*.pot
/util/po/*.mo
/wrlib/po/*.pot
/wrlib/po/*.mo
# Some text editors generate backup files
*~
.pc
# Rust stuff.
/*/target/**

View File

@@ -21,7 +21,7 @@ Changes since version 0.95.7:
- debian: Ignore missing documentation for --runstatedir.
- debian: Use dh_autoreconf.
- debian: Simplify debian/rules.
- debian: Fix typo occured. (Thanks, lintian.)
- debian: Fix typo occurred. (Thanks, lintian.)
- debian: wmaker manpage moved from 1x to 1.
(Andreas Metzler <ametzler@bebt.de>)
- debian: Add wmiv to wmaker package.
@@ -498,7 +498,7 @@ Changes since version 0.95.6:
- doc: Add manpage for wmiv.
(Doug Torrance <dtorrance@monmouthcollege.edu>)
- wmaker: replaced old email address with the official one
- WINGs: Updated news with the API changes that occured between 0.95.6 and
- WINGs: Updated news with the API changes that occurred between 0.95.6 and
0.95.7
- WINGs: ran spell checker on the NEWS file
- WINGs: fix non-portable int conversion for printf in font panel size handling
@@ -969,7 +969,7 @@ Changes since version 0.95.5:
- WMaker: moved XGrab/XUngrabPointer into the conditional code
- News: created section dedicated to the changes related to 0.95.3
- News: added description of a change that may be interesting to users
- News: added section to describe the changes that have occured in 0.95.4
- News: added section to describe the changes that have occurred in 0.95.4
- News: marked the current changes as part of 0.95.5 and describe the drawers
feature
- News: described the new features for future 0.95.6 release
@@ -1103,7 +1103,7 @@ Changes since version 0.95.5:
#50158)
- WPrefs: fix NULL pointer handling when getting the Modifiers (Coverity
#50200)
- WPrefs: add warning when renderTexture encounters some unknow settings
- WPrefs: add warning when renderTexture encounters some unknown settings
(Christophe CURIS <christophe.curis@free.fr>)
- util/wmiv: add image auto orientation detection
(David Maciejak <david.maciejak@gmail.com>)

View File

@@ -39,7 +39,7 @@ ACLOCAL_AMFLAGS = -I m4
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-silent-rules LINGUAS='*'
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib WPrefs.app doc
SUBDIRS = wrlib wutil-rs WINGs wmaker-rs src util po WindowMaker wmlib WPrefs.app doc
DIST_SUBDIRS = $(SUBDIRS) test
EXTRA_DIST = TODO BUGS BUGFORM FAQ INSTALL \

View File

@@ -140,7 +140,7 @@ Changes since wmaker 0.64.0:
- Moved all internal handlers (timer, idle and input) to handlers.c
- simplified wevent.c and wutil.c.
- fixed handling of input with poll (was broken)
- fixed mem leak that occured when input handling was done with poll
- fixed mem leak that occurred when input handling was done with poll
- simpler and more straightforward event handling for timer, idle, input
and X events (also fixed some problems the old handling logic had)
- moved timer, idle and input handler definitions and prototypes from

View File

@@ -10,14 +10,17 @@ libWUtil_la_LDFLAGS = -version-info @WUTIL_VERSION@
lib_LTLIBRARIES = libWUtil.la libWINGs.la
wutilrs = $(top_builddir)/wutil-rs/target/debug/libwutil_rs.a
wraster = $(top_builddir)/wrlib/libwraster.la
LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFT_LIBS@ @FCLIBS@ @LIBM@ @PANGO_LIBS@
libWUtil_la_LIBADD = @LIBBSD@
LDADD= libWUtil.la libWINGs.la $(wraster) $(wutilrs) @INTLIBS@
libWINGs_la_LIBADD = libWUtil.la $(wraster) $(wutilrs) @XLIBS@ @XFT_LIBS@ @FCLIBS@ @LIBM@ @PANGO_LIBS@
libWUtil_la_LIBADD = @LIBBSD@ $(wutilrs)
EXTRA_DIST = BUGS make-rgb Examples Extras Tests
# wbutton.c
libWINGs_la_SOURCES = \
configuration.c \
@@ -62,15 +65,11 @@ libWINGs_la_SOURCES = \
wwindow.c
libWUtil_la_SOURCES = \
array.c \
bagtree.c \
data.c \
error.c \
error.h \
findfile.c \
handlers.c \
hashtable.c \
memory.c \
menuparser.c \
menuparser.h \
menuparser_macros.c \

View File

@@ -169,10 +169,6 @@ typedef struct {
unsigned (*hash)(const void *);
/* NULL is pointer compare */
Bool (*keyIsEqual)(const void *, const void *);
/* NULL does nothing */
void* (*retainKey)(const void *);
/* NULL does nothing */
void (*releaseKey)(const void *);
} WMHashTableCallbacks;
@@ -213,10 +209,6 @@ void wfree(void *ptr);
void wrelease(void *ptr);
void* wretain(void *ptr);
typedef void waborthandler(int);
waborthandler* wsetabort(waborthandler* handler);
/* ---[ WINGs/error.c ]--------------------------------------------------- */
enum {
@@ -248,11 +240,14 @@ char* wexpandpath(const char *path);
int wcopy_file(const char *toPath, const char *srcFile, const char *destFile);
/* don't free the returned string */
const char* wgethomedir(void);
/* You must free the returned string! */
char* wgethomedir(void);
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
/*
* Creates the directory path and all its parents.
*/
int wmkdirhier(const char *path);
int wrmdirhier(const char *path);
@@ -342,7 +337,8 @@ void WHandleEvents(void);
/* ---[ WINGs/hashtable.c ]----------------------------------------------- */
WMHashTable* WMCreateHashTable(const WMHashTableCallbacks callbacks);
WMHashTable* WMCreateIdentityHashTable();
WMHashTable* WMCreateStringHashTable();
void WMFreeHashTable(WMHashTable *table);
@@ -392,15 +388,11 @@ Bool WMNextHashEnumeratorItemAndKey(WMHashEnumerator *enumerator,
extern const WMHashTableCallbacks WMIntHashCallbacks;
/* sizeof(keys) are <= sizeof(void*) */
extern const WMHashTableCallbacks WMStringHashCallbacks;
/* keys are strings. Strings will be copied with wstrdup()
* and freed with wfree() */
extern const WMHashTableCallbacks WMStringPointerHashCallbacks;
/* keys are strings, but they are not copied */
/* ---[ WINGs/array.c ]--------------------------------------------------- */
/* ---[ wutil-rs/src/array.rs ]--------------------------------------------------- */
/*
* WMArray use an array to store the elements.
@@ -422,29 +414,22 @@ WMArray* WMCreateArrayWithDestructor(int initialSize, WMFreeDataProc *destructor
WMArray* WMCreateArrayWithArray(WMArray *array);
#define WMDuplicateArray(array) WMCreateArrayWithArray(array)
void WMEmptyArray(WMArray *array);
void WMFreeArray(WMArray *array);
int WMGetArrayItemCount(WMArray *array);
/* appends other to array. other remains unchanged */
void WMAppendArray(WMArray *array, WMArray *other);
/* add will place the element at the end of the array */
void WMAddToArray(WMArray *array, void *item);
/* insert will increment the index of elements after it by 1 */
void WMInsertInArray(WMArray *array, int index, void *item);
/* replace and set will return the old item WITHOUT calling the
/* set returns the old item WITHOUT calling the
* destructor on it even if its available. Free the returned item yourself.
*/
void* WMReplaceInArray(WMArray *array, int index, void *item);
#define WMSetInArray(array, index, item) WMReplaceInArray(array, index, item)
void* WMSetInArray(WMArray *array, int index, void *item);
/* delete and remove will remove the elements and cause the elements
* after them to decrement their indexes by 1. Also will call the
@@ -452,20 +437,21 @@ void* WMReplaceInArray(WMArray *array, int index, void *item);
*/
int WMDeleteFromArray(WMArray *array, int index);
#define WMRemoveFromArray(array, item) WMRemoveFromArrayMatching(array, NULL, item)
int WMRemoveFromArray(WMArray *array, void *item);
int WMRemoveFromArrayMatching(WMArray *array, WMMatchDataProc *match, void *cdata);
void* WMGetFromArray(WMArray *array, int index);
#define WMGetFirstInArray(array, item) WMFindInArray(array, NULL, item)
/* pop will return the last element from the array, also removing it
* from the array. The destructor is NOT called, even if available.
* Free the returned element if needed by yourself
*/
void* WMPopFromArray(WMArray *array);
/* Like WMFindInArray(array, NULL, item) */
int WMGetFirstInArray(WMArray *array, void *item);
int WMFindInArray(WMArray *array, WMMatchDataProc *match, void *cdata);
int WMCountInArray(WMArray *array, void *item);
@@ -479,8 +465,6 @@ void WMSortArray(WMArray *array, WMCompareDataProc *comparer);
void WMMapArray(WMArray *array, void (*function)(void*, void*), void *data);
WMArray* WMGetSubarrayWithRange(WMArray* array, WMRange aRange);
void* WMArrayFirst(WMArray *array, WMArrayIterator *iter);
void* WMArrayLast(WMArray *array, WMArrayIterator *iter);
@@ -604,37 +588,16 @@ WMData* WMCreateDataWithLength(unsigned length);
WMData* WMCreateDataWithBytes(const void *bytes, unsigned length);
/* destructor is a function called to free the data when releasing the data
* object, or NULL if no freeing of data is necesary. */
WMData* WMCreateDataWithBytesNoCopy(void *bytes, unsigned length,
WMFreeDataProc *destructor);
WMData* WMCreateDataWithData(WMData *aData);
WMData* WMRetainData(WMData *aData);
void WMReleaseData(WMData *aData);
/* Adjusting capacity */
void WMSetDataCapacity(WMData *aData, unsigned capacity);
void WMSetDataLength(WMData *aData, unsigned length);
void WMIncreaseDataLengthBy(WMData *aData, unsigned extraLength);
/* Accessing data */
const void* WMDataBytes(WMData *aData);
void WMGetDataBytes(WMData *aData, void *buffer);
void WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length);
void WMGetDataBytesWithRange(WMData *aData, void *buffer, WMRange aRange);
WMData* WMGetSubdataWithRange(WMData *aData, WMRange aRange);
/* Testing data */
Bool WMIsDataEqualToData(WMData *aData, WMData *anotherData);
@@ -649,10 +612,6 @@ void WMAppendData(WMData *aData, WMData *anotherData);
/* Modifying data */
void WMReplaceDataBytesInRange(WMData *aData, WMRange aRange, const void *bytes);
void WMResetDataBytesInRange(WMData *aData, WMRange aRange);
void WMSetData(WMData *aData, WMData *anotherData);
@@ -756,25 +715,23 @@ void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
unsigned coalesceMask);
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
/* Property Lists handling */
void WMPLSetCaseSensitive(Bool caseSensitive);
WMPropList* WMCreatePLString(const char *str);
WMPropList* WMCreatePLData(WMData *data);
WMPropList* WMCreatePLDataWithBytes(const unsigned char *bytes, unsigned int length);
WMPropList* WMCreatePLDataWithBytesNoCopy(unsigned char *bytes,
unsigned int length,
WMFreeDataProc *destructor);
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
WMPropList* WMCreatePLArray(WMPropList *elem, ...);
WMPropList* WMCreatePLDictionary(WMPropList *key, WMPropList *value, ...);
/* ---[ wutil-rs/src/prop_list.rs ]--------------------------------------- */
WMPropList* WMCreatePLString(const char *str);
WMPropList* WMCreatePLArrayFromSlice(WMPropList *elems, unsigned int length);
WMPropList* WMCreateEmptyPLArray();
WMPropList* WMCreatePLDictionary(WMPropList *key, WMPropList *value);
WMPropList* WMCreateEmptyPLDictionary();
WMPropList* WMRetainPropList(WMPropList *plist);
@@ -812,8 +769,6 @@ int WMGetPropListItemCount(WMPropList *plist);
Bool WMIsPLString(WMPropList *plist);
Bool WMIsPLData(WMPropList *plist);
Bool WMIsPLArray(WMPropList *plist);
Bool WMIsPLDictionary(WMPropList *plist);
@@ -823,14 +778,6 @@ Bool WMIsPropListEqualTo(WMPropList *plist, WMPropList *other);
/* Returns a reference. Do not free it! */
char* WMGetFromPLString(WMPropList *plist);
/* Returns a reference. Do not free it! */
WMData* WMGetFromPLData(WMPropList *plist);
/* Returns a reference. Do not free it! */
const unsigned char* WMGetPLDataBytes(WMPropList *plist);
int WMGetPLDataLength(WMPropList *plist);
/* Returns a reference. */
WMPropList* WMGetFromPLArray(WMPropList *plist, int index);
@@ -838,14 +785,9 @@ WMPropList* WMGetFromPLArray(WMPropList *plist, int index);
WMPropList* WMGetFromPLDictionary(WMPropList *plist, WMPropList *key);
/* Returns a PropList array with all the dictionary keys. Release it when
* you're done. Keys in array are retained from the original dictionary
* not copied and need NOT to be released individually. */
* you're done. */
WMPropList* WMGetPLDictionaryKeys(WMPropList *plist);
/* Creates only the first level deep object. All the elements inside are
* retained from the original */
WMPropList* WMShallowCopyPropList(WMPropList *plist);
/* Makes a completely separate replica of the original proplist */
WMPropList* WMDeepCopyPropList(WMPropList *plist);

View File

@@ -1,363 +0,0 @@
/*
* Dynamically Resized Array
*
* Authors: Alfredo K. Kojima <kojima@windowmaker.info>
* Dan Pascu <dan@windowmaker.info>
*
* This code is released to the Public Domain, but
* proper credit is always appreciated :)
*/
#include <stdlib.h>
#include <string.h>
#include "WUtil.h"
#define INITIAL_SIZE 8
#define RESIZE_INCREMENT 8
typedef struct W_Array {
void **items; /* the array data */
int itemCount; /* # of items in array */
int allocSize; /* allocated size of array */
WMFreeDataProc *destructor; /* the destructor to free elements */
} W_Array;
WMArray *WMCreateArray(int initialSize)
{
return WMCreateArrayWithDestructor(initialSize, NULL);
}
WMArray *WMCreateArrayWithDestructor(int initialSize, WMFreeDataProc * destructor)
{
WMArray *array;
array = wmalloc(sizeof(WMArray));
if (initialSize <= 0) {
initialSize = INITIAL_SIZE;
}
array->items = wmalloc(sizeof(void *) * initialSize);
array->itemCount = 0;
array->allocSize = initialSize;
array->destructor = destructor;
return array;
}
WMArray *WMCreateArrayWithArray(WMArray * array)
{
WMArray *newArray;
newArray = wmalloc(sizeof(WMArray));
newArray->items = wmalloc(sizeof(void *) * array->allocSize);
memcpy(newArray->items, array->items, sizeof(void *) * array->itemCount);
newArray->itemCount = array->itemCount;
newArray->allocSize = array->allocSize;
newArray->destructor = NULL;
return newArray;
}
void WMEmptyArray(WMArray * array)
{
if (array->destructor) {
while (array->itemCount > 0) {
array->itemCount--;
array->destructor(array->items[array->itemCount]);
}
}
/*memset(array->items, 0, array->itemCount * sizeof(void*)); */
array->itemCount = 0;
}
void WMFreeArray(WMArray * array)
{
if (array == NULL)
return;
WMEmptyArray(array);
wfree(array->items);
wfree(array);
}
int WMGetArrayItemCount(WMArray * array)
{
if (array == NULL)
return 0;
return array->itemCount;
}
void WMAppendArray(WMArray * array, WMArray * other)
{
if (array == NULL || other == NULL)
return;
if (other->itemCount == 0)
return;
if (array->itemCount + other->itemCount > array->allocSize) {
array->allocSize += other->allocSize;
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
}
memcpy(array->items + array->itemCount, other->items, sizeof(void *) * other->itemCount);
array->itemCount += other->itemCount;
}
void WMAddToArray(WMArray * array, void *item)
{
if (array == NULL)
return;
if (array->itemCount >= array->allocSize) {
array->allocSize += RESIZE_INCREMENT;
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
}
array->items[array->itemCount] = item;
array->itemCount++;
}
void WMInsertInArray(WMArray * array, int index, void *item)
{
if (array == NULL)
return;
wassertr(index >= 0 && index <= array->itemCount);
if (array->itemCount >= array->allocSize) {
array->allocSize += RESIZE_INCREMENT;
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
}
if (index < array->itemCount) {
memmove(array->items + index + 1, array->items + index,
sizeof(void *) * (array->itemCount - index));
}
array->items[index] = item;
array->itemCount++;
}
void *WMReplaceInArray(WMArray * array, int index, void *item)
{
void *old;
if (array == NULL)
return NULL;
wassertrv(index >= 0 && index <= array->itemCount, NULL);
/* is it really useful to perform append if index == array->itemCount ? -Dan */
if (index == array->itemCount) {
WMAddToArray(array, item);
return NULL;
}
old = array->items[index];
array->items[index] = item;
return old;
}
int WMDeleteFromArray(WMArray * array, int index)
{
if (array == NULL)
return 0;
wassertrv(index >= 0 && index < array->itemCount, 0);
if (array->destructor) {
array->destructor(array->items[index]);
}
if (index < array->itemCount - 1) {
memmove(array->items + index, array->items + index + 1,
sizeof(void *) * (array->itemCount - index - 1));
}
array->itemCount--;
return 1;
}
int WMRemoveFromArrayMatching(WMArray * array, WMMatchDataProc * match, void *cdata)
{
int i;
if (array == NULL)
return 1;
if (match != NULL) {
for (i = 0; i < array->itemCount; i++) {
if ((*match) (array->items[i], cdata)) {
WMDeleteFromArray(array, i);
return 1;
}
}
} else {
for (i = 0; i < array->itemCount; i++) {
if (array->items[i] == cdata) {
WMDeleteFromArray(array, i);
return 1;
}
}
}
return 0;
}
void *WMGetFromArray(WMArray * array, int index)
{
if (index < 0 || array == NULL || index >= array->itemCount)
return NULL;
return array->items[index];
}
void *WMPopFromArray(WMArray * array)
{
if (array == NULL || array->itemCount <= 0)
return NULL;
array->itemCount--;
return array->items[array->itemCount];
}
int WMFindInArray(WMArray * array, WMMatchDataProc * match, void *cdata)
{
int i;
if (array == NULL)
return WANotFound;
if (match != NULL) {
for (i = 0; i < array->itemCount; i++) {
if ((*match) (array->items[i], cdata))
return i;
}
} else {
for (i = 0; i < array->itemCount; i++) {
if (array->items[i] == cdata)
return i;
}
}
return WANotFound;
}
int WMCountInArray(WMArray * array, void *item)
{
int i, count;
if (array == NULL)
return 0;
for (i = 0, count = 0; i < array->itemCount; i++) {
if (array->items[i] == item)
count++;
}
return count;
}
void WMSortArray(WMArray * array, WMCompareDataProc * comparer)
{
if (array == NULL)
return;
if (array->itemCount > 1) { /* Don't sort empty or single element arrays */
qsort(array->items, array->itemCount, sizeof(void *), comparer);
}
}
void WMMapArray(WMArray * array, void (*function) (void *, void *), void *data)
{
int i;
if (array == NULL)
return;
for (i = 0; i < array->itemCount; i++) {
(*function) (array->items[i], data);
}
}
WMArray *WMGetSubarrayWithRange(WMArray * array, WMRange aRange)
{
WMArray *newArray;
if (aRange.count <= 0 || array == NULL)
return WMCreateArray(0);
if (aRange.position < 0)
aRange.position = 0;
if (aRange.position >= array->itemCount)
aRange.position = array->itemCount - 1;
if (aRange.position + aRange.count > array->itemCount)
aRange.count = array->itemCount - aRange.position;
newArray = WMCreateArray(aRange.count);
memcpy(newArray->items, array->items + aRange.position, sizeof(void *) * aRange.count);
newArray->itemCount = aRange.count;
return newArray;
}
void *WMArrayFirst(WMArray * array, WMArrayIterator * iter)
{
if (array == NULL || array->itemCount == 0) {
*iter = WANotFound;
return NULL;
} else {
*iter = 0;
return array->items[0];
}
}
void *WMArrayLast(WMArray * array, WMArrayIterator * iter)
{
if (array == NULL || array->itemCount == 0) {
*iter = WANotFound;
return NULL;
} else {
*iter = array->itemCount - 1;
return array->items[*iter];
}
}
void *WMArrayNext(WMArray * array, WMArrayIterator * iter)
{
if (array == NULL) {
*iter = WANotFound;
return NULL;
}
if (*iter >= 0 && *iter < array->itemCount - 1) {
return array->items[++(*iter)];
} else {
*iter = WANotFound;
return NULL;
}
}
void *WMArrayPrevious(WMArray * array, WMArrayIterator * iter)
{
if (array == NULL) {
*iter = WANotFound;
return NULL;
}
if (*iter > 0 && *iter < array->itemCount) {
return array->items[--(*iter)];
} else {
*iter = WANotFound;
return NULL;
}
}

View File

@@ -1,289 +0,0 @@
/*
* WINGs WMData function library
*
* Copyright (c) 1999-2003 Dan Pascu
*
* 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; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#include <string.h>
#include "WUtil.h"
typedef struct W_Data {
unsigned length; /* How many bytes we have */
unsigned capacity; /* How many bytes it can hold */
unsigned growth; /* How much to grow */
void *bytes; /* Actual data */
unsigned retainCount;
WMFreeDataProc *destructor;
int format; /* 0, 8, 16 or 32 */
} W_Data;
/* Creating and destroying data objects */
WMData *WMCreateDataWithCapacity(unsigned capacity)
{
WMData *aData;
aData = (WMData *) wmalloc(sizeof(WMData));
if (capacity > 0)
aData->bytes = wmalloc(capacity);
else
aData->bytes = NULL;
aData->capacity = capacity;
aData->growth = capacity / 2 > 0 ? capacity / 2 : 1;
aData->length = 0;
aData->retainCount = 1;
aData->format = 0;
aData->destructor = wfree;
return aData;
}
WMData *WMCreateDataWithLength(unsigned length)
{
WMData *aData;
aData = WMCreateDataWithCapacity(length);
if (length > 0) {
aData->length = length;
}
return aData;
}
WMData *WMCreateDataWithBytes(const void *bytes, unsigned length)
{
WMData *aData;
aData = WMCreateDataWithCapacity(length);
aData->length = length;
memcpy(aData->bytes, bytes, length);
return aData;
}
WMData *WMCreateDataWithBytesNoCopy(void *bytes, unsigned length, WMFreeDataProc * destructor)
{
WMData *aData;
aData = (WMData *) wmalloc(sizeof(WMData));
aData->length = length;
aData->capacity = length;
aData->growth = length / 2 > 0 ? length / 2 : 1;
aData->bytes = bytes;
aData->retainCount = 1;
aData->format = 0;
aData->destructor = destructor;
return aData;
}
WMData *WMCreateDataWithData(WMData * aData)
{
WMData *newData;
if (aData->length > 0) {
newData = WMCreateDataWithBytes(aData->bytes, aData->length);
} else {
newData = WMCreateDataWithCapacity(0);
}
newData->format = aData->format;
return newData;
}
WMData *WMRetainData(WMData * aData)
{
aData->retainCount++;
return aData;
}
void WMReleaseData(WMData * aData)
{
aData->retainCount--;
if (aData->retainCount > 0)
return;
if (aData->bytes != NULL && aData->destructor != NULL) {
aData->destructor(aData->bytes);
}
wfree(aData);
}
/* Adjusting capacity */
void WMSetDataCapacity(WMData * aData, unsigned capacity)
{
if (aData->capacity != capacity) {
aData->bytes = wrealloc(aData->bytes, capacity);
aData->capacity = capacity;
aData->growth = capacity / 2 > 0 ? capacity / 2 : 1;
}
if (aData->length > capacity) {
aData->length = capacity;
}
}
void WMSetDataLength(WMData * aData, unsigned length)
{
if (length > aData->capacity) {
WMSetDataCapacity(aData, length);
}
if (length > aData->length) {
memset((unsigned char *)aData->bytes + aData->length, 0, length - aData->length);
}
aData->length = length;
}
void WMSetDataFormat(WMData * aData, unsigned format)
{
aData->format = format;
}
void WMIncreaseDataLengthBy(WMData * aData, unsigned extraLength)
{
WMSetDataLength(aData, aData->length + extraLength);
}
/* Accessing data */
const void *WMDataBytes(WMData * aData)
{
return aData->bytes;
}
void WMGetDataBytes(WMData * aData, void *buffer)
{
wassertr(aData->length > 0);
memcpy(buffer, aData->bytes, aData->length);
}
unsigned WMGetDataFormat(WMData * aData)
{
return aData->format;
}
void WMGetDataBytesWithLength(WMData * aData, void *buffer, unsigned length)
{
wassertr(aData->length > 0);
wassertr(length <= aData->length);
memcpy(buffer, aData->bytes, length);
}
void WMGetDataBytesWithRange(WMData * aData, void *buffer, WMRange aRange)
{
wassertr(aRange.position < aData->length);
wassertr(aRange.count <= aData->length - aRange.position);
memcpy(buffer, (unsigned char *)aData->bytes + aRange.position, aRange.count);
}
WMData *WMGetSubdataWithRange(WMData * aData, WMRange aRange)
{
void *buffer;
WMData *newData;
if (aRange.count <= 0)
return WMCreateDataWithCapacity(0);
buffer = wmalloc(aRange.count);
WMGetDataBytesWithRange(aData, buffer, aRange);
newData = WMCreateDataWithBytesNoCopy(buffer, aRange.count, wfree);
newData->format = aData->format;
return newData;
}
/* Testing data */
Bool WMIsDataEqualToData(WMData * aData, WMData * anotherData)
{
if (aData->length != anotherData->length)
return False;
else if (!aData->bytes && !anotherData->bytes) /* both are empty */
return True;
else if (!aData->bytes || !anotherData->bytes) /* one of them is empty */
return False;
return (memcmp(aData->bytes, anotherData->bytes, aData->length) == 0);
}
unsigned WMGetDataLength(WMData * aData)
{
return aData->length;
}
/* Adding data */
void WMAppendDataBytes(WMData * aData, const void *bytes, unsigned length)
{
unsigned oldLength = aData->length;
unsigned newLength = oldLength + length;
if (newLength > aData->capacity) {
unsigned nextCapacity = aData->capacity + aData->growth;
unsigned nextGrowth = aData->capacity ? aData->capacity : 1;
while (nextCapacity < newLength) {
unsigned tmp = nextCapacity + nextGrowth;
nextGrowth = nextCapacity;
nextCapacity = tmp;
}
WMSetDataCapacity(aData, nextCapacity);
aData->growth = nextGrowth;
}
memcpy((unsigned char *)aData->bytes + oldLength, bytes, length);
aData->length = newLength;
}
void WMAppendData(WMData * aData, WMData * anotherData)
{
if (anotherData->length > 0)
WMAppendDataBytes(aData, anotherData->bytes, anotherData->length);
}
/* Modifying data */
void WMReplaceDataBytesInRange(WMData * aData, WMRange aRange, const void *bytes)
{
wassertr(aRange.position < aData->length);
wassertr(aRange.count <= aData->length - aRange.position);
memcpy((unsigned char *)aData->bytes + aRange.position, bytes, aRange.count);
}
void WMResetDataBytesInRange(WMData * aData, WMRange aRange)
{
wassertr(aRange.position < aData->length);
wassertr(aRange.count <= aData->length - aRange.position);
memset((unsigned char *)aData->bytes + aRange.position, 0, aRange.count);
}
void WMSetData(WMData * aData, WMData * anotherData)
{
unsigned length = anotherData->length;
WMSetDataCapacity(aData, length);
if (length > 0)
memcpy(aData->bytes, anotherData->bytes, length);
aData->length = length;
}
/* Storing data */

View File

@@ -34,331 +34,6 @@
#include <pwd.h>
#include <limits.h>
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
const char *wgethomedir(void)
{
static char *home = NULL;
char *tmp;
struct passwd *user;
if (home)
return home;
tmp = GETENV("HOME");
if (tmp) {
home = wstrdup(tmp);
return home;
}
user = getpwuid(getuid());
if (!user) {
werror(_("could not get password entry for UID %i"), getuid());
home = "/";
return home;
}
if (!user->pw_dir)
home = "/";
else
home = wstrdup(user->pw_dir);
return home;
}
/*
* Return the home directory for the specified used
*
* If user not found, returns NULL, otherwise always returns a path that is
* statically stored.
*
* Please note you must use the path before any other call to 'getpw*' or it
* may be erased. This is a design choice to avoid duplication considering
* the use case for this function.
*/
static const char *getuserhomedir(const char *username)
{
static const char default_home[] = "/";
struct passwd *user;
user = getpwnam(username);
if (!user) {
werror(_("could not get password entry for user %s"), username);
return NULL;
}
if (!user->pw_dir)
return default_home;
else
return user->pw_dir;
}
char *wexpandpath(const char *path)
{
const char *origpath = path;
char buffer2[PATH_MAX + 2];
char buffer[PATH_MAX + 2];
int i;
memset(buffer, 0, PATH_MAX + 2);
if (*path == '~') {
const char *home;
path++;
if (*path == '/' || *path == 0) {
home = wgethomedir();
if (strlen(home) > PATH_MAX ||
wstrlcpy(buffer, home, sizeof(buffer)) >= sizeof(buffer))
goto error;
} else {
int j;
j = 0;
while (*path != 0 && *path != '/') {
if (j > PATH_MAX)
goto error;
buffer2[j++] = *path;
buffer2[j] = 0;
path++;
}
home = getuserhomedir(buffer2);
if (!home || wstrlcat(buffer, home, sizeof(buffer)) >= sizeof(buffer))
goto error;
}
}
i = strlen(buffer);
while (*path != 0 && i <= PATH_MAX) {
char *tmp;
if (*path == '$') {
int j;
path++;
/* expand $(HOME) or $HOME style environment variables */
if (*path == '(') {
path++;
j = 0;
while (*path != 0 && *path != ')') {
if (j > PATH_MAX)
goto error;
buffer2[j++] = *(path++);
}
buffer2[j] = 0;
if (*path == ')') {
path++;
tmp = getenv(buffer2);
} else {
tmp = NULL;
}
if (!tmp) {
if ((i += strlen(buffer2) + 2) > PATH_MAX)
goto error;
buffer[i] = 0;
if (wstrlcat(buffer, "$(", sizeof(buffer)) >= sizeof(buffer) ||
wstrlcat(buffer, buffer2, sizeof(buffer)) >= sizeof(buffer))
goto error;
if (*(path-1)==')') {
if (++i > PATH_MAX ||
wstrlcat(buffer, ")", sizeof(buffer)) >= sizeof(buffer))
goto error;
}
} else {
if ((i += strlen(tmp)) > PATH_MAX ||
wstrlcat(buffer, tmp, sizeof(buffer)) >= sizeof(buffer))
goto error;
}
} else {
j = 0;
while (*path != 0 && *path != '/') {
if (j > PATH_MAX)
goto error;
buffer2[j++] = *(path++);
}
buffer2[j] = 0;
tmp = getenv(buffer2);
if (!tmp) {
if ((i += strlen(buffer2) + 1) > PATH_MAX ||
wstrlcat(buffer, "$", sizeof(buffer)) >= sizeof(buffer) ||
wstrlcat(buffer, buffer2, sizeof(buffer)) >= sizeof(buffer))
goto error;
} else {
if ((i += strlen(tmp)) > PATH_MAX ||
wstrlcat(buffer, tmp, sizeof(buffer)) >= sizeof(buffer))
goto error;
}
}
} else {
buffer[i++] = *path;
path++;
}
}
if (*path!=0)
goto error;
return wstrdup(buffer);
error:
errno = ENAMETOOLONG;
werror(_("could not expand %s"), origpath);
return NULL;
}
/* return address of next char != tok or end of string whichever comes first */
static const char *skipchar(const char *string, char tok)
{
while (*string != 0 && *string == tok)
string++;
return string;
}
/* return address of next char == tok or end of string whichever comes first */
static const char *nextchar(const char *string, char tok)
{
while (*string != 0 && *string != tok)
string++;
return string;
}
/*
*----------------------------------------------------------------------
* findfile--
* Finds a file in a : separated list of paths. ~ expansion is also
* done.
*
* Returns:
* The complete path for the file (in a newly allocated string) or
* NULL if the file was not found.
*
* Side effects:
* A new string is allocated. It must be freed later.
*
*----------------------------------------------------------------------
*/
char *wfindfile(const char *paths, const char *file)
{
char *path;
const char *tmp, *tmp2;
int len, flen;
char *fullpath;
if (!file)
return NULL;
if (*file == '/' || *file == '~' || *file == '$' || !paths || *paths == 0) {
if (access(file, F_OK) < 0) {
fullpath = wexpandpath(file);
if (!fullpath)
return NULL;
if (access(fullpath, F_OK) < 0) {
wfree(fullpath);
return NULL;
} else {
return fullpath;
}
} else {
return wstrdup(file);
}
}
flen = strlen(file);
tmp = paths;
while (*tmp) {
tmp = skipchar(tmp, ':');
if (*tmp == 0)
break;
tmp2 = nextchar(tmp, ':');
len = tmp2 - tmp;
path = wmalloc(len + flen + 2);
path = memcpy(path, tmp, len);
path[len] = 0;
if (path[len - 1] != '/' &&
wstrlcat(path, "/", len + flen + 2) >= len + flen + 2) {
wfree(path);
return NULL;
}
if (wstrlcat(path, file, len + flen + 2) >= len + flen + 2) {
wfree(path);
return NULL;
}
fullpath = wexpandpath(path);
wfree(path);
if (fullpath) {
if (access(fullpath, F_OK) == 0) {
return fullpath;
}
wfree(fullpath);
}
tmp = tmp2;
}
return NULL;
}
char *wfindfileinlist(char *const *path_list, const char *file)
{
int i;
char *path;
int len, flen;
char *fullpath;
if (!file)
return NULL;
if (*file == '/' || *file == '~' || !path_list) {
if (access(file, F_OK) < 0) {
fullpath = wexpandpath(file);
if (!fullpath)
return NULL;
if (access(fullpath, F_OK) < 0) {
wfree(fullpath);
return NULL;
} else {
return fullpath;
}
} else {
return wstrdup(file);
}
}
flen = strlen(file);
for (i = 0; path_list[i] != NULL; i++) {
len = strlen(path_list[i]);
path = wmalloc(len + flen + 2);
path = memcpy(path, path_list[i], len);
path[len] = 0;
if (wstrlcat(path, "/", len + flen + 2) >= len + flen + 2 ||
wstrlcat(path, file, len + flen + 2) >= len + flen + 2) {
wfree(path);
return NULL;
}
/* expand tilde */
fullpath = wexpandpath(path);
wfree(path);
if (fullpath) {
/* check if file exists */
if (access(fullpath, F_OK) == 0) {
return fullpath;
}
wfree(fullpath);
}
}
return NULL;
}
char *wfindfileinarray(WMPropList *array, const char *file)
{
@@ -419,105 +94,3 @@ char *wfindfileinarray(WMPropList *array, const char *file)
}
return NULL;
}
int wcopy_file(const char *dest_dir, const char *src_file, const char *dest_file)
{
char *path_dst;
int fd_src, fd_dst;
struct stat stat_src;
mode_t permission_dst;
const size_t buffer_size = 2 * 1024 * 1024; /* 4MB is a decent start choice to allow the OS to take advantage of modern disk's performance */
char *buffer; /* The buffer is not created on the stack to avoid possible stack overflow as our buffer is big */
try_again_src:
fd_src = open(src_file, O_RDONLY | O_NOFOLLOW);
if (fd_src == -1) {
if (errno == EINTR)
goto try_again_src;
werror(_("Could not open input file \"%s\": %s"), src_file, strerror(errno));
return -1;
}
/* Only accept to copy regular files */
if (fstat(fd_src, &stat_src) != 0 || !S_ISREG(stat_src.st_mode)) {
close(fd_src);
return -1;
}
path_dst = wstrconcat(dest_dir, dest_file);
try_again_dst:
fd_dst = open(path_dst, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (fd_dst == -1) {
if (errno == EINTR)
goto try_again_dst;
werror(_("Could not create target file \"%s\": %s"), path_dst, strerror(errno));
wfree(path_dst);
close(fd_src);
return -1;
}
buffer = malloc(buffer_size); /* Don't use wmalloc to avoid the memset(0) we don't need */
if (buffer == NULL) {
werror(_("could not allocate memory for the copy buffer"));
close(fd_dst);
goto cleanup_and_return_failure;
}
for (;;) {
ssize_t size_data;
const char *write_ptr;
size_t write_remain;
try_again_read:
size_data = read(fd_src, buffer, buffer_size);
if (size_data == 0)
break; /* End of File have been reached */
if (size_data < 0) {
if (errno == EINTR)
goto try_again_read;
werror(_("could not read from file \"%s\": %s"), src_file, strerror(errno));
close(fd_dst);
goto cleanup_and_return_failure;
}
write_ptr = buffer;
write_remain = size_data;
while (write_remain > 0) {
ssize_t write_done;
try_again_write:
write_done = write(fd_dst, write_ptr, write_remain);
if (write_done < 0) {
if (errno == EINTR)
goto try_again_write;
werror(_("could not write data to file \"%s\": %s"), path_dst, strerror(errno));
close(fd_dst);
goto cleanup_and_return_failure;
}
write_ptr += write_done;
write_remain -= write_done;
}
}
/* Keep only the permission-related part of the field: */
permission_dst = stat_src.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
if (fchmod(fd_dst, permission_dst) != 0)
wwarning(_("could not set permission 0%03o on file \"%s\": %s"),
permission_dst, path_dst, strerror(errno));
if (close(fd_dst) != 0) {
werror(_("could not close the file \"%s\": %s"), path_dst, strerror(errno));
cleanup_and_return_failure:
free(buffer);
close(fd_src);
unlink(path_dst);
wfree(path_dst);
return -1;
}
free(buffer);
wfree(path_dst);
close(fd_src);
return 0;
}

View File

@@ -279,7 +279,7 @@ Bool W_CheckIdleHandlers(void)
return (idleHandler != NULL && WMGetArrayItemCount(idleHandler) > 0);
}
handlerCopy = WMDuplicateArray(idleHandler);
handlerCopy = WMCreateArrayWithArray(idleHandler);
WM_ITERATE_ARRAY(handlerCopy, handler, iter) {
/* check if the handler still exist or was removed by a callback */
@@ -429,7 +429,7 @@ Bool W_HandleInputEvents(Bool waitForInput, int inputfd)
count = poll(fds, nfds + extrafd, timeout);
if (count > 0 && nfds > 0) {
WMArray *handlerCopy = WMDuplicateArray(inputHandler);
WMArray *handlerCopy = WMCreateArrayWithArray(inputHandler);
int mask;
/* use WM_ITERATE_ARRAY() here */
@@ -527,7 +527,7 @@ Bool W_HandleInputEvents(Bool waitForInput, int inputfd)
count = select(1 + maxfd, &rset, &wset, &eset, timeoutPtr);
if (count > 0 && nfds > 0) {
WMArray *handlerCopy = WMDuplicateArray(inputHandler);
WMArray *handlerCopy = WMCreateArrayWithArray(inputHandler);
int mask;
/* use WM_ITERATE_ARRAY() here */

View File

@@ -1,422 +0,0 @@
#include <config.h>
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "WUtil.h"
#define INITIAL_CAPACITY 23
typedef struct HashItem {
const void *key;
const void *data;
struct HashItem *next; /* collided item list */
} HashItem;
typedef struct W_HashTable {
WMHashTableCallbacks callbacks;
unsigned itemCount;
unsigned size; /* table size */
HashItem **table;
} HashTable;
#define HASH(table, key) (((table)->callbacks.hash ? \
(*(table)->callbacks.hash)(key) : hashPtr(key)) % (table)->size)
#define DUPKEY(table, key) ((table)->callbacks.retainKey ? \
(*(table)->callbacks.retainKey)(key) : (key))
#define RELKEY(table, key) if ((table)->callbacks.releaseKey) \
(*(table)->callbacks.releaseKey)(key)
static inline unsigned hashString(const void *param)
{
const char *key = param;
unsigned ret = 0;
unsigned ctr = 0;
while (*key) {
ret ^= *key++ << ctr;
ctr = (ctr + 1) % sizeof(char *);
}
return ret;
}
static inline unsigned hashPtr(const void *key)
{
return ((size_t) key / sizeof(char *));
}
static void rellocateItem(WMHashTable * table, HashItem * item)
{
unsigned h;
h = HASH(table, item->key);
item->next = table->table[h];
table->table[h] = item;
}
static void rebuildTable(WMHashTable * table)
{
HashItem *next;
HashItem **oldArray;
int i;
int oldSize;
int newSize;
oldArray = table->table;
oldSize = table->size;
newSize = table->size * 2;
table->table = wmalloc(sizeof(char *) * newSize);
table->size = newSize;
for (i = 0; i < oldSize; i++) {
while (oldArray[i] != NULL) {
next = oldArray[i]->next;
rellocateItem(table, oldArray[i]);
oldArray[i] = next;
}
}
wfree(oldArray);
}
WMHashTable *WMCreateHashTable(const WMHashTableCallbacks callbacks)
{
HashTable *table;
table = wmalloc(sizeof(HashTable));
table->callbacks = callbacks;
table->size = INITIAL_CAPACITY;
table->table = wmalloc(sizeof(HashItem *) * table->size);
return table;
}
void WMResetHashTable(WMHashTable * table)
{
HashItem *item, *tmp;
int i;
for (i = 0; i < table->size; i++) {
item = table->table[i];
while (item) {
tmp = item->next;
RELKEY(table, item->key);
wfree(item);
item = tmp;
}
}
table->itemCount = 0;
if (table->size > INITIAL_CAPACITY) {
wfree(table->table);
table->size = INITIAL_CAPACITY;
table->table = wmalloc(sizeof(HashItem *) * table->size);
} else {
memset(table->table, 0, sizeof(HashItem *) * table->size);
}
}
void WMFreeHashTable(WMHashTable * table)
{
HashItem *item, *tmp;
int i;
for (i = 0; i < table->size; i++) {
item = table->table[i];
while (item) {
tmp = item->next;
RELKEY(table, item->key);
wfree(item);
item = tmp;
}
}
wfree(table->table);
wfree(table);
}
unsigned WMCountHashTable(WMHashTable * table)
{
return table->itemCount;
}
static HashItem *hashGetItem(WMHashTable *table, const void *key)
{
unsigned h;
HashItem *item;
h = HASH(table, key);
item = table->table[h];
if (table->callbacks.keyIsEqual) {
while (item) {
if ((*table->callbacks.keyIsEqual) (key, item->key)) {
break;
}
item = item->next;
}
} else {
while (item) {
if (key == item->key) {
break;
}
item = item->next;
}
}
return item;
}
void *WMHashGet(WMHashTable * table, const void *key)
{
HashItem *item;
item = hashGetItem(table, key);
if (!item)
return NULL;
return (void *)item->data;
}
Bool WMHashGetItemAndKey(WMHashTable * table, const void *key, void **retItem, void **retKey)
{
HashItem *item;
item = hashGetItem(table, key);
if (!item)
return False;
if (retKey)
*retKey = (void *)item->key;
if (retItem)
*retItem = (void *)item->data;
return True;
}
void *WMHashInsert(WMHashTable * table, const void *key, const void *data)
{
unsigned h;
HashItem *item;
int replacing = 0;
h = HASH(table, key);
/* look for the entry */
item = table->table[h];
if (table->callbacks.keyIsEqual) {
while (item) {
if ((*table->callbacks.keyIsEqual) (key, item->key)) {
replacing = 1;
break;
}
item = item->next;
}
} else {
while (item) {
if (key == item->key) {
replacing = 1;
break;
}
item = item->next;
}
}
if (replacing) {
const void *old;
old = item->data;
item->data = data;
RELKEY(table, item->key);
item->key = DUPKEY(table, key);
return (void *)old;
} else {
HashItem *nitem;
nitem = wmalloc(sizeof(HashItem));
nitem->key = DUPKEY(table, key);
nitem->data = data;
nitem->next = table->table[h];
table->table[h] = nitem;
table->itemCount++;
}
/* OPTIMIZE: put this in an idle handler. */
if (table->itemCount > table->size) {
#ifdef DEBUG0
printf("rebuilding hash table...\n");
#endif
rebuildTable(table);
#ifdef DEBUG0
printf("finished rebuild.\n");
#endif
}
return NULL;
}
static HashItem *deleteFromList(HashTable * table, HashItem * item, const void *key)
{
HashItem *next;
if (item == NULL)
return NULL;
if ((table->callbacks.keyIsEqual && (*table->callbacks.keyIsEqual) (key, item->key))
|| (!table->callbacks.keyIsEqual && key == item->key)) {
next = item->next;
RELKEY(table, item->key);
wfree(item);
table->itemCount--;
return next;
}
item->next = deleteFromList(table, item->next, key);
return item;
}
void WMHashRemove(WMHashTable * table, const void *key)
{
unsigned h;
h = HASH(table, key);
table->table[h] = deleteFromList(table, table->table[h], key);
}
WMHashEnumerator WMEnumerateHashTable(WMHashTable * table)
{
WMHashEnumerator enumerator;
enumerator.table = table;
enumerator.index = 0;
enumerator.nextItem = table->table[0];
return enumerator;
}
void *WMNextHashEnumeratorItem(WMHashEnumerator * enumerator)
{
const void *data = NULL;
/* this assumes the table doesn't change between
* WMEnumerateHashTable() and WMNextHashEnumeratorItem() calls */
if (enumerator->nextItem == NULL) {
HashTable *table = enumerator->table;
while (++enumerator->index < table->size) {
if (table->table[enumerator->index] != NULL) {
enumerator->nextItem = table->table[enumerator->index];
break;
}
}
}
if (enumerator->nextItem) {
data = ((HashItem *) enumerator->nextItem)->data;
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
}
return (void *)data;
}
void *WMNextHashEnumeratorKey(WMHashEnumerator * enumerator)
{
const void *key = NULL;
/* this assumes the table doesn't change between
* WMEnumerateHashTable() and WMNextHashEnumeratorKey() calls */
if (enumerator->nextItem == NULL) {
HashTable *table = enumerator->table;
while (++enumerator->index < table->size) {
if (table->table[enumerator->index] != NULL) {
enumerator->nextItem = table->table[enumerator->index];
break;
}
}
}
if (enumerator->nextItem) {
key = ((HashItem *) enumerator->nextItem)->key;
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
}
return (void *)key;
}
Bool WMNextHashEnumeratorItemAndKey(WMHashEnumerator * enumerator, void **item, void **key)
{
/* this assumes the table doesn't change between
* WMEnumerateHashTable() and WMNextHashEnumeratorItemAndKey() calls */
if (enumerator->nextItem == NULL) {
HashTable *table = enumerator->table;
while (++enumerator->index < table->size) {
if (table->table[enumerator->index] != NULL) {
enumerator->nextItem = table->table[enumerator->index];
break;
}
}
}
if (enumerator->nextItem) {
if (item)
*item = (void *)((HashItem *) enumerator->nextItem)->data;
if (key)
*key = (void *)((HashItem *) enumerator->nextItem)->key;
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
return True;
}
return False;
}
static Bool compareStrings(const void *param1, const void *param2)
{
const char *key1 = param1;
const char *key2 = param2;
return strcmp(key1, key2) == 0;
}
typedef void *(*retainFunc) (const void *);
typedef void (*releaseFunc) (const void *);
const WMHashTableCallbacks WMIntHashCallbacks = {
NULL,
NULL,
NULL,
NULL
};
const WMHashTableCallbacks WMStringHashCallbacks = {
hashString,
compareStrings,
(retainFunc) wstrdup,
(releaseFunc) wfree
};
const WMHashTableCallbacks WMStringPointerHashCallbacks = {
hashString,
compareStrings,
NULL,
NULL
};

View File

@@ -1,223 +0,0 @@
/*
* Window Maker miscelaneous function library
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
* 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; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#include "wconfig.h"
#include "WUtil.h"
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <signal.h>
#ifdef HAVE_STDNORETURN
#include <stdnoreturn.h>
#endif
#ifdef USE_BOEHM_GC
#ifndef GC_DEBUG
#define GC_DEBUG
#endif /* !GC_DEBUG */
#include <gc/gc.h>
#endif /* USE_BOEHM_GC */
#ifndef False
# define False 0
#endif
#ifndef True
# define True 1
#endif
static void defaultHandler(int bla)
{
if (bla)
kill(getpid(), SIGABRT);
else
exit(1);
}
static waborthandler *aborthandler = defaultHandler;
static inline noreturn void wAbort(int bla)
{
(*aborthandler)(bla);
exit(-1);
}
waborthandler *wsetabort(waborthandler * handler)
{
waborthandler *old = aborthandler;
aborthandler = handler;
return old;
}
static int Aborting = 0; /* if we're in the middle of an emergency exit */
static WMHashTable *table = NULL;
void *wmalloc(size_t size)
{
void *tmp;
assert(size > 0);
#ifdef USE_BOEHM_GC
tmp = GC_MALLOC(size);
#else
tmp = malloc(size);
#endif
if (tmp == NULL) {
wwarning("malloc() failed. Retrying after 2s.");
sleep(2);
#ifdef USE_BOEHM_GC
tmp = GC_MALLOC(size);
#else
tmp = malloc(size);
#endif
if (tmp == NULL) {
if (Aborting) {
fputs("Really Bad Error: recursive malloc() failure.", stderr);
exit(-1);
} else {
wfatal("virtual memory exhausted");
Aborting = 1;
wAbort(False);
}
}
}
if (tmp != NULL)
memset(tmp, 0, size);
return tmp;
}
void *wrealloc(void *ptr, size_t newsize)
{
void *nptr;
if (!ptr) {
nptr = wmalloc(newsize);
} else if (newsize == 0) {
wfree(ptr);
nptr = NULL;
} else {
#ifdef USE_BOEHM_GC
nptr = GC_REALLOC(ptr, newsize);
#else
nptr = realloc(ptr, newsize);
#endif
if (nptr == NULL) {
wwarning("realloc() failed. Retrying after 2s.");
sleep(2);
#ifdef USE_BOEHM_GC
nptr = GC_REALLOC(ptr, newsize);
#else
nptr = realloc(ptr, newsize);
#endif
if (nptr == NULL) {
if (Aborting) {
fputs("Really Bad Error: recursive realloc() failure.", stderr);
exit(-1);
} else {
wfatal("virtual memory exhausted");
Aborting = 1;
wAbort(False);
}
}
}
}
return nptr;
}
void *wretain(void *ptr)
{
int *refcount;
if (!table) {
table = WMCreateHashTable(WMIntHashCallbacks);
}
refcount = WMHashGet(table, ptr);
if (!refcount) {
refcount = wmalloc(sizeof(int));
*refcount = 1;
WMHashInsert(table, ptr, refcount);
#ifdef VERBOSE
printf("== %i (%p)\n", *refcount, ptr);
#endif
} else {
(*refcount)++;
#ifdef VERBOSE
printf("+ %i (%p)\n", *refcount, ptr);
#endif
}
return ptr;
}
void wfree(void *ptr)
{
if (ptr)
#ifdef USE_BOEHM_GC
/* This should eventually be removed, once the criss-cross
* of wmalloc()d memory being free()d, malloc()d memory being
* wfree()d, various misuses of calling wfree() on objects
* allocated by libc malloc() and calling libc free() on
* objects allocated by Boehm GC (think external libraries)
* is cleaned up.
*/
if (GC_base(ptr) != 0)
GC_FREE(ptr);
else
free(ptr);
#else
free(ptr);
#endif
ptr = NULL;
}
void wrelease(void *ptr)
{
int *refcount;
refcount = WMHashGet(table, ptr);
if (!refcount) {
wwarning("trying to release unexisting data %p", ptr);
} else {
(*refcount)--;
if (*refcount < 1) {
#ifdef VERBOSE
printf("RELEASING %p\n", ptr);
#endif
WMHashRemove(table, ptr);
wfree(refcount);
wfree(ptr);
}
#ifdef VERBOSE
else {
printf("- %i (%p)\n", *refcount, ptr);
}
#endif
}
}

View File

@@ -536,12 +536,14 @@ found_end_define_fname:
while (*src != '\0') {
idx = 0;
if (*src == '~') {
const char *home = wgethomedir();
char *home_head = wgethomedir();
char *home = home_head;;
while (*home != '\0') {
if (idx < sizeof(buffer) - 2)
buffer[idx++] = *home;
home++;
}
wfree(home_head);
src++;
}

View File

@@ -88,10 +88,10 @@ static NotificationCenter *notificationCenter = NULL;
void W_InitNotificationCenter(void)
{
notificationCenter = wmalloc(sizeof(NotificationCenter));
notificationCenter->nameTable = WMCreateHashTable(WMStringPointerHashCallbacks);
notificationCenter->objectTable = WMCreateHashTable(WMIntHashCallbacks);
notificationCenter->nameTable = WMCreateStringHashTable();
notificationCenter->objectTable = WMCreateIdentityHashTable();
notificationCenter->nilList = NULL;
notificationCenter->observerTable = WMCreateHashTable(WMIntHashCallbacks);
notificationCenter->observerTable = WMCreateIdentityHashTable();
}
void W_ReleaseNotificationCenter(void)

View File

@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 2003-02-09 12:10+0200\n"
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2003-09-16 23:16+0200\n"
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2001-10-11 22:00+0100\n"
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
"Language-Team: Czech <cz@li.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n"

View File

@@ -15,6 +15,7 @@ msgstr ""
"PO-Revision-Date: 2004-11-05 23:48+0100\n"
"Last-Translator: shlomme@gmx.net\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2002-01-09 21:20+0100\n"
"Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n"
"Language-Team: Français <fr@li.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n"

View File

@@ -11,7 +11,7 @@ msgstr ""
"PO-Revision-Date: 2014-02-18 00:25+0100\n"
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
"Language-Team: Hungarian\n"
"Language: \n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -843,9 +843,6 @@ msgstr "Kon invoerbestand \"%s\" niet openen"
msgid "Could not create target file \"%s\""
msgstr "Kon doelbestand \"%s\" niet aanmaken"
msgid "An error occured browsing '%s'."
msgstr "Er trad 'n fout op bij bladeren door '%s'."
msgid ""
"invalid characted '%c' in arg-list for macro \"%s\" while expecting "
"parameter name"
@@ -860,9 +857,6 @@ msgstr ""
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte ',' "
"of ')'"
msgid "unknow directive '#%s'"
msgstr "onbekende aanwijzing '#%s'"
msgid "found #%s but have no matching #if"
msgstr "#%s gevonden, maar heeft geen bijbehorende #if"

View File

@@ -19,6 +19,7 @@ msgstr ""
"PO-Revision-Date: 2001-12-20 04:00+0100\n"
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
"Language-Team: Slovak <sk@li.org>\n"
"Language: sk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

File diff suppressed because it is too large Load Diff

View File

@@ -237,7 +237,7 @@ static void handleRequestEvent(XEvent * event)
}
/* delete handlers */
copy = WMDuplicateArray(selHandlers);
copy = WMCreateArrayWithArray(selHandlers);
WM_ITERATE_ARRAY(copy, handler, iter) {
if (handler && handler->flags.delete_pending) {
WMDeleteSelectionHandler(handler->view, handler->selection, handler->timestamp);
@@ -261,8 +261,9 @@ static WMData *getSelectionData(Display * dpy, Window win, Atom where)
bpi = bits / 8;
wdata = WMCreateDataWithBytesNoCopy(data, len * bpi, (void *) XFree);
wdata = WMCreateDataWithBytes(data, len * bpi);
WMSetDataFormat(wdata, bits);
XFree(data);
return wdata;
}
@@ -300,7 +301,7 @@ static void handleNotifyEvent(XEvent * event)
}
/* delete callbacks */
copy = WMDuplicateArray(selCallbacks);
copy = WMCreateArrayWithArray(selCallbacks);
WM_ITERATE_ARRAY(copy, handler, iter) {
if (handler && handler->flags.delete_pending) {
WMDeleteSelectionCallback(handler->view, handler->selection, handler->timestamp);

View File

@@ -46,40 +46,6 @@ static void synchronizeUserDefaults(void *foo);
#define UD_SYNC_INTERVAL 2000
#endif
const char *wusergnusteppath(void)
{
static const char subdir[] = "/" GSUSER_SUBDIR;
static char *path = NULL;
char *gspath;
const char *h;
int pathlen;
if (path)
/* Value have been already computed, re-use it */
return path;
gspath = GETENV("WMAKER_USER_ROOT");
if (gspath) {
gspath = wexpandpath(gspath);
if (gspath) {
path = gspath;
return path;
}
wwarning(_("variable WMAKER_USER_ROOT defined with invalid path, not used"));
}
h = wgethomedir();
if (!h)
return NULL;
pathlen = strlen(h);
path = wmalloc(pathlen + sizeof(subdir));
strcpy(path, h);
strcpy(path + pathlen, subdir);
return path;
}
const char *wuserdatapath(void)
{
static char *path = NULL;
@@ -331,7 +297,7 @@ WMUserDefaults *WMGetStandardUserDefaults(void)
/* terminate list */
defaults->searchList[2] = NULL;
defaults->searchListArray = WMCreatePLArray(NULL, NULL);
defaults->searchListArray = WMCreateEmptyPLArray();
i = 0;
while (defaults->searchList[i]) {
@@ -404,7 +370,7 @@ WMUserDefaults *WMGetDefaultsFromPath(const char *path)
/* terminate list */
defaults->searchList[1] = NULL;
defaults->searchListArray = WMCreatePLArray(NULL, NULL);
defaults->searchListArray = WMCreateEmptyPLArray();
i = 0;
while (defaults->searchList[i]) {

View File

@@ -65,7 +65,7 @@ struct W_Balloon *W_CreateBalloon(WMScreen * scr)
W_ResizeView(bPtr->view, DEFAULT_WIDTH, DEFAULT_HEIGHT);
bPtr->flags.alignment = DEFAULT_ALIGNMENT;
bPtr->table = WMCreateHashTable(WMIntHashCallbacks);
bPtr->table = WMCreateIdentityHashTable();
bPtr->delay = DEFAULT_DELAY;

View File

@@ -2994,10 +2994,13 @@ static void customPaletteMenuNewFromFile(W_ColorPanel * panel)
int i;
RImage *tmpImg = NULL;
if ((!panel->lastBrowseDir) || (strcmp(panel->lastBrowseDir, "\0") == 0))
spath = wexpandpath(wgethomedir());
else
if ((!panel->lastBrowseDir) || (strcmp(panel->lastBrowseDir, "\0") == 0)) {
char *homedir = wgethomedir();
spath = wexpandpath(homedir);
wfree(homedir);
} else {
spath = wexpandpath(panel->lastBrowseDir);
}
browseP = WMGetOpenPanel(scr);
WMSetFilePanelCanChooseDirectories(browseP, 0);

View File

@@ -761,17 +761,15 @@ static void goFloppy(WMWidget *widget, void *p_panel)
static void goHome(WMWidget *widget, void *p_panel)
{
WMFilePanel *panel = p_panel;
const char *home;
char *home;
/* Parameter not used, but tell the compiler that it is ok */
(void) widget;
/* home is statically allocated. Don't free it! */
home = wgethomedir();
if (!home)
return;
WMSetFilePanelDirectory(panel, home);
wfree(home);
}
static void handleEvents(XEvent * event, void *data)

View File

@@ -51,12 +51,15 @@ static char *xlfdToFcName(const char *xlfd)
{
FcPattern *pattern;
char *fname;
char *result;
pattern = xlfdToFcPattern(xlfd);
fname = (char *)FcNameUnparse(pattern);
result = wstrdup(fname);
free(fname);
FcPatternDestroy(pattern);
return fname;
return result;
}
static Bool hasProperty(FcPattern * pattern, const char *property)
@@ -92,6 +95,7 @@ static Bool hasPropertyWithStringValue(FcPattern * pattern, const char *object,
static char *makeFontOfSize(const char *font, int size, const char *fallback)
{
FcPattern *pattern;
char *name;
char *result;
if (font[0] == '-') {
@@ -115,7 +119,9 @@ static char *makeFontOfSize(const char *font, int size, const char *fallback)
/*FcPatternPrint(pattern); */
result = (char *)FcNameUnparse(pattern);
name = (char *)FcNameUnparse(pattern);
result = wstrdup(name);
free(name);
FcPatternDestroy(pattern);
return result;
@@ -421,7 +427,7 @@ WMFont *WMCopyFontWithStyle(WMScreen * scrPtr, WMFont * font, WMFontStyle style)
name = (char *)FcNameUnparse(pattern);
copy = WMCreateFont(scrPtr, name);
FcPatternDestroy(pattern);
wfree(name);
free(name);
return copy;
}

View File

@@ -535,7 +535,7 @@ static void listFamilies(WMScreen * scr, WMFontPanel * panel)
if (pat)
FcPatternDestroy(pat);
families = WMCreateHashTable(WMStringPointerHashCallbacks);
families = WMCreateStringHashTable();
if (fs) {
for (i = 0; i < fs->nfont; i++) {

View File

@@ -630,7 +630,7 @@ WMScreen *WMCreateScreenWithRContext(Display * display, int screen, RContext * c
scrPtr->rootWin = RootWindow(display, screen);
scrPtr->fontCache = WMCreateHashTable(WMStringPointerHashCallbacks);
scrPtr->fontCache = WMCreateStringHashTable();
scrPtr->xftdraw = XftDrawCreate(scrPtr->display, W_DRAWABLE(scrPtr), scrPtr->visual, scrPtr->colormap);

View File

@@ -1110,7 +1110,7 @@ static void deleteTexture(WMWidget * w, void *data)
static void extractTexture(WMWidget * w, void *data)
{
_Panel *panel = (_Panel *) data;
char *path;
char *path, *homedir;
WMOpenPanel *opanel;
WMScreen *scr = WMWidgetScreen(w);
@@ -1118,13 +1118,17 @@ static void extractTexture(WMWidget * w, void *data)
WMSetFilePanelCanChooseDirectories(opanel, False);
WMSetFilePanelCanChooseFiles(opanel, True);
if (WMRunModalFilePanelForDirectory(opanel, panel->parent, wgethomedir(), _("Select File"), NULL)) {
homedir = wgethomedir();
if (WMRunModalFilePanelForDirectory(opanel, panel->parent, homedir, _("Select File"), NULL)) {
path = WMGetFilePanelFileName(opanel);
OpenExtractPanelFor(panel);
wfree(path);
}
if (homedir) {
wfree(homedir);
}
}
static void changePage(WMWidget * w, void *data)
@@ -2224,7 +2228,7 @@ static void prepareForClose(_Panel * panel)
WMUserDefaults *udb = WMGetStandardUserDefaults();
int i;
textureList = WMCreatePLArray(NULL, NULL);
textureList = WMCreateEmptyPLArray();
/* store list of textures */
for (i = 8; i < WMGetListNumberOfRows(panel->texLs); i++) {
@@ -2246,7 +2250,7 @@ static void prepareForClose(_Panel * panel)
WMReleasePropList(textureList);
/* store list of colors */
textureList = WMCreatePLArray(NULL, NULL);
textureList = WMCreateEmptyPLArray();
for (i = 0; i < wlengthof(sample_colors); i++) {
WMColor *color;
char *str;

View File

@@ -288,6 +288,7 @@ static char *getSelectedFont(_Panel * panel, FcChar8 * curfont)
WMListItem *item;
FcPattern *pat;
char *name;
char *result;
if (curfont)
pat = FcNameParse(curfont);
@@ -321,9 +322,12 @@ static char *getSelectedFont(_Panel * panel, FcChar8 * curfont)
}
name = (char *)FcNameUnparse(pat);
result = wstrdup(name);
free(name);
FcPatternDestroy(pat);
return name;
return result;
}
static void updateSampleFont(_Panel * panel)

View File

@@ -151,7 +151,7 @@ static void storeData(_Panel * panel)
SetIntegerForKey(WMGetSliderValue(panel->hceS), "HotCornerEdge");
list = WMCreatePLArray(NULL, NULL);
list = WMCreateEmptyPLArray();
for (i = 0; i < sizeof(panel->hcactionsT) / sizeof(WMTextField *); i++) {
str = WMGetTextFieldText(panel->hcactionsT[i]);
if (strlen(str) == 0)

View File

@@ -66,6 +66,8 @@ AM_CPPFLAGS = -DRESOURCE_PATH=\"$(wpdatadir)\" -DWMAKER_RESOURCE_PATH=\"$(pkgdat
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
WPrefs_LDADD = \
$(top_builddir)/wutil-rs/target/debug/libwutil_rs.a\
$(top_builddir)/wings-rs/target/debug/libwings_rs.la\
$(top_builddir)/WINGs/libWINGs.la\
$(top_builddir)/WINGs/libWUtil.la\
$(top_builddir)/wrlib/libwraster.la \

View File

@@ -203,7 +203,7 @@ static void storeData(_Panel * panel)
int i;
char *p;
list = WMCreatePLArray(NULL, NULL);
list = WMCreateEmptyPLArray();
for (i = 0; i < WMGetListNumberOfRows(panel->icoL); i++) {
p = WMGetListItem(panel->icoL, i)->text;
tmp = WMCreatePLString(p);
@@ -211,7 +211,7 @@ static void storeData(_Panel * panel)
}
SetObjectForKey(list, "IconPath");
list = WMCreatePLArray(NULL, NULL);
list = WMCreateEmptyPLArray();
for (i = 0; i < WMGetListNumberOfRows(panel->pixL); i++) {
p = WMGetListItem(panel->pixL, i)->text;
tmp = WMCreatePLString(p);

View File

@@ -627,7 +627,7 @@ static void browseImageCallback(WMWidget *w, void *data)
WMSetFilePanelCanChooseFiles(opanel, True);
if (!ipath)
ipath = wstrdup(wgethomedir());
ipath = wgethomedir();
if (WMRunModalFilePanelForDirectory(opanel, panel->win, ipath, _("Open Image"), NULL)) {
char *path, *fullpath;

View File

@@ -705,10 +705,10 @@ static void loadConfigurations(WMScreen * scr, WMWindow * mainw)
}
if (!db) {
db = WMCreatePLDictionary(NULL, NULL);
db = WMCreateEmptyPLDictionary();
}
if (!gdb) {
gdb = WMCreatePLDictionary(NULL, NULL);
gdb = WMCreateEmptyPLDictionary();
}
GlobalDB = gdb;

View File

@@ -47,14 +47,6 @@ struct {
static pid_t DeadChildren[MAX_DEATHS];
static int DeadChildrenCount = 0;
static noreturn void wAbort(Bool foo)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) foo;
exit(1);
}
static void print_help(const char *progname)
{
printf(_("usage: %s [options]\n"), progname);
@@ -87,8 +79,6 @@ int main(int argc, char **argv)
int i;
char *display_name = "";
wsetabort(wAbort);
memset(DeadHandlers, 0, sizeof(DeadHandlers));
WMInitializeApplication("WPrefs", &argc, argv);
@@ -155,7 +145,12 @@ int main(int argc, char **argv)
exit(0);
}
WMPLSetCaseSensitive(False);
/*
* Rust rewrite note: this API surface has been removed, but we leave in
* a record of where it was invoked to set a value other than the
* default, in case it helps to track down bugs in the future.
*/
/* WMPLSetCaseSensitive(False); */
Initialize(scr);

View File

@@ -5,7 +5,8 @@ CATALOGS = @WPREFSMOFILES@
CLEANFILES = $(DOMAIN).pot $(CATALOGS)
EXTRA_DIST = bg.po ca.po cs.po de.po es.po et.po fi.po fr.po fy.po hr.po hu.po \
it.po ja.po ko.po nl.po pt.po ru.po sk.po tr.po uk.po zh_CN.po zh_TW.po
it.po ja.po ko.po nl.po pt.po ru.po sk.po sr.po tr.po uk.po zh_CN.po \
zh_TW.po
POTFILES = \
$(top_srcdir)/WPrefs.app/Appearance.c \

View File

@@ -8,6 +8,7 @@ msgstr ""
"PO-Revision-Date: 2001-04-18 23:22+03:00\n"
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2003-09-16 23:15+0200\n"
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2001-10-14 21:07+0000\n"
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
"Language-Team: czech <cs@li.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n"

View File

@@ -18,6 +18,7 @@ msgstr ""
"PO-Revision-Date: 2010-02-02 10:49+0100\n"
"Last-Translator: Carlos R. Mafra <crmafra@gmail.com>\n"
"Language-Team: German <>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -8,6 +8,7 @@ msgstr ""
"PO-Revision-Date: 2003-09-19 03:05-0400\n"
"Last-Translator: Alberto Giménez <algibe@teleline.es>\n"
"Language-Team: Spanish \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n"

View File

@@ -8,6 +8,7 @@ msgstr ""
"PO-Revision-Date: 2001-09-05 09:40+0200\n"
"Last-Translator: Ivar Smolin <okul@linux.ee>\n"
"Language-Team: Estonian <linux-ee@eenet.ee>\n"
"Language: et\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -475,7 +476,7 @@ msgstr "Window Maker vőttis vastu signaali %i."
#: ../src/dialog.c:1707
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to bugs@windowmaker.info."
msgstr ""
" See fataalviga on arvatavasti pőhjustatud programmi veast. Palun täitke "
@@ -1437,7 +1438,7 @@ msgstr "ei őnnestu käivitada alternatiivset aknahaldurit. Annan alla."
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"aset on leidnud fataalne viga, arvatavasti programmi viga. Palun täida "

View File

@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2001-09-03 22:18+03:00\n"
"Last-Translator: Tomi Kajala <tomi@iki.fi>\n"
"Language-Team: Finnish <fi@li.org>\n"
"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 1999-07-28 16:31-0100\n"
"Last-Translator: Antoine Hulin <antoine.hulin@origan.fdn.org>\n"
"Language-Team: French <fr@li.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 1998-08-24 14:36:41-0300\n"
"Last-Translator: Toni Bilić tbilic@oliver.efos.hr \n"
"Language-Team: Croatian \n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -11,7 +11,7 @@ msgstr ""
"PO-Revision-Date: 2014-02-18 00:33+0100\n"
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
"Language-Team: Hungarian\n"
"Language: \n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2001-05-21\n"
"Last-Translator: Michele Campeotto <micampe@f2s.com\n"
"Language-Team: Italian\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n"

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2013-08-13 19:26+0900\n"
"Last-Translator: \n"
"Language-Team: Korean\n"
"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2000-01-04 18:25-0300\n"
"Last-Translator: Eliphas Levy Theodoro <eliphas@conectiva.com.br>\n"
"Language-Team: Portuguese \n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2002-09-12 17:45+0300\n"
"Last-Translator: awn@bcs.zp.ua\n"
"Language-Team: Russian\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -18,6 +18,7 @@ msgstr ""
"PO-Revision-Date: 2001-10-15 20:40+0100\n"
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
"Language-Team: Slovak <sk@li.org>\n"
"Language: sk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -5,6 +5,7 @@ msgstr ""
"PO-Revision-Date: 2004-09-06 21:42+4000\n"
"Last-Translator: Victor Forsyuk <victor@ksi-linux.com>\n"
"Language-Team: KSI Linux Ukrainian <uk@ksi-linux.com>\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 1999-07-05 23:20+0800\n"
"Last-Translator: Wang Jian <larkw@263.net>\n"
"Language-Team: chinese <zh@li.org>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2005-01-11 17:46+0800\n"
"Last-Translator: Li Wei Jih <lwj83@cs.ccu.edu.tw>\n"
"Language-Team: chinese <zh@li.org>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -1,26 +1,16 @@
#!/bin/sh
srcdir=$(dirname $0)
test -z "$srcdir" && srcdir=.
# Generate the documentation about compiling Window Maker
./script/generate-txt-from-texi.sh "doc/build/Compilation.texi" -o "INSTALL-WMAKER"
./script/generate-txt-from-texi.sh "doc/build/Translations.texi" -o "README.i18n"
$srcdir/script/generate-txt-from-texi.sh "$srcdir/doc/build/Compilation.texi" \
-o "$srcdir/INSTALL-WMAKER"
$srcdir/script/generate-txt-from-texi.sh "$srcdir/doc/build/Translations.texi" \
-o "$srcdir/README.i18n"
# Change date of the files to the past so they will be regenerated by 'make'
touch -d '2000-01-01' INSTALL-WMAKER README.i18n
touch -d '2000-01-01' $srcdir/INSTALL-WMAKER $srcdir/README.i18n
# Generate the configure script from the 'configure.ac'
autoreconf -vfi -I m4
exit 0
if [ -x config.status -a -z "$*" ]; then
./config.status --recheck
else
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
echo "If you do not wish to run ./configure, press Ctrl-C now."
trap 'echo "configure aborted" ; exit 0' 1 2 15
sleep 1
fi
./configure "$@"
fi
autoreconf -vfi -I m4 $srcdir

View File

@@ -49,6 +49,17 @@ AC_CONFIG_SRCDIR([src/WindowMaker.h])
dnl Include at the end of 'config.h', this file is generated by top-level Makefile
AH_BOTTOM([@%:@include "config-paths.h"])
dnl Rust support
AC_CHECK_PROG(CARGO, [cargo], [yes], [no])
AS_IF(test x$CARGO = xno,
AC_MSG_ERROR([cargo is required. Please set the CARGO environment variable or install the Rust toolchain from https://www.rust-lang.org/])
)
AC_SUBST(CARGO, [cargo])
AC_CHECK_PROG(RUSTC, [rustc], [yes], [no])
AS_IF(test x$RUSTC = xno,
AC_MSG_ERROR([rustc is required. Please set the RUSTC environment variable or install the Rust toolchain from https://www.rust-lang.org/])
)
AC_SUBST(RUSTC, [rustc])
dnl libtool library versioning
dnl ==========================
@@ -97,7 +108,6 @@ dnl ===================
AC_PROG_CC
WM_PROG_CC_C11
AC_PROG_LN_S
AC_PROG_GCC_TRADITIONAL
LT_INIT
@@ -343,24 +353,6 @@ AS_IF([test "x$enable_mwm_hints" = "xno"],
AM_CONDITIONAL([USE_MWM_HINTS], [test "x$enable_mwm_hints" != "xno"])
dnl Boehm GC
dnl ========
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([boehm-gc],
[AS_HELP_STRING([--enable-boehm-gc], [use Boehm GC instead of the default libc malloc() [default=no]])],
[AS_CASE(["$enableval"],
[yes], [with_boehm_gc=yes],
[no], [with_boehm_gc=no],
[AC_MSG_ERROR([bad value $enableval for --enable-boehm-gc])] )],
[with_boehm_gc=no])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$with_boehm_gc" = "xyes"],
AC_SEARCH_LIBS([GC_malloc], [gc],
[AC_DEFINE(USE_BOEHM_GC, 1, [Define if Boehm GC is to be used])],
[AC_MSG_FAILURE([--enable-boehm-gc specified but test for libgc failed])]))
dnl LCOV
dnl ====
m4_divert_push([INIT_PREPARE])dnl
@@ -965,11 +957,17 @@ AC_CONFIG_FILES(
wrlib/Makefile wrlib/po/Makefile
wrlib/tests/Makefile
dnl Rust implementation of WINGs libraries
wutil-rs/Makefile
dnl WINGs toolkit
WINGs/Makefile WINGs/WINGs/Makefile WINGs/po/Makefile
WINGs/Documentation/Makefile WINGs/Resources/Makefile WINGs/Extras/Makefile
WINGs/Examples/Makefile WINGs/Tests/Makefile
dnl Rust implementation of Window Maker core
wmaker-rs/Makefile
dnl Window Maker's core
src/Makefile src/wconfig.h po/Makefile
doc/Makefile doc/build/Makefile

View File

@@ -253,14 +253,6 @@ If found, then the library @emph{WRaster} can use the @emph{ImageMagick} library
@sc{Window Maker} support more image formats, like @emph{SVG}, @emph{BMP}, @emph{TGA}, ...
You can get it from @uref{http://www.imagemagick.org/}
@item @emph{Boehm GC}
This library can be used by the @emph{WINGs} utility toolkit to use a
@cite{Boehm-Demers-Weiser Garbage Collector} instead of the traditional
@command{malloc}/@command{free} functions from the @emph{libc}.
You have to explicitly ask for its support though (@pxref{Configure Options}).
You can get it from @uref{http://www.hboehm.info/gc/}
@end itemize
@@ -468,8 +460,6 @@ You can find more information about the libraries in the
@ref{Optional Dependencies}.
@table @option
@item --enable-boehm-gc
Never enabled by default, use Boehm GC instead of the default @emph{libc} @command{malloc()}
@item --disable-gif
Disable GIF support in @emph{WRaster} library; when enabled use @file{libgif} or @file{libungif}.

View File

@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2002-10-17 19:02+0300\n"
"Last-Translator: Ihar Viarheichyk <iverg@mail.ru>\n"
"Language-Team: Belarusian <be@li.org>\n"
"Language: be\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -472,7 +473,7 @@ msgstr "Window Maker атрымаў сігнал %i."
#: ../src/dialog.c:1632
#, c-format
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Гэты крытычны збой магчыма вызваны памылкамі ў WindowMaker."
@@ -1433,7 +1434,7 @@ msgstr "не магчыма запусціць іншы ваконны мене
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
" Гэты крытычны збой магчыма вызваны памылкамі ў WindowMaker."

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2003-02-09 14:21+0200\n"
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -602,7 +603,7 @@ msgstr "Уиндоу Мейкър получи сигнал %i."
#: ../src/dialog.c:1632
#, c-format
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr "Възникналата критична грешка вероятно се дължи на програмен дефект. Моля попълнете формуляра от файла BUGFORM и го изпратете на адрес %s."
@@ -1793,7 +1794,7 @@ msgstr ""
# ../src/startup.c:352
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr "възникна критична грешка, вероятно дължаща се на програмен дефект. Моля попълнете формуляра от файла BUGFORM и ни уведомете "

View File

@@ -8,6 +8,7 @@ msgstr ""
"PO-Revision-Date: 2004-08-30 00:23+0200\n"
"Last-Translator: Ahmet Mulalić <am@lugzdk.ba>\n"
"Language-Team: Bosanski <lugzdk@lugzdk.ba>\n"
"Language: bs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2003-09-16 23:13+0200\n"
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -494,7 +495,7 @@ msgstr "Window Maker ha rebut un senyal %i."
#: ../src/dialog.c:1632
#, c-format
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Aquest error fatal probablement ha estat causat per un \"bug\". Si us plau, "
@@ -1471,7 +1472,7 @@ msgstr "no s'ha pogut iniciar cap gestor de finestres alternatiu. S'avorta."
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"s'ha produït un error fatal, probablement a causa d'un \"bug\". Si us plau, "

View File

@@ -15,6 +15,7 @@ msgstr ""
"PO-Revision-Date: 2001-10-14 20:29+53:00\n"
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
"Language-Team: czech <cs@li.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n"
@@ -477,7 +478,7 @@ msgstr "Window Maker přijal signál %i."
#: ../src/dialog.c:1632
#, c-format
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Tato závažná chyba se vyskytla pravděpodobně v důsledku chyby v kódu Window "
@@ -1392,7 +1393,7 @@ msgstr "alternativního správce oken nelze odstartovat. Konec."
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"fatální chyba, pravděpodobně chyba ve Window Makeru. Prosím vyplňte soubor "

View File

@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 2002-02-20 20:56+0100\n"
"Last-Translator: Birger Langkjer <birger.langkjer@image.dk>\n"
"Language-Team: Danish <sslug-locale@sslug.dk>\n"
"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
@@ -544,7 +545,7 @@ msgstr "Window Maker modtog signal %i"
# ../src/dialog.c:1450
#: ../src/dialog.c:1790
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
"en fatal fejl er opstået, sikkert pga. en bug. Udfyld venligst den vedlagte "
@@ -1685,7 +1686,7 @@ msgstr "det lykkedes ikke at starte alternativ vindueshåndtering. Afbryder."
# ../src/startup.c:349
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"en fatal fejl er opstået, sikkert pga. en bug. Udfyld venligst den vedlagte "

View File

@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2004-11-08 22:58+0100\n"
"Last-Translator: shlomme@gmx.net\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -471,7 +472,7 @@ msgstr "Window Maker erhielt Signal %i"
#: ../src/dialog.c:1602
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Dieser fatale Fehler trat möglicherweise wegen eines Bugs auf. Bitte füllen "

View File

@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 1999-09-04 01:39+0300\n"
"Last-Translator: Nikolaos Papagrigoriou <papanikos@freemail.gr>\n"
"Language-Team: Greek\n"
"Language: el\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
@@ -1173,7 +1174,7 @@ msgstr "αποτυχία εκκίνησης εναλλακτικού διαχε
#: ../src/startup.c:349
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""

View File

@@ -491,7 +491,7 @@ msgstr "Window Maker recibió la señal %i."
#: ../src/dialog.c:1576
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Este error fatal ocurrió probablemente debido a un fallo.\n"

View File

@@ -487,7 +487,7 @@ msgstr "Window Maker võttis vastu signaali %i."
#: ../src/dialog.c:1573
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" See fataalviga on arvatavasti põhjustatud programmi enese veast. Palun "

View File

@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2001-09-03 21:56+03:00\n"
"Last-Translator: Tomi Kajala <tomi@iki.fi>\n"
"Language-Team: Finnish <fi@li.org>\n"
"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
@@ -465,7 +466,7 @@ msgstr "Window Maker vastaanotti signaalin %i."
#: ../src/dialog.c:1707
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Tämä vakava virhe tapahtui luultavasti bugin johdosta. Ole hyvä ja täytä "
@@ -1389,7 +1390,7 @@ msgstr "vaihtoehtoisen ikkunamanagerin käynnistys epäonnistui. Keskeytetään.
#: ../src/startup.c:412
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"vakava virhe on tapahtunut - luultavasti bugin johdosta. Ole hyvä ja täytä "

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2002-01-21 07:08+0100\n"
"Last-Translator: Antoine Hulin <antoine.hulin@origan.fdn.org>\n"
"Language-Team: French <fr@li.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
@@ -481,7 +482,7 @@ msgstr "Window Maker a reçu le signal %i."
#: ../src/dialog.c:1632
#, c-format
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Cette erreur est probablement due à un bogue. Remplissez le formulaire "

View File

@@ -2086,11 +2086,3 @@ msgstr "toets %s (0x%x) generearret sawol %s as %s, wat ûnsinnich is"
#, c-format
msgid "Can't convert keymask 0x%04X to a shortcut label"
msgstr "Kin 'keymask' 0x%04X net omsette nei fluchtoetsbeneaming"
# Keep next entry for wmaker-0.95.7
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Dizze ûnwerstelbere flater trede mooglik op troch in bug. Folje a.j.w. "
"bygeand BUGFORM yn, en rapportearje it oan %s."

View File

@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2000-10-15 17:57+0200\n"
"Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n"
"Language-Team: Galician <trasno@ceu.fi.udc.es>\n"
"Language: gl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -359,7 +360,7 @@ msgstr "O Window Maker recibiu un sinal %i."
#: ../src/dialog.c:1564
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Este erro grave ocorreu probablemente por mor dun erro do programa. Por "
@@ -1240,7 +1241,7 @@ msgstr "fallou o inicio dun xestor de fiestras alternativo. Abortando."
#: ../src/startup.c:352
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"ocorreu un erro moi grave, probablemente por mor dun erro de programación. "

View File

@@ -8,6 +8,7 @@ msgstr ""
"PO-Revision-Date: 1998-08-18 16:28:19+0200\n"
"Last-Translator: Toni Bilić <tbilic@oliver.efos.hr>\n"
"Language-Team: Croatian\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -11,7 +11,7 @@ msgstr ""
"PO-Revision-Date: 2014-02-18 00:23+0100\n"
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
"Language-Team: Hungarian\n"
"Language: \n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -491,7 +491,7 @@ msgstr "A Window Maker %i jelzést kapott."
#: ../../wmaker-crm/src/dialog.c:1599
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr " Ezt a végzetes hibát valószínűleg egy programozási hiba okozta. Légy szíves töltsd ki a mellékelt BUGFORM kérdőívet és küldd el a %s e-mail címre!"
@@ -800,7 +800,7 @@ msgstr "a beállítás adatbázist tartalmazó egységet lecsatolták. \"--stati
msgid "Inotify: Reading config files in defaults database."
msgstr "Inotify: újraolvasom a konfigurációs fájlokat a beállítás adatbázisból."
#. an error has occured
#. an error has occurred
#: ../../wmaker-crm/src/event.c:391
msgid ""
"select failed. The inotify instance will be closed. Changes to the defaults "

View File

@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2005-03-04 16:33+0000\n"
"Last-Translator: Marco Colombo <m.colombo@ed.ac.uk>\n"
"Language-Team: Italian <tp@lists.linux.it@li.org>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -526,7 +527,7 @@ msgstr "Window Maker ha ricevuto il segnale %i."
#: ../src/dialog.c:1768
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Questo errore fatale è probabilmente dovuto ad un bug. Si prega di "

View File

@@ -460,7 +460,7 @@ msgstr "Window Maker は シグナル %i を受けました."
#: ../src/dialog.c:1576
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
"この致命的なエラーはバグによるものかもしれません. 同梱のバグフォームを使って "

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2013-08-12 23:57+0900\n"
"Last-Translator: \n"
"Language-Team: Korean\n"
"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -471,7 +472,7 @@ msgstr "윈도우 메이커가 %i 신호를 받음."
#: ../src/dialog.c:1596
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
"버그로 인해 치명적인 오류가 발생했습니다. BUGFORM을 작성하여 "
@@ -1953,7 +1954,7 @@ msgstr "마지막으로 사용됨"
#~ msgstr "대체용 창 관리자를 실행 실패. 종료."
#~ msgid ""
#~ "a fatal error has occured, probably due to a bug. Please fill the "
#~ "a fatal error has occurred, probably due to a bug. Please fill the "
#~ "included BUGFORM and report it."
#~ msgstr ""
#~ "치명적인 오류 발생, 아마도 버그인 것 같습니다. BUGFORM을 작성해 보내주시"

View File

@@ -10,6 +10,7 @@ msgstr ""
"Last-Translator: Hasbullah Bin Pit <sebol@ikhlas.com>\n"
"Language-Team: Projek Gabai (Bahasa Melayu) <gabai-penyumbang@lists."
"sourceforge.net>\n"
"Language: ms\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -456,7 +457,7 @@ msgstr "Window Maker menerima isyarat %i."
#: ../src/dialog.c:1786
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Ralat fatal ini berlaku kemungkinan disebabkan pepijat. Sila ini BUGFORM "
@@ -1414,7 +1415,7 @@ msgstr "gagl menghidupkan pengurus tetingkap lain. Diabaikan."
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"ralat fatal berlaku, mungkin kerana pepijat. Sila ini BUGFORM yang "

View File

@@ -2090,11 +2090,3 @@ msgstr "toets %s (0x%x) genereert zowel %s als %s, wat onzinnig is"
#, c-format
msgid "Can't convert keymask 0x%04X to a shortcut label"
msgstr "Kan 'keymask' 0x%04X niet omzetten naar sneltoetsbenaming"
# Keep next entry for wmaker-0.95.7
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Deze onherstelbare fout trad mogelijk op door 'n bug. Vul a.u.b. "
"bijgaand BUGFORM in, en rapporteer 't aan %s."

View File

@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 1998-05-23 H12:54+0200\n"
"Last-Translator: Marcus Ramberg <draven@mo.himolde.no>\n"
"Language-Team: Norwegian \n"
"Language: no\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2003-04-15 20:21+0200\n"
"Last-Translator: Piotr Dembiński <pdemb@fanthom.math.put.poznan.pl>\n"
"Language-Team: Polish <pl@li.org>\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
@@ -982,7 +983,7 @@ msgid "crashed while trying to do some post-crash cleanup. Aborting immediatelly
msgstr "załamanie podczas próby uporządkowania po załamaniu. Wyjście awaryjne."
#: ../src/startup.c:304
msgid "a fatal error has occured, probably due to a bug. Please fill the included BUGFORM and report it."
msgid "a fatal error has occurred, probably due to a bug. Please fill the included BUGFORM and report it."
msgstr "wystąpił poważny błąd, prawdopodobnie pluskwa. Prosimy o wypełnienie formularza BUGFORM i wysłanie go do nas."
#. restart another window manager so that the X session doesn't

View File

@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2000-06-06 14:11-03:00\n"
"Last-Translator: Marcia Norie Nakaza <norie@conectiva.com.br>\n"
"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br> \n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
@@ -352,7 +353,7 @@ msgstr "O Window Maker recebeu o sinal %i."
#: ../src/dialog.c:1564
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Este erro fatal ocorreu provavelmente devido a uma falha.\n"
@@ -1230,7 +1231,7 @@ msgstr "tentativa de iniciar gerenciador alternativo falhou. Abortando."
#: ../src/startup.c:352
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"um erro fatal ocorreu, provavelmente devido a uma falha. Por favor preencha "

View File

@@ -6,6 +6,7 @@ msgstr ""
"PO-Revision-Date: 1998-09-08 22:00:00-0300\n"
"Last-Translator: AndreiVuta(gigi_man@manag.pub.ro)\n"
"Language-Team: Romanian \n"
"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -16,6 +16,7 @@ msgstr ""
"PO-Revision-Date: 2002-10-04 08:56+0300\n"
"Last-Translator: awn@bcs.zp.ua\n"
"Language-Team: Russian\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -487,7 +488,7 @@ msgstr "Window Maker: получен сигнал %i."
#: ../src/dialog.c:1632
#, c-format
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Эта критическая ошибка, возможно, является результатом ошибки в программе. "
@@ -1438,7 +1439,7 @@ msgstr "не удалось запустить альтернативный ди
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"возникла критическая ошибка. Возможно, это результат ошибки в программе. "

View File

@@ -21,6 +21,7 @@ msgstr ""
"PO-Revision-Date: 2001-12-20 03:53+0100\n"
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
"Language-Team: Slovak <sk@li.org>\n"
"Language: sk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -498,7 +499,7 @@ msgstr "Window Maker prijal signál %i."
#: ../src/dialog.c:1632
#, c-format
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
"Táto fatálna chyba sa vyskytla "
@@ -1480,7 +1481,7 @@ msgstr "nepodarilo sa spustiť alternatívny manažér okien. Koniec."
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"fatálna chyba nastala pravdepodobne v dôsledku chyby vo Window Makery. "

View File

@@ -7,6 +7,7 @@ msgstr ""
"PO-Revision-Date: 1997-06-02 18:29:09-0300\n"
"Last-Translator: John <forgoil@rsn.hk-r.se>\n"
"Language-Team: Swedish \n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -4,6 +4,7 @@ msgstr ""
"PO-Revision-Date: 1998-03-12 18:29:09+EET\n"
"Last-Translator: KGF <kgf@wpi.edu>\n"
"Language-Team: Turkish \n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"

View File

@@ -5,6 +5,7 @@ msgstr ""
"PO-Revision-Date: 2005-09-06 08:56+0300\n"
"Last-Translator: Victor Forsyuk <victor@ksi-linux.com>\n"
"Language-Team: KSI Linux Ukrainian <uk@ksi-linux.com>\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -479,7 +480,7 @@ msgstr "Window Maker: отримано сигнал %i."
#: ../src/dialog.c:1790
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
" Ця критична помилка, можливо, є результатом помилки в програмі. Будь ласка, "
@@ -1448,7 +1449,7 @@ msgstr "не вдалось запустити альтернативний ме
#: ../src/startup.c:419
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"виникла критична помилка. Можливо, це результат помилки в програмі. Будь "

View File

@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 1999-07-05 21:30+0800\n"
"Last-Translator: Wang Jian <larkw@263.net>\n"
"Language-Team: chinese <zh@li.org>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
@@ -300,7 +301,7 @@ msgstr "Window Maker收到信号%i."
#: ../src/dialog.c:1450
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
"发生一个致命错误,也许是因为一个 bug.请填写好软件中包含的 BUGFORM 并向"
@@ -1163,7 +1164,7 @@ msgstr "无法启动替代的窗口管理器.中止."
#: ../src/startup.c:349
msgid ""
"a fatal error has occured, probably due to a bug. Please fill the included "
"a fatal error has occurred, probably due to a bug. Please fill the included "
"BUGFORM and report it."
msgstr ""
"发生一个致命错误,也许是因为一个 bug.请填写好软件中包含的 BUGFORM 并报告 bug."

View File

@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2005-01-11 17:45+0800\n"
"Last-Translator: Li Wei Jih <lwj83@cs.ccu.edu.tw>\n"
"Language-Team: chinese <zh@li.org>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
@@ -512,7 +513,7 @@ msgstr "Window Maker 收到訊號 %i。"
#: ../src/dialog.c:1768
msgid ""
" This fatal error occured probably due to a bug. Please fill the included "
" This fatal error occurred probably due to a bug. Please fill the included "
"BUGFORM and report it to %s."
msgstr ""
"這個嚴重錯誤可能是因為程式錯誤所致。請填寫附帶的 BUGFORM 並向 "
@@ -1927,7 +1928,7 @@ msgstr "刪除最後的工作區"
#~ msgstr "另一套視窗管理員啟動失敗。放棄中。"
#~ msgid ""
#~ "a fatal error has occured, probably due to a bug. Please fill the "
#~ "a fatal error has occurred, probably due to a bug. Please fill the "
#~ "included BUGFORM and report it."
#~ msgstr "發生嚴重錯誤,可能因為程式錯誤。請填寫 BUGFORM 並提出報告。"

View File

@@ -91,7 +91,7 @@ while [ $# -gt 0 ]; do
;;
-h|-help|--help) print_help ;;
-*) arg_error "unknow option '$1'" ;;
-*) arg_error "unknown option '$1'" ;;
*)
arg_error "argument '$1' is not understood"

View File

@@ -75,7 +75,7 @@ while [ $# -gt 0 ]; do
;;
-h|-help|--help) print_help ;;
-*) arg_error "unknow option '$1'" ;;
-*) arg_error "unknown option '$1'" ;;
*)
[ "x$trans_dir" != "x" ] || arg_error "only 1 directory can be specified for translation"
@@ -226,7 +226,7 @@ END {
error_count++;
}
# If error(s) occured, use non-zero status to stop 'make'
# If error(s) occurred, use non-zero status to stop 'make'
# We use 3 to distinguish for awk's possible own problems (status 1 or 2)
if (error_count > 0) { exit 3 }
}"

View File

@@ -120,7 +120,7 @@ $1"
;;
-h|-help|--help) print_help ;;
-*) arg_error "unknow option '$1'" ;;
-*) arg_error "unknown option '$1'" ;;
*)
arg_error "argument '$1' is not understood"

View File

@@ -119,7 +119,7 @@ while [ $# -gt 0 ]; do
;;
-h|-help|--help) print_help ;;
-*) arg_error "unknow option '$1'" ;;
-*) arg_error "unknown option '$1'" ;;
*)
[ -z "$input_file" ] || arg_error "only 1 man page can be specified"

View File

@@ -83,7 +83,7 @@ while [ $# -gt 0 ]; do
;;
-h|-help|--help) print_help ;;
-*) arg_error "unknow option '$1'" ;;
-*) arg_error "unknown option '$1'" ;;
*)
[ -r "$1" ] || arg_error "source file \"$1\" is not readable"

View File

@@ -90,7 +90,7 @@ while [ $# -gt 0 ]; do
project_version="$1"
;;
-*) arg_error "unknow option '$1'" ;;
-*) arg_error "unknown option '$1'" ;;
*)
[ "x$lang_file" = "x" ] || arg_error "only 1 po file can be specified, not \"$lang_file\" and \"$1\""

View File

@@ -151,7 +151,7 @@ while [ $# -gt 0 ]; do
project_version="$1"
;;
-*) arg_error "unknow option '$1'" ;;
-*) arg_error "unknown option '$1'" ;;
*)
[ "x$input_file" = "x" ] || arg_error "only 1 input file can be specified, not \"$input_file\" and \"$1\""
@@ -903,7 +903,7 @@ function execute_commands(line, replaced_line, command) {
# Variable and Conditional commands ########################################
} else if (command == "value") {
if (variable[cmdargs] == "") {
report_error("variable '" cmdargs "' is unknow, for @value at line " NR);
report_error("variable '" cmdargs "' is unknown, for @value at line " NR);
}
line = variable[cmdargs] line;
@@ -913,7 +913,7 @@ function execute_commands(line, replaced_line, command) {
line = "";
} else {
report_error("unknow command @" command " at line " NR);
report_error("unknown command @" command " at line " NR);
}
}
@@ -971,7 +971,7 @@ function process_end(line) {
par_indent = 0;
} else {
report_error("unknow command @end " line " at line " NR);
report_error("unknown command @end " line " at line " NR);
}
}

Some files were not shown because too many files have changed in this diff Show More