Commits (2)
...@@ -346,9 +346,11 @@ bool sbbs_t::editfileinfo(file_t* f) ...@@ -346,9 +346,11 @@ bool sbbs_t::editfileinfo(file_t* f)
char uploader[LEN_ALIAS + 1]; char uploader[LEN_ALIAS + 1];
SAFECOPY(uploader, f->from); SAFECOPY(uploader, f->from);
bputs(text[EditUploader]); bputs(text[EditUploader]);
if(!getstr(uploader, sizeof(uploader), K_EDIT|K_AUTODEL)) getstr(uploader, sizeof(uploader), K_EDIT|K_AUTODEL);
if(msgabort(true))
return false; return false;
smb_new_hfield_str(f, SMB_FILEUPLOADER, uploader); if(*uploader != '\0' || *f->from != '\0')
smb_new_hfield_str(f, SMB_FILEUPLOADER, uploader);
ultoa(f->cost,str,10); ultoa(f->cost,str,10);
bputs(text[EditCreditValue]); bputs(text[EditCreditValue]);
getstr(str,10,K_NUMBER|K_EDIT|K_AUTODEL); getstr(str,10,K_NUMBER|K_EDIT|K_AUTODEL);
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#ifndef _GEN_DEFS_H #ifndef _GEN_DEFS_H
#define _GEN_DEFS_H #define _GEN_DEFS_H
#include "cp437defs.h"
#include <errno.h> #include <errno.h>
/* Resolve multi-named errno constants */ /* Resolve multi-named errno constants */
...@@ -451,7 +452,7 @@ typedef struct { ...@@ -451,7 +452,7 @@ typedef struct {
/* ASCIIZ char* parsing helper macros */ /* ASCIIZ char* parsing helper macros */
/* These (unsigned char) typecasts defeat MSVC debug assertion when passed a negative value */ /* 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_CONTROL(c) iscntrl((unsigned char)(c))
#define IS_ALPHA(c) isalpha((unsigned char)(c)) #define IS_ALPHA(c) isalpha((unsigned char)(c))
#define IS_ALPHANUMERIC(c) isalnum((unsigned char)(c)) #define IS_ALPHANUMERIC(c) isalnum((unsigned char)(c))
......