Move issoftcr(), spanspaces() and spanfeeds() into goldlib
This commit is contained in:
parent
0180aaf0dd
commit
6aa5bd173f
@ -494,33 +494,6 @@ void build_pseudo(GMsg* msg, bool direction = true);
|
|||||||
void update_addressbook(GMsg* msg, bool reverse = false, bool force = false);
|
void update_addressbook(GMsg* msg, bool reverse = false, bool force = false);
|
||||||
void edit_addressbook(GMsg* msg);
|
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);
|
bool isuucp(const char *name);
|
||||||
|
@ -271,15 +271,37 @@ extern uint WideSharemode;
|
|||||||
extern bool WideDispsoftcr; // DispsoftCR for current area
|
extern bool WideDispsoftcr; // DispsoftCR for current area
|
||||||
extern int WidePersonalmail;
|
extern int WidePersonalmail;
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
bool PopupLocked(long __tries, int __isopen, const char* __file);
|
bool PopupLocked(long __tries, int __isopen, const char* __file);
|
||||||
const char* Unpack(const char* archive);
|
const char* Unpack(const char* archive);
|
||||||
void CleanUnpacked(const char* unpacked);
|
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
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user