mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-30 03:26:23 -04:00
parent
5e145576b0
commit
1424002087
@ -674,14 +674,12 @@ static struct mime_handler *
|
|||||||
get_mime_handler_mailcap(unsigned char *type, struct terminal *term)
|
get_mime_handler_mailcap(unsigned char *type, struct terminal *term)
|
||||||
{
|
{
|
||||||
struct mime_handler *handler = NULL;
|
struct mime_handler *handler = NULL;
|
||||||
#if defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H) && defined(HAVE_SYS_SHM_H)
|
|
||||||
unsigned char *desc, *data;
|
unsigned char *desc, *data;
|
||||||
int block, len;
|
int block, len;
|
||||||
#endif
|
|
||||||
if (!term || term->master || slave_sem == -1)
|
if (!term || term->master || slave_sem == -1)
|
||||||
return get_mime_handler_mailcap_common(type);
|
return get_mime_handler_mailcap_common(type);
|
||||||
|
|
||||||
#if defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H) && defined(HAVE_SYS_SHM_H)
|
|
||||||
len = strlen(type) + 1;
|
len = strlen(type) + 1;
|
||||||
data = fmem_alloc(2 + len);
|
data = fmem_alloc(2 + len);
|
||||||
if (!data)
|
if (!data)
|
||||||
@ -691,7 +689,7 @@ get_mime_handler_mailcap(unsigned char *type, struct terminal *term)
|
|||||||
memcpy(data + 2, type, len);
|
memcpy(data + 2, type, len);
|
||||||
hard_write(term->fdout, data, len + 2);
|
hard_write(term->fdout, data, len + 2);
|
||||||
fmem_free(data);
|
fmem_free(data);
|
||||||
|
#if defined(HAVE_SYS_IPC_H) && defined(HAVE_SYS_SEM_H) && defined(HAVE_SYS_SHM_H)
|
||||||
if (!shared_mem)
|
if (!shared_mem)
|
||||||
return NULL;
|
return NULL;
|
||||||
shared_mem[0] = '\0'; /* For unexpected death of slave. */
|
shared_mem[0] = '\0'; /* For unexpected death of slave. */
|
||||||
|
Loading…
Reference in New Issue
Block a user