Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit c5bdb264 authored by Rob Swindell's avatar Rob Swindell 💬

Character 255 is a non-breaking space in CP437

Now IS_WHITESPACE() will return true for that char and this allows things like truncsp() to truncate trailing white-space (e.g. from a FILE_ID.DIZ), even if it contains a terminating 0xFF character for some unknown reason.
parent 6beb55ae
......@@ -37,6 +37,7 @@
#ifndef _GEN_DEFS_H
#define _GEN_DEFS_H
#include "cp437defs.h"
#include <errno.h>
/* Resolve multi-named errno constants */
......@@ -451,7 +452,7 @@ typedef struct {
/* ASCIIZ char* parsing helper macros */
/* These (unsigned char) typecasts defeat MSVC debug assertion when passed a negative value */
#define IS_WHITESPACE(c) isspace((unsigned char)(c))
#define IS_WHITESPACE(c) (isspace((unsigned char)(c)) || c == CP437_NO_BREAK_SPACE)
#define IS_CONTROL(c) iscntrl((unsigned char)(c))
#define IS_ALPHA(c) isalpha((unsigned char)(c))
#define IS_ALPHANUMERIC(c) isalnum((unsigned char)(c))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment