strncasecmp(3)

doc_update_sequoia
vb 8 years ago
parent c812b4b989
commit 3bb5d2377a

@ -1,4 +1,4 @@
#ifndef WIN32 // UNIX
#ifndef WIN32 // POSIX
#define _POSIX_C_SOURCE 200809L
#else
#include "platform_windows.h"

@ -2,6 +2,13 @@
#include "keymanagement.h"
#include "mime.h"
#ifndef WIN32 // POSIX
#define _POSIX_C_SOURCE 200809L
#include <strings.h>
#else
#include "platform_windows.h"
#endif
#include <assert.h>
#include <string.h>
#include <stdlib.h>
@ -22,7 +29,7 @@ static char * combine_short_and_long(const char *shortmsg, const char *longmsg)
if (ptext == NULL)
return NULL;
strcpy(ptext, "subject: ");
strcpy(ptext, "Subject: ");
strcat(ptext, shortmsg);
strcat(ptext, "\n\n");
strcat(ptext, longmsg);
@ -42,7 +49,7 @@ static int seperate_short_and_long(const char *src, char **shortmsg, char **long
*shortmsg = NULL;
*longmsg = NULL;
if (strncmp(src, "subject: ", 9) == 0) {
if (strncasecmp(src, "subject: ", 9) == 0) {
char *line_end = strchr(src, '\n');
if (line_end == NULL) {
@ -425,12 +432,8 @@ DYNAMIC_API PEP_STATUS decrypt_message(
switch (enc_format) {
case PEP_enc_none:
if (src->enc_format == PEP_enc_PEP) {
// TODO: implement
NOT_IMPLEMENTED
}
break;
// TODO: implement
NOT_IMPLEMENTED
case PEP_enc_none_MIME:
if (src->enc_format == PEP_enc_PEP) {

@ -22,7 +22,9 @@ void *dlsym(void *handle, const char *symbol);
#ifndef strtok_r
#define strtok_r(A, B, C) strtok_s((A), (B), (C))
#endif
#ifndef strncasecmp
#define strncasecmp(A, B, C) _strnicmp((A), (B), (C))
#endif
char *strndup(const char *s1, size_t n);
const char *windoze_local_db(void);

Loading…
Cancel
Save