diff --git a/golded3/geprot.h b/golded3/geprot.h index 9e0d901..c4e6f70 100644 --- a/golded3/geprot.h +++ b/golded3/geprot.h @@ -494,33 +494,6 @@ void build_pseudo(GMsg* msg, bool direction = true); void update_addressbook(GMsg* msg, bool reverse = false, bool force = false); void edit_addressbook(GMsg* msg); - -// ------------------------------------------------------------------ -// SOFTCR management - -// Detects SoftCR only if DispsoftCR is ON -inline bool issoftcr(char c) -{ - return not WideDispsoftcr and (c == SOFTCR); -} - -// Skip spaces and SoftCRs (if DispsoftCR is ON) -inline char *spanspaces(const char *str) -{ - while ( (isspace(*str) and (*str != CR)) or issoftcr(*str) ) - str++; - return (char *)str; -} - -// Skip LineFeeds and SoftCRs (if DispsoftCR is ON) -inline char *spanfeeds(const char *str) -{ - while ( (*str == LF) or issoftcr(*str) ) - str++; - return (char *)str; -} - - // ------------------------------------------------------------------ bool isuucp(const char *name); diff --git a/goldlib/gmb3/gmoarea.h b/goldlib/gmb3/gmoarea.h index 6460481..40fbd2e 100644 --- a/goldlib/gmb3/gmoarea.h +++ b/goldlib/gmb3/gmoarea.h @@ -271,15 +271,37 @@ extern uint WideSharemode; extern bool WideDispsoftcr; // DispsoftCR for current area extern int WidePersonalmail; - // ------------------------------------------------------------------ bool PopupLocked(long __tries, int __isopen, const char* __file); const char* Unpack(const char* archive); void CleanUnpacked(const char* unpacked); - // ------------------------------------------------------------------ +// SOFTCR management + +// Detects SoftCR only if DispsoftCR is ON +inline bool issoftcr(char c) +{ + return not WideDispsoftcr and (c == SOFTCR); +} + +// Skip spaces and SoftCRs (if DispsoftCR is ON) +inline char *spanspaces(const char *str) +{ + while ( (isspace(*str) and (*str != CR)) or issoftcr(*str) ) + str++; + return (char *)str; +} + +// Skip LineFeeds and SoftCRs (if DispsoftCR is ON) +inline char *spanfeeds(const char *str) +{ + while ( (*str == LF) or issoftcr(*str) ) + str++; + return (char *)str; +} + #endif