Apply changes to MS Visual C build. Patch from Ianos Gnatiuc 2:469/335.155
This commit is contained in:
parent
12c860a28c
commit
4a77b5a598
@ -783,7 +783,15 @@ int ReadCfg(const char* cfgfile, int ignoreunknown) {
|
|||||||
|
|
||||||
// Tell the world what we found
|
// Tell the world what we found
|
||||||
if(veryverbose)
|
if(veryverbose)
|
||||||
|
{
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
char buff[256];
|
||||||
|
sprintf(buff, " %c %04d: %s %s\n", cfgignore ? '-' : '+', line, key, val);
|
||||||
|
std::cout << buff;
|
||||||
|
#else
|
||||||
std::cout << " " << (cfgignore ? '-' : '+') << std::setw(4) << std::setfill('0') << line << std::setfill(' ') << ": " << key << " " << val << std::endl;
|
std::cout << " " << (cfgignore ? '-' : '+') << std::setw(4) << std::setfill('0') << line << std::setfill(' ') << ": " << key << " " << val << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Call switch function to act on the key
|
// Call switch function to act on the key
|
||||||
if(not cfgignore) {
|
if(not cfgignore) {
|
||||||
|
@ -964,7 +964,8 @@ static void SetKeybDefaults() {
|
|||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
bool CmdKeyCmp(CmdKey a, CmdKey b) {
|
//bool CmdKeyCmp(CmdKey a, CmdKey b) {
|
||||||
|
bool operator<(CmdKey &a, CmdKey &b) {
|
||||||
|
|
||||||
int cmp = CmpV(a.type, b.type);
|
int cmp = CmpV(a.type, b.type);
|
||||||
if(cmp != 0)
|
if(cmp != 0)
|
||||||
@ -1126,7 +1127,8 @@ int ReadKeysCfg(int force) {
|
|||||||
SetKeybDefaults();
|
SetKeybDefaults();
|
||||||
|
|
||||||
// Prepare keyboard and macro tables for binary searching
|
// Prepare keyboard and macro tables for binary searching
|
||||||
CFG->cmdkey.sort(CmdKeyCmp);
|
// CFG->cmdkey.sort(CmdKeyCmp);
|
||||||
|
CFG->cmdkey.sort();
|
||||||
|
|
||||||
// Count keys
|
// Count keys
|
||||||
std::list<CmdKey>::iterator ck = CFG->cmdkey.begin();
|
std::list<CmdKey>::iterator ck = CFG->cmdkey.begin();
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
// Arealist functions.
|
// Arealist functions.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
|
|
||||||
@ -471,7 +474,11 @@ void SelMaskPick::close() {
|
|||||||
|
|
||||||
void SelMaskPick::print_line(uint idx, uint pos, bool isbar) {
|
void SelMaskPick::print_line(uint idx, uint pos, bool isbar) {
|
||||||
|
|
||||||
|
#if defined(__WIN32__)
|
||||||
|
char *buf = (char*)alloca(DESC_LEN+3);
|
||||||
|
#else
|
||||||
__extension__ char buf[DESC_LEN+3];
|
__extension__ char buf[DESC_LEN+3];
|
||||||
|
#endif
|
||||||
|
|
||||||
*buf = ' '; strxcpy(buf+1, AL.alistselections[idx], DESC_LEN);
|
*buf = ' '; strxcpy(buf+1, AL.alistselections[idx], DESC_LEN);
|
||||||
window.printns(pos, 0, isbar ? sattr : wattr, buf, xlen);
|
window.printns(pos, 0, isbar ? sattr : wattr, buf, xlen);
|
||||||
|
@ -419,8 +419,8 @@ void GPickArealist::print_line(uint idx, uint pos, bool isbar) {
|
|||||||
|
|
||||||
int sep_pos = (desc_pos != -1) ? desc_pos : echoid_pos;
|
int sep_pos = (desc_pos != -1) ? desc_pos : echoid_pos;
|
||||||
|
|
||||||
for(int c = 0; c < sep_pos; c++)
|
{for(int c = 0; c < sep_pos; c++)
|
||||||
vbuf[c] = _box_table(btype, 1);
|
vbuf[c] = _box_table(btype, 1);}
|
||||||
vbuf[sep_pos] = NUL;
|
vbuf[sep_pos] = NUL;
|
||||||
wprintvs(pos, 0, battr|ACSET, vbuf);
|
wprintvs(pos, 0, battr|ACSET, vbuf);
|
||||||
wprints(pos, sep_pos, tattr, area->desc());
|
wprints(pos, sep_pos, tattr, area->desc());
|
||||||
@ -428,8 +428,8 @@ void GPickArealist::print_line(uint idx, uint pos, bool isbar) {
|
|||||||
int l = strlen(area->desc());
|
int l = strlen(area->desc());
|
||||||
int n = MAXCOL-2-sep_pos-l;
|
int n = MAXCOL-2-sep_pos-l;
|
||||||
|
|
||||||
for(int c = 0; c < n; c++)
|
{for(int c = 0; c < n; c++)
|
||||||
vbuf[c] = _box_table(btype,1);
|
vbuf[c] = _box_table(btype,1);}
|
||||||
vbuf[n] = NUL;
|
vbuf[n] = NUL;
|
||||||
wprintvs(pos, sep_pos+l, battr|ACSET, vbuf);
|
wprintvs(pos, sep_pos+l, battr|ACSET, vbuf);
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) {
|
|||||||
|
|
||||||
lp = s + strlen(s);
|
lp = s + strlen(s);
|
||||||
|
|
||||||
while((lp>s) and in_range(lp[-1], ' ', '\x7F'))
|
while((lp>s) and in_range(char(lp[-1]), char(' '), char('\x7F')))
|
||||||
lp--;
|
lp--;
|
||||||
|
|
||||||
for(const char* ptr = s; *ptr and (ptr<lp); ptr++) {
|
for(const char* ptr = s; *ptr and (ptr<lp); ptr++) {
|
||||||
|
@ -136,6 +136,7 @@ public:
|
|||||||
text_item(uint __col, uint __len) : col(__col), len(__len) { }
|
text_item(uint __col, uint __len) : col(__col), len(__len) { }
|
||||||
void* operator new(size_t size, uint text_len = 0) { return malloc(sizeof(text_item) + size + text_len); }
|
void* operator new(size_t size, uint text_len = 0) { return malloc(sizeof(text_item) + size + text_len); }
|
||||||
void operator delete(void* ptr) { free(ptr); }
|
void operator delete(void* ptr) { free(ptr); }
|
||||||
|
void operator delete(void* ptr, uint) { free(ptr); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------
|
// ----------------------------------------------------------------
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
// The Internal Editor (IE), part 2.
|
// The Internal Editor (IE), part 2.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <geedit.h>
|
#include <geedit.h>
|
||||||
#include <gutlcode.h>
|
#include <gutlcode.h>
|
||||||
@ -1086,7 +1090,11 @@ void IEclass::editimport(Line* __line, char* __filename, bool imptxt) {
|
|||||||
else {
|
else {
|
||||||
|
|
||||||
int tabsz = CFG->disptabsize ? CFG->disptabsize : 1;
|
int tabsz = CFG->disptabsize ? CFG->disptabsize : 1;
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
char *spaces = (char*)alloca(tabsz+1);
|
||||||
|
#else
|
||||||
__extension__ char spaces[tabsz+1];
|
__extension__ char spaces[tabsz+1];
|
||||||
|
#endif
|
||||||
memset(spaces, ' ', tabsz);
|
memset(spaces, ' ', tabsz);
|
||||||
spaces[tabsz] = NUL;
|
spaces[tabsz] = NUL;
|
||||||
int level = LoadCharset(AA->Xlatimport(), CFG->xlatlocalset);
|
int level = LoadCharset(AA->Xlatimport(), CFG->xlatlocalset);
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
// OS/2 clipboard to/from edit paste buffer.
|
// OS/2 clipboard to/from edit paste buffer.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <geedit.h>
|
#include <geedit.h>
|
||||||
#include <gutlclip.h>
|
#include <gutlclip.h>
|
||||||
@ -36,7 +40,11 @@ void IEclass::Clip2Buf() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
int tabsz = CFG->disptabsize ? CFG->disptabsize : 1;
|
int tabsz = CFG->disptabsize ? CFG->disptabsize : 1;
|
||||||
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
char *spaces = (char*)alloca(tabsz+1);
|
||||||
|
#else
|
||||||
__extension__ char spaces[tabsz+1];
|
__extension__ char spaces[tabsz+1];
|
||||||
|
#endif
|
||||||
memset(spaces, ' ', tabsz);
|
memset(spaces, ' ', tabsz);
|
||||||
spaces[tabsz] = NUL;
|
spaces[tabsz] = NUL;
|
||||||
|
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
// File handling.
|
// File handling.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <gwildmat.h>
|
#include <gwildmat.h>
|
||||||
@ -773,7 +777,11 @@ void FileRequest(GMsg* msg) {
|
|||||||
else
|
else
|
||||||
ptr1 = ptr2;
|
ptr1 = ptr2;
|
||||||
ptr2 = strskip_txt(ptr1);
|
ptr2 = strskip_txt(ptr1);
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
char *tmpbuf = (char*)alloca(ptr2-ptr1+1);
|
||||||
|
#else
|
||||||
__extension__ char tmpbuf[ptr2-ptr1+1];
|
__extension__ char tmpbuf[ptr2-ptr1+1];
|
||||||
|
#endif
|
||||||
strxcpy(tmpbuf, ptr1, ptr2-ptr1+1);
|
strxcpy(tmpbuf, ptr1, ptr2-ptr1+1);
|
||||||
frqgetfile(file, desc, filesize, tmpbuf);
|
frqgetfile(file, desc, filesize, tmpbuf);
|
||||||
*desc = NUL; // Description never comes before filename
|
*desc = NUL; // Description never comes before filename
|
||||||
@ -811,7 +819,11 @@ void FileRequest(GMsg* msg) {
|
|||||||
if(txtptr[16] == '/' and txtptr[19] == '/' and txtptr[24] == '(' /*)*/) {
|
if(txtptr[16] == '/' and txtptr[19] == '/' and txtptr[24] == '(' /*)*/) {
|
||||||
ptr1 = strskip_wht(txtptr);
|
ptr1 = strskip_wht(txtptr);
|
||||||
ptr2 = strskip_txt(ptr1);
|
ptr2 = strskip_txt(ptr1);
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
char *tmpbuf = (char*)alloca(ptr2-ptr1+1);
|
||||||
|
#else
|
||||||
__extension__ char tmpbuf[ptr2-ptr1+1];
|
__extension__ char tmpbuf[ptr2-ptr1+1];
|
||||||
|
#endif
|
||||||
strxcpy(tmpbuf, ptr1, ptr2-ptr1+1);
|
strxcpy(tmpbuf, ptr1, ptr2-ptr1+1);
|
||||||
frqgetfile(file, desc, filesize, tmpbuf);
|
frqgetfile(file, desc, filesize, tmpbuf);
|
||||||
*desc = NUL; // Description never comes before filename
|
*desc = NUL; // Description never comes before filename
|
||||||
@ -943,7 +955,11 @@ void FileRequest(GMsg* msg) {
|
|||||||
msg->attr.frq1();
|
msg->attr.frq1();
|
||||||
ptr = freqfile[n]+1; // 01234567890123456
|
ptr = freqfile[n]+1; // 01234567890123456
|
||||||
ptr2 = strskip_txt(ptr);
|
ptr2 = strskip_txt(ptr);
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
char *tmpbuf = (char*)alloca(ptr2-ptr+1);
|
||||||
|
#else
|
||||||
__extension__ char tmpbuf[ptr2-ptr+1];
|
__extension__ char tmpbuf[ptr2-ptr+1];
|
||||||
|
#endif
|
||||||
strxcpy(tmpbuf, ptr, ptr2-ptr+1);
|
strxcpy(tmpbuf, ptr, ptr2-ptr+1);
|
||||||
ptr2 = strskip_wht(ptr2);
|
ptr2 = strskip_wht(ptr2);
|
||||||
if((strlen(msg->re) + strlen(tmpbuf)) < sizeof(ISub)) { // We can only fill one subject line in this version...
|
if((strlen(msg->re) + strlen(tmpbuf)) < sizeof(ISub)) { // We can only fill one subject line in this version...
|
||||||
@ -962,7 +978,11 @@ void FileRequest(GMsg* msg) {
|
|||||||
msg->attr.frq1();
|
msg->attr.frq1();
|
||||||
ptr = freqfile[crsr]+1; // 01234567890123456
|
ptr = freqfile[crsr]+1; // 01234567890123456
|
||||||
ptr2 = strskip_txt(ptr);
|
ptr2 = strskip_txt(ptr);
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
char *tmpbuf = (char*)alloca(ptr2-ptr+1);
|
||||||
|
#else
|
||||||
__extension__ char tmpbuf[ptr2-ptr+1];
|
__extension__ char tmpbuf[ptr2-ptr+1];
|
||||||
|
#endif
|
||||||
strxcpy(tmpbuf, ptr, ptr2-ptr+1);
|
strxcpy(tmpbuf, ptr, ptr2-ptr+1);
|
||||||
ptr2 = strskip_wht(ptr2);
|
ptr2 = strskip_wht(ptr2);
|
||||||
if((strlen(msg->re) + strlen(tmpbuf)) < sizeof(ISub)) { // We can only fill one subject line in this version...
|
if((strlen(msg->re) + strlen(tmpbuf)) < sizeof(ISub)) { // We can only fill one subject line in this version...
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
// Header edit.
|
// Header edit.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <gwinput.h>
|
#include <gwinput.h>
|
||||||
|
|
||||||
@ -318,8 +322,14 @@ bool GMsgHeaderEdit::validate() {
|
|||||||
bool res = set_to_address(msg, &toname, &toaddr, &fromaddr, &subj, 0, LNG->SelectDestNode, lookup);
|
bool res = set_to_address(msg, &toname, &toaddr, &fromaddr, &subj, 0, LNG->SelectDestNode, lookup);
|
||||||
|
|
||||||
vcurshow();
|
vcurshow();
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
size_t bot2size = EDIT->HdrNodeLen()+1;
|
||||||
|
char *bot2 = (char*)alloca(bot2size);
|
||||||
|
MakeAttrStr(bot2, bot2size, &msg->attr);
|
||||||
|
#else
|
||||||
__extension__ char bot2[EDIT->HdrNodeLen()+1];
|
__extension__ char bot2[EDIT->HdrNodeLen()+1];
|
||||||
MakeAttrStr(bot2, sizeof(bot2), &msg->attr);
|
MakeAttrStr(bot2, sizeof(bot2), &msg->attr);
|
||||||
|
#endif
|
||||||
strsetsz(bot2, EDIT->HdrNodeLen());
|
strsetsz(bot2, EDIT->HdrNodeLen());
|
||||||
window.prints(1, EDIT->HdrNodePos(), C_HEADW, bot2);
|
window.prints(1, EDIT->HdrNodePos(), C_HEADW, bot2);
|
||||||
|
|
||||||
|
@ -702,8 +702,8 @@ void Initialize(int argc, char* argv[]) {
|
|||||||
|
|
||||||
// Read/compile various configs
|
// Read/compile various configs
|
||||||
compiled |= ReadLangCfg(cmdlineforce);
|
compiled |= ReadLangCfg(cmdlineforce);
|
||||||
compiled |= ReadKeysCfg(cmdlineforce);
|
compiled |= bool(ReadKeysCfg(cmdlineforce));
|
||||||
compiled |= ReadHelpCfg(cmdlineforce);
|
compiled |= bool(ReadHelpCfg(cmdlineforce));
|
||||||
|
|
||||||
// Initialize sound system
|
// Initialize sound system
|
||||||
InitSound();
|
InitSound();
|
||||||
|
@ -24,13 +24,16 @@
|
|||||||
// Conversion of a raw message to a linked list of lines.
|
// Conversion of a raw message to a linked list of lines.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <gstrmail.h>
|
#include <gstrmail.h>
|
||||||
#include <gutlcode.h>
|
#include <gutlcode.h>
|
||||||
#include <ghdrmime.h>
|
#include <ghdrmime.h>
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
@ -1388,7 +1391,11 @@ int ScanLine(GMsg* msg, Line* line, const char* ptr, int getvalue, int mask) {
|
|||||||
ptr++;
|
ptr++;
|
||||||
char endchar = *ptr;
|
char endchar = *ptr;
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
char *kludge = (char*)alloca(ptr-kludge1+1);
|
||||||
|
#else
|
||||||
__extension__ char kludge[ptr-kludge1+1];
|
__extension__ char kludge[ptr-kludge1+1];
|
||||||
|
#endif
|
||||||
strxcpy(kludge, kludge1, ptr-kludge1+1);
|
strxcpy(kludge, kludge1, ptr-kludge1+1);
|
||||||
|
|
||||||
// Search for it in the known kludges list
|
// Search for it in the known kludges list
|
||||||
|
@ -24,12 +24,15 @@
|
|||||||
// Message lister.
|
// Message lister.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <gcharset.h>
|
#include <gcharset.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
extern GMsg* reader_msg;
|
extern GMsg* reader_msg;
|
||||||
@ -839,7 +842,11 @@ void GThreadlist::print_line(uint idx, uint pos, bool isbar) {
|
|||||||
|
|
||||||
char buf[256];
|
char buf[256];
|
||||||
ulong maxlev = (window.width()+h_offset+1)/2;
|
ulong maxlev = (window.width()+h_offset+1)/2;
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
char *buf2 = (char*)alloca(maxlev*2+2);
|
||||||
|
#else
|
||||||
__extension__ char buf2[maxlev*2+2];
|
__extension__ char buf2[maxlev*2+2];
|
||||||
|
#endif
|
||||||
int attrh, attrw;
|
int attrh, attrw;
|
||||||
uint tdlen;
|
uint tdlen;
|
||||||
|
|
||||||
|
@ -24,11 +24,14 @@
|
|||||||
// Misc. msg handling.
|
// Misc. msg handling.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <gtimall.h>
|
#include <gtimall.h>
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
static bool tokenxchg(char*& dst, char* tok, const char* src, int len = 0, int cnt = 0, ...) {
|
static bool tokenxchg(char*& dst, char* tok, const char* src, int len = 0, int cnt = 0, ...) {
|
||||||
@ -450,7 +453,11 @@ void LoadText(GMsg* msg, const char* textfile) {
|
|||||||
buf = (char*)throw_malloc(PBUFSIZE);
|
buf = (char*)throw_malloc(PBUFSIZE);
|
||||||
|
|
||||||
int tabsz = CFG->disptabsize ? CFG->disptabsize : 1;
|
int tabsz = CFG->disptabsize ? CFG->disptabsize : 1;
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
char *spaces = (char*)alloca(tabsz+1);
|
||||||
|
#else
|
||||||
__extension__ char spaces[tabsz+1];
|
__extension__ char spaces[tabsz+1];
|
||||||
|
#endif
|
||||||
memset(spaces, ' ', tabsz);
|
memset(spaces, ' ', tabsz);
|
||||||
spaces[tabsz] = NUL;
|
spaces[tabsz] = NUL;
|
||||||
|
|
||||||
|
@ -24,10 +24,13 @@
|
|||||||
// Message viewer class implementation.
|
// Message viewer class implementation.
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <gutlos.h>
|
#include <gutlos.h>
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
GMsgHeaderView::GMsgHeaderView() {
|
GMsgHeaderView::GMsgHeaderView() {
|
||||||
@ -107,7 +110,11 @@ void GMsgHeaderView::Paint() {
|
|||||||
else
|
else
|
||||||
*buf1 = NUL;
|
*buf1 = NUL;
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
char *top = (char*)alloca(width+1);
|
||||||
|
#else
|
||||||
__extension__ char top[width+1];
|
__extension__ char top[width+1];
|
||||||
|
#endif
|
||||||
strxmerge(top, width+1, " ", buf1, strtrim(strtmp(area->desc())), " (",
|
strxmerge(top, width+1, " ", buf1, strtrim(strtmp(area->desc())), " (",
|
||||||
area->isinternet() ? area->Internetaddress() : area->Aka().addr.make_string(buf),
|
area->isinternet() ? area->Internetaddress() : area->Aka().addr.make_string(buf),
|
||||||
") ", NULL);
|
") ", NULL);
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
#define __GVER_PID__(A,SIZE) __GVER_PRE##SIZE##NAME__ __GVER_##SIZE##NAME__ __GVER_POST##SIZE##NAME__ __GVER_##SIZE##PLATFORM__
|
#define __GVER_LONGPID__ __GVER_PRENAME__ __GVER_NAME__ __GVER_POSTNAME__ __GVER_PLATFORM__
|
||||||
|
#define __GVER_SHORTPID__ __GVER_PRESHORTNAME__ __GVER_SHORTNAME__ __GVER_POSTSHORTNAME__ __GVER_SHORTPLATFORM__
|
||||||
#define __GVER_VER__(A,B,C) __GVER_PREVERSION__ #A "." #B "." #C __GVER_POSTVERSION__
|
#define __GVER_VER__(A,B,C) __GVER_PREVERSION__ #A "." #B "." #C __GVER_POSTVERSION__
|
||||||
#define __GVER_SVER__(A,B,C) #A "." #B "." #C
|
#define __GVER_SVER__(A,B,C) #A "." #B "." #C
|
||||||
|
|
||||||
@ -37,8 +38,8 @@
|
|||||||
int __gver_major__ = __GVER_MAJOR__; \
|
int __gver_major__ = __GVER_MAJOR__; \
|
||||||
int __gver_minor__ = __GVER_MINOR__; \
|
int __gver_minor__ = __GVER_MINOR__; \
|
||||||
int __gver_release__ = __GVER_RELEASE__; \
|
int __gver_release__ = __GVER_RELEASE__; \
|
||||||
const char* __gver_longpid__ = __GVER_PID__(,); \
|
const char* __gver_longpid__ = __GVER_LONGPID__; \
|
||||||
const char* __gver_shortpid__ = __GVER_PID__(,SHORT); \
|
const char* __gver_shortpid__ = __GVER_SHORTPID__; \
|
||||||
const char* __gver_ver__ = __GVER_VER__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__); \
|
const char* __gver_ver__ = __GVER_VER__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__); \
|
||||||
const char* __gver_shortver__ = __GVER_SVER__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__);
|
const char* __gver_shortver__ = __GVER_SVER__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__);
|
||||||
|
|
||||||
@ -97,7 +98,13 @@ const char* __gver_shortver__ = __GVER_SVER__(__GVER_MAJOR__,__GVER_MINOR__,__GV
|
|||||||
#define __GVER_SHORTLOGNAME__ "2"
|
#define __GVER_SHORTLOGNAME__ "2"
|
||||||
#define __GVER_CFGEXT__ ".geo"
|
#define __GVER_CFGEXT__ ".geo"
|
||||||
#elif defined(__WIN32__)
|
#elif defined(__WIN32__)
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#define __GVER_PLATFORM__ "/W32-MSVC"
|
||||||
|
#elif defined(__MINGW32__)
|
||||||
|
#define __GVER_PLATFORM__ "/W32-MINGW"
|
||||||
|
#else
|
||||||
#define __GVER_PLATFORM__ "/W32"
|
#define __GVER_PLATFORM__ "/W32"
|
||||||
|
#endif
|
||||||
#define __GVER_SHORTPLATFORM__ "W32"
|
#define __GVER_SHORTPLATFORM__ "W32"
|
||||||
#define __GVER_SHORTLOGNAME__ "W"
|
#define __GVER_SHORTLOGNAME__ "W"
|
||||||
#define __GVER_CFGEXT__ ".gew"
|
#define __GVER_CFGEXT__ ".gew"
|
||||||
@ -106,7 +113,7 @@ const char* __gver_shortver__ = __GVER_SVER__(__GVER_MAJOR__,__GVER_MINOR__,__GV
|
|||||||
#define __GVER_SHORTPLATFORM__ "LNX"
|
#define __GVER_SHORTPLATFORM__ "LNX"
|
||||||
#define __GVER_SHORTLOGNAME__ "L"
|
#define __GVER_SHORTLOGNAME__ "L"
|
||||||
#define __GVER_CFGEXT__ ".gel"
|
#define __GVER_CFGEXT__ ".gel"
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||||
#define __GVER_PLATFORM__ "/BSD"
|
#define __GVER_PLATFORM__ "/BSD"
|
||||||
#define __GVER_SHORTPLATFORM__ "BSD"
|
#define __GVER_SHORTPLATFORM__ "BSD"
|
||||||
#define __GVER_SHORTLOGNAME__ "B"
|
#define __GVER_SHORTLOGNAME__ "B"
|
||||||
|
@ -119,7 +119,4 @@
|
|||||||
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------- */
|
/* --------------------------------------------------------------- */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* --------------------------------------------------------------- */
|
|
||||||
|
@ -28,12 +28,28 @@
|
|||||||
#ifndef __goldall_h
|
#ifndef __goldall_h
|
||||||
#define __goldall_h
|
#define __goldall_h
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <gcmpall.h>
|
#include <gcmpall.h>
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// Disable some MS Visual C warnings
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
//
|
||||||
|
// C4786: 'identifier' : identifier was truncated to 'number'
|
||||||
|
// characters in the debug information
|
||||||
|
//
|
||||||
|
// C4800: 'type' : forcing value to bool 'true' or 'false'
|
||||||
|
// (performance warning)
|
||||||
|
//
|
||||||
|
// C4065: switch statement contains 'default' but no 'case' labels
|
||||||
|
//
|
||||||
|
// C4200: nonstandard extension used : zero-sized array in struct/union
|
||||||
|
//
|
||||||
|
#pragma warning(disable: 4200 4786 4800 4065)
|
||||||
|
#endif
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// Define portability and shorthand notation
|
// Define portability and shorthand notation
|
||||||
|
@ -46,6 +46,10 @@ char ge_win_coldtitle[GMAXTITLE+1] = "";
|
|||||||
char ge_win_title[GMAXTITLE+1] = "";
|
char ge_win_title[GMAXTITLE+1] = "";
|
||||||
int ge_win_ext_title;
|
int ge_win_ext_title;
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
char tu[256] = {
|
char tu[256] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||||
@ -115,6 +119,9 @@ char tl[256] = {
|
|||||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
|
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
|
||||||
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||||
};
|
};
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
WCHAR oem2unicode[256];
|
WCHAR oem2unicode[256];
|
||||||
|
|
||||||
|
@ -31,7 +31,9 @@
|
|||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning(disable: 4200)
|
||||||
|
#endif
|
||||||
#include <gdefs.h>
|
#include <gdefs.h>
|
||||||
#if defined(__USE_NCURSES__)
|
#if defined(__USE_NCURSES__)
|
||||||
#include <gcurses.h>
|
#include <gcurses.h>
|
||||||
|
@ -297,8 +297,12 @@ void gareafile::ReadFMail(char* tag) {
|
|||||||
ReadFMail098(fp, path, file, options);
|
ReadFMail098(fp, path, file, options);
|
||||||
else if((ar_rev >= 0x0110) and (ar_rev < 0x0200))
|
else if((ar_rev >= 0x0110) and (ar_rev < 0x0200))
|
||||||
ReadFMail116(fp, path, file, options);
|
ReadFMail116(fp, path, file, options);
|
||||||
else
|
else {
|
||||||
std::cout << "* Error: Unknown FMail config revision " << std::setfill('0') << std::setw(4) << std::hex << ar_rev << "h - Skipping." << std::endl;
|
char buff[56+sizeof(uint)*2];
|
||||||
|
sprintf(buff, "* Error: Unknown FMail config revision %04Xh - Skipping.\n", ar_rev);
|
||||||
|
std::cout << buff;
|
||||||
|
// std::cout << "* Error: Unknown FMail config revision " << std::setfill('0') << std::setw(4) << std::hex << ar_rev << "h - Skipping." << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,11 @@ void gareafile::ReadIMail(char* tag) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << "* Error: IMAIL " << imver[0] << '.' << std::setfill('0') << std::setw(2) << imver[1] << " (structure revision " << imstructver[0] << '.' << std::setfill('0') << std::setw(2) << imstructver[1] << ") is not supported - Skipping." << std::endl;
|
char buff[78];
|
||||||
|
sprintf(buff, "* Error: IMAIL %c.%02c (structure revision %c.%02c) is not supported - Skipping.\n", imver[0], imver[1], imstructver[0], imstructver[1]);
|
||||||
|
std::cout << buff;
|
||||||
|
|
||||||
|
// std::cout << "* Error: IMAIL " << imver[0] << '.' << std::setfill('0') << std::setw(2) << imver[1] << " (structure revision " << imstructver[0] << '.' << std::setfill('0') << std::setw(2) << imstructver[1] << ") is not supported - Skipping." << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +216,9 @@ void gareafile::ReadInterMail(char* tag) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::cout << "* Error: InterMail revision " << std::setfill('0') << std::setw(4) << std::hex << ctl->sysrev << "h is not supported - Skipping." << std::endl;
|
char buff[62+sizeof(ctl->sysrev)*2];
|
||||||
|
sprintf(buff, "* Error: InterMail revision %04Xh is not supported - Skipping.\n", ctl->sysrev);
|
||||||
|
std::cout << buff;
|
||||||
}
|
}
|
||||||
throw_free(ctl);
|
throw_free(ctl);
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,11 @@
|
|||||||
#include <dos.h>
|
#include <dos.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#include <direct.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "hsksupp.h"
|
#include "hsksupp.h"
|
||||||
#include "ffind.h"
|
#include "ffind.h"
|
||||||
|
|
||||||
|
@ -46,6 +46,17 @@
|
|||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# define sleep(x) Sleep(1000L*(x))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
# ifndef S_ISDIR
|
||||||
|
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||||
|
# endif
|
||||||
|
# ifndef S_ISREG
|
||||||
|
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||||
|
# endif
|
||||||
|
|
||||||
/* fexists.c */
|
/* fexists.c */
|
||||||
int fexist(const char *filename);
|
int fexist(const char *filename);
|
||||||
long fsize(const char *filename);
|
long fsize(const char *filename);
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
#ifndef __filewrap_h
|
#ifndef __filewrap_h
|
||||||
#define __filewrap_h
|
#define __filewrap_h
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#include <io.h>
|
||||||
|
#else
|
||||||
#include <gfilutil.h>
|
#include <gfilutil.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define sopen(fn,access,share) (sopen)((fn),(access),(share),S_IREAD|S_IWRITE)
|
#define sopen(fn,access,share) (sopen)((fn),(access),(share),S_IREAD|S_IWRITE)
|
||||||
|
|
||||||
|
@ -1,12 +1,28 @@
|
|||||||
#ifndef __genwrap_h
|
#ifndef __genwrap_h
|
||||||
#define __genwrap_h
|
#define __genwrap_h
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#include <windows.h>
|
||||||
|
#include <share.h>
|
||||||
|
#include <io.h>
|
||||||
|
#else
|
||||||
#include <gtimall.h>
|
#include <gtimall.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __BEOS__
|
#ifndef __BEOS__
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#define SLEEP(a) Sleep(a)
|
||||||
|
#else
|
||||||
#define SLEEP(a) usleep(a)
|
#define SLEEP(a) usleep(a)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#define SLEEP(a) snooze(a)
|
#define SLEEP(a) snooze(a)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
int lock(int handle, long offset, long length);
|
||||||
|
int unlock(int handle, long offset, long length);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // __genwrap_h
|
#endif // __genwrap_h
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
/* config.h. Generated automatically by configure. */
|
/* config.h. Generated automatically by configure. */
|
||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* if not defined by make */
|
||||||
|
#if !defined(VERSION)
|
||||||
|
#define VERSION "0.5"
|
||||||
|
#endif
|
||||||
|
#if !defined(PATCH)
|
||||||
|
#define PATCH "15"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||||
/* #undef size_t */
|
/* #undef size_t */
|
||||||
|
|
||||||
@ -8,7 +16,9 @@
|
|||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
|
|
||||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#ifndef _MSC_VER
|
||||||
#define TIME_WITH_SYS_TIME 1
|
#define TIME_WITH_SYS_TIME 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If your system is kinda special
|
* If your system is kinda special
|
||||||
@ -69,7 +79,9 @@
|
|||||||
/* #undef HAVE_STDARG_H */
|
/* #undef HAVE_STDARG_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/time.h> header file. */
|
/* Define if you have the <sys/time.h> header file. */
|
||||||
|
#ifndef _MSC_VER
|
||||||
#define HAVE_SYS_TIME_H 1
|
#define HAVE_SYS_TIME_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
/* Define if you have the <unistd.h> header file. */
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
Reference in New Issue
Block a user