Moved a lot of string funcs to string_calls module

This commit is contained in:
matt335672 2020-12-21 12:36:00 +00:00
parent 5523847540
commit 0a1a8f40e5
44 changed files with 597 additions and 551 deletions

View File

@ -22,7 +22,7 @@
#include <config_ac.h>
#endif
#include "os_calls.h"
#include "string_calls.h"
#include <openssl/bio.h>
#include <openssl/evp.h>

View File

@ -24,6 +24,7 @@
#include "arch.h"
#include "os_calls.h"
#include "string_calls.h"
#include "list.h"
#include "file.h"
#include "parse.h"

View File

@ -24,6 +24,7 @@
#include "arch.h"
#include "os_calls.h"
#include "string_calls.h"
#include "list.h"
/*****************************************************************************/

View File

@ -76,7 +76,7 @@
#endif
#include "os_calls.h"
#include "arch.h"
#include "string_calls.h"
#include "log.h"
/* for clearenv() */
@ -2509,518 +2509,6 @@ g_file_get_size(const char *filename)
#endif
}
/*****************************************************************************/
/* returns length of text */
int
g_strlen(const char *text)
{
if (text == NULL)
{
return 0;
}
return strlen(text);
}
/*****************************************************************************/
/* locates char in text */
const char *
g_strchr(const char* text, int c)
{
if (text == NULL)
{
return 0;
}
return strchr(text,c);
}
/*****************************************************************************/
/* returns dest */
char *
g_strcpy(char *dest, const char *src)
{
if (src == 0 && dest != 0)
{
dest[0] = 0;
return dest;
}
if (dest == 0 || src == 0)
{
return 0;
}
return strcpy(dest, src);
}
/*****************************************************************************/
/* returns dest */
char *
g_strncpy(char *dest, const char *src, int len)
{
char *rv;
if (src == 0 && dest != 0)
{
dest[0] = 0;
return dest;
}
if (dest == 0 || src == 0)
{
return 0;
}
rv = strncpy(dest, src, len);
dest[len] = 0;
return rv;
}
/*****************************************************************************/
/* returns dest */
char *
g_strcat(char *dest, const char *src)
{
if (dest == 0 || src == 0)
{
return dest;
}
return strcat(dest, src);
}
/*****************************************************************************/
/* returns dest */
char *
g_strncat(char *dest, const char *src, int len)
{
if (dest == 0 || src == 0)
{
return dest;
}
return strncat(dest, src, len);
}
/*****************************************************************************/
/* if in = 0, return 0 else return newly alloced copy of in */
char *
g_strdup(const char *in)
{
int len;
char *p;
if (in == 0)
{
return 0;
}
len = g_strlen(in);
p = (char *)g_malloc(len + 1, 0);
if (p != NULL)
{
g_strcpy(p, in);
}
return p;
}
/*****************************************************************************/
/* if in = 0, return 0 else return newly alloced copy of input string
* if the input string is larger than maxlen the returned string will be
* truncated. All strings returned will include null termination*/
char *
g_strndup(const char *in, const unsigned int maxlen)
{
unsigned int len;
char *p;
if (in == 0)
{
return 0;
}
len = g_strlen(in);
if (len > maxlen)
{
len = maxlen - 1;
}
p = (char *)g_malloc(len + 2, 0);
if (p != NULL)
{
g_strncpy(p, in, len + 1);
}
return p;
}
/*****************************************************************************/
int
g_strcmp(const char *c1, const char *c2)
{
return strcmp(c1, c2);
}
/*****************************************************************************/
int
g_strncmp(const char *c1, const char *c2, int len)
{
return strncmp(c1, c2, len);
}
/*****************************************************************************/
/* compare up to delim */
int
g_strncmp_d(const char *s1, const char *s2, const char delim, int n)
{
char c1;
char c2;
c1 = 0;
c2 = 0;
while (n > 0)
{
c1 = *(s1++);
c2 = *(s2++);
if ((c1 == 0) || (c1 != c2) || (c1 == delim) || (c2 == delim))
{
return c1 - c2;
}
n--;
}
return c1 - c2;
}
/*****************************************************************************/
int
g_strcasecmp(const char *c1, const char *c2)
{
#if defined(_WIN32)
return stricmp(c1, c2);
#else
return strcasecmp(c1, c2);
#endif
}
/*****************************************************************************/
int
g_strncasecmp(const char *c1, const char *c2, int len)
{
#if defined(_WIN32)
return strnicmp(c1, c2, len);
#else
return strncasecmp(c1, c2, len);
#endif
}
/*****************************************************************************/
int
g_atoi(const char *str)
{
if (str == 0)
{
return 0;
}
return atoi(str);
}
/*****************************************************************************/
int
g_htoi(char *str)
{
int len;
int index;
int rv;
int val;
int shift;
rv = 0;
len = strlen(str);
index = len - 1;
shift = 0;
while (index >= 0)
{
val = 0;
switch (str[index])
{
case '1':
val = 1;
break;
case '2':
val = 2;
break;
case '3':
val = 3;
break;
case '4':
val = 4;
break;
case '5':
val = 5;
break;
case '6':
val = 6;
break;
case '7':
val = 7;
break;
case '8':
val = 8;
break;
case '9':
val = 9;
break;
case 'a':
case 'A':
val = 10;
break;
case 'b':
case 'B':
val = 11;
break;
case 'c':
case 'C':
val = 12;
break;
case 'd':
case 'D':
val = 13;
break;
case 'e':
case 'E':
val = 14;
break;
case 'f':
case 'F':
val = 15;
break;
}
rv = rv | (val << shift);
index--;
shift += 4;
}
return rv;
}
/*****************************************************************************/
/* returns number of bytes copied into out_str */
int
g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str,
int bytes_out_str)
{
int rv;
int index;
char *lout_str;
const tui8 *lbytes;
rv = 0;
lbytes = (const tui8 *) bytes;
lout_str = out_str;
for (index = 0; index < num_bytes; index++)
{
if (bytes_out_str < 3)
{
break;
}
g_snprintf(lout_str, bytes_out_str, "%2.2x", lbytes[index]);
lout_str += 2;
bytes_out_str -= 2;
rv += 2;
}
return rv;
}
/*****************************************************************************/
int
g_pos(const char *str, const char *to_find)
{
const char *pp;
pp = strstr(str, to_find);
if (pp == 0)
{
return -1;
}
return (pp - str);
}
/*****************************************************************************/
int
g_mbstowcs(twchar *dest, const char *src, int n)
{
wchar_t *ldest;
int rv;
ldest = (wchar_t *)dest;
rv = mbstowcs(ldest, src, n);
return rv;
}
/*****************************************************************************/
int
g_wcstombs(char *dest, const twchar *src, int n)
{
const wchar_t *lsrc;
int rv;
lsrc = (const wchar_t *)src;
rv = wcstombs(dest, lsrc, n);
return rv;
}
/*****************************************************************************/
/* returns error */
/* trim spaces and tabs, anything <= space */
/* trim_flags 1 trim left, 2 trim right, 3 trim both, 4 trim through */
/* this will always shorten the string or not change it */
int
g_strtrim(char *str, int trim_flags)
{
int index;
int len;
int text1_index;
int got_char;
wchar_t *text;
wchar_t *text1;
len = mbstowcs(0, str, 0);
if (len < 1)
{
return 0;
}
if ((trim_flags < 1) || (trim_flags > 4))
{
return 1;
}
text = (wchar_t *)malloc(len * sizeof(wchar_t) + 8);
text1 = (wchar_t *)malloc(len * sizeof(wchar_t) + 8);
if (text == NULL || text1 == NULL)
{
free(text);
free(text1);
return 1;
}
text1_index = 0;
mbstowcs(text, str, len + 1);
switch (trim_flags)
{
case 4: /* trim through */
for (index = 0; index < len; index++)
{
if (text[index] > 32)
{
text1[text1_index] = text[index];
text1_index++;
}
}
text1[text1_index] = 0;
break;
case 3: /* trim both */
got_char = 0;
for (index = 0; index < len; index++)
{
if (got_char)
{
text1[text1_index] = text[index];
text1_index++;
}
else
{
if (text[index] > 32)
{
text1[text1_index] = text[index];
text1_index++;
got_char = 1;
}
}
}
text1[text1_index] = 0;
len = text1_index;
/* trim right */
for (index = len - 1; index >= 0; index--)
{
if (text1[index] > 32)
{
break;
}
}
text1_index = index + 1;
text1[text1_index] = 0;
break;
case 2: /* trim right */
/* copy it */
for (index = 0; index < len; index++)
{
text1[text1_index] = text[index];
text1_index++;
}
/* trim right */
for (index = len - 1; index >= 0; index--)
{
if (text1[index] > 32)
{
break;
}
}
text1_index = index + 1;
text1[text1_index] = 0;
break;
case 1: /* trim left */
got_char = 0;
for (index = 0; index < len; index++)
{
if (got_char)
{
text1[text1_index] = text[index];
text1_index++;
}
else
{
if (text[index] > 32)
{
text1[text1_index] = text[index];
text1_index++;
got_char = 1;
}
}
}
text1[text1_index] = 0;
break;
}
wcstombs(str, text1, text1_index + 1);
free(text);
free(text1);
return 0;
}
/*****************************************************************************/
long
g_load_library(char *in)

View File

@ -119,27 +119,6 @@ int g_create_path(const char* path);
int g_remove_dir(const char* dirname);
int g_file_delete(const char* filename);
int g_file_get_size(const char* filename);
int g_strlen(const char* text);
const char *g_strchr(const char *text, int c);
char* g_strcpy(char* dest, const char* src);
char* g_strncpy(char* dest, const char* src, int len);
char* g_strcat(char* dest, const char* src);
char* g_strncat(char* dest, const char* src, int len);
char* g_strdup(const char* in);
char* g_strndup(const char* in, const unsigned int maxlen);
int g_strcmp(const char* c1, const char* c2);
int g_strncmp(const char* c1, const char* c2, int len);
int g_strncmp_d(const char* c1, const char* c2, const char delim, int len);
int g_strcasecmp(const char* c1, const char* c2);
int g_strncasecmp(const char* c1, const char* c2, int len);
int g_atoi(const char* str);
int g_htoi(char* str);
int g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str,
int bytes_out_str);
int g_pos(const char* str, const char* to_find);
int g_mbstowcs(twchar* dest, const char* src, int n);
int g_wcstombs(char* dest, const twchar* src, int n);
int g_strtrim(char* str, int trim_flags);
long g_load_library(char* in);
int g_free_library(long lib);
void* g_get_proc_address(long lib, const char* name);

View File

@ -36,6 +36,7 @@
#include <openssl/crypto.h>
#include "os_calls.h"
#include "string_calls.h"
#include "arch.h"
#include "ssl_calls.h"
#include "trans.h"

View File

@ -18,16 +18,20 @@
* generic string handling calls
*/
#if defined(HAVE_CONFIG_H)
#include "config_ac.h"
#endif
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "string_calls.h"
#include "os_calls.h"
unsigned int
g_format_info_string(char* dest, unsigned int len,
const char* format,
const struct info_string_tag map[])
g_format_info_string(char *dest, unsigned int len,
const char *format,
const struct info_string_tag map[])
{
unsigned int result = 0;
const char *copy_from; /* Data to add to output */
@ -40,26 +44,26 @@ g_format_info_string(char* dest, unsigned int len,
{
if (*format == '%')
{
char ch= *(format + 1);
if (ch== '%')
char ch = *(format + 1);
if (ch == '%')
{
/* '%%' in format - replace with single '%' */
copy_from = format;
copy_len= 1;
copy_len = 1;
skip = 2;
}
else if (ch== '\0')
else if (ch == '\0')
{
/* Percent at end of string - ignore */
copy_from = NULL;
copy_len= 0;
copy_len = 0;
skip = 1;
}
else
{
/* Look up the character in the map, assuming failure */
copy_from = NULL;
copy_len= 0;
copy_len = 0;
skip = 2;
for (m = map ; m->ch != '\0' ; ++m)
@ -125,12 +129,525 @@ g_bool2text(int value)
int
g_text2bool(const char *s)
{
if ( (atoi(s) != 0) ||
(0 == strcasecmp(s, "true")) ||
(0 == strcasecmp(s, "on")) ||
(0 == strcasecmp(s, "yes")))
if ( (g_atoi(s) != 0) ||
(0 == g_strcasecmp(s, "true")) ||
(0 == g_strcasecmp(s, "on")) ||
(0 == g_strcasecmp(s, "yes")))
{
return 1;
}
return 0;
}
/*****************************************************************************/
/* returns length of text */
int
g_strlen(const char *text)
{
if (text == NULL)
{
return 0;
}
return strlen(text);
}
/*****************************************************************************/
/* locates char in text */
const char *
g_strchr(const char *text, int c)
{
if (text == NULL)
{
return 0;
}
return strchr(text, c);
}
/*****************************************************************************/
/* returns dest */
char *
g_strcpy(char *dest, const char *src)
{
if (src == 0 && dest != 0)
{
dest[0] = 0;
return dest;
}
if (dest == 0 || src == 0)
{
return 0;
}
return strcpy(dest, src);
}
/*****************************************************************************/
/* returns dest */
char *
g_strncpy(char *dest, const char *src, int len)
{
char *rv;
if (src == 0 && dest != 0)
{
dest[0] = 0;
return dest;
}
if (dest == 0 || src == 0)
{
return 0;
}
rv = strncpy(dest, src, len);
dest[len] = 0;
return rv;
}
/*****************************************************************************/
/* returns dest */
char *
g_strcat(char *dest, const char *src)
{
if (dest == 0 || src == 0)
{
return dest;
}
return strcat(dest, src);
}
/*****************************************************************************/
/* returns dest */
char *
g_strncat(char *dest, const char *src, int len)
{
if (dest == 0 || src == 0)
{
return dest;
}
return strncat(dest, src, len);
}
/*****************************************************************************/
/* if in = 0, return 0 else return newly alloced copy of in */
char *
g_strdup(const char *in)
{
int len;
char *p;
if (in == 0)
{
return 0;
}
len = g_strlen(in);
p = (char *)g_malloc(len + 1, 0);
if (p != NULL)
{
g_strcpy(p, in);
}
return p;
}
/*****************************************************************************/
/* if in = 0, return 0 else return newly alloced copy of input string
* if the input string is larger than maxlen the returned string will be
* truncated. All strings returned will include null termination*/
char *
g_strndup(const char *in, const unsigned int maxlen)
{
unsigned int len;
char *p;
if (in == 0)
{
return 0;
}
len = g_strlen(in);
if (len > maxlen)
{
len = maxlen - 1;
}
p = (char *)g_malloc(len + 2, 0);
if (p != NULL)
{
g_strncpy(p, in, len + 1);
}
return p;
}
/*****************************************************************************/
int
g_strcmp(const char *c1, const char *c2)
{
return strcmp(c1, c2);
}
/*****************************************************************************/
int
g_strncmp(const char *c1, const char *c2, int len)
{
return strncmp(c1, c2, len);
}
/*****************************************************************************/
/* compare up to delim */
int
g_strncmp_d(const char *s1, const char *s2, const char delim, int n)
{
char c1;
char c2;
c1 = 0;
c2 = 0;
while (n > 0)
{
c1 = *(s1++);
c2 = *(s2++);
if ((c1 == 0) || (c1 != c2) || (c1 == delim) || (c2 == delim))
{
return c1 - c2;
}
n--;
}
return c1 - c2;
}
/*****************************************************************************/
int
g_strcasecmp(const char *c1, const char *c2)
{
#if defined(_WIN32)
return stricmp(c1, c2);
#else
return strcasecmp(c1, c2);
#endif
}
/*****************************************************************************/
int
g_strncasecmp(const char *c1, const char *c2, int len)
{
#if defined(_WIN32)
return strnicmp(c1, c2, len);
#else
return strncasecmp(c1, c2, len);
#endif
}
/*****************************************************************************/
int
g_atoi(const char *str)
{
if (str == 0)
{
return 0;
}
return atoi(str);
}
/*****************************************************************************/
int
g_htoi(char *str)
{
int len;
int index;
int rv;
int val;
int shift;
rv = 0;
len = strlen(str);
index = len - 1;
shift = 0;
while (index >= 0)
{
val = 0;
switch (str[index])
{
case '1':
val = 1;
break;
case '2':
val = 2;
break;
case '3':
val = 3;
break;
case '4':
val = 4;
break;
case '5':
val = 5;
break;
case '6':
val = 6;
break;
case '7':
val = 7;
break;
case '8':
val = 8;
break;
case '9':
val = 9;
break;
case 'a':
case 'A':
val = 10;
break;
case 'b':
case 'B':
val = 11;
break;
case 'c':
case 'C':
val = 12;
break;
case 'd':
case 'D':
val = 13;
break;
case 'e':
case 'E':
val = 14;
break;
case 'f':
case 'F':
val = 15;
break;
}
rv = rv | (val << shift);
index--;
shift += 4;
}
return rv;
}
/*****************************************************************************/
/* returns number of bytes copied into out_str */
int
g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str,
int bytes_out_str)
{
int rv;
int index;
char *lout_str;
const tui8 *lbytes;
rv = 0;
lbytes = (const tui8 *) bytes;
lout_str = out_str;
for (index = 0; index < num_bytes; index++)
{
if (bytes_out_str < 3)
{
break;
}
g_snprintf(lout_str, bytes_out_str, "%2.2x", lbytes[index]);
lout_str += 2;
bytes_out_str -= 2;
rv += 2;
}
return rv;
}
/*****************************************************************************/
int
g_pos(const char *str, const char *to_find)
{
const char *pp;
pp = strstr(str, to_find);
if (pp == 0)
{
return -1;
}
return (pp - str);
}
/*****************************************************************************/
int
g_mbstowcs(twchar *dest, const char *src, int n)
{
wchar_t *ldest;
int rv;
ldest = (wchar_t *)dest;
rv = mbstowcs(ldest, src, n);
return rv;
}
/*****************************************************************************/
int
g_wcstombs(char *dest, const twchar *src, int n)
{
const wchar_t *lsrc;
int rv;
lsrc = (const wchar_t *)src;
rv = wcstombs(dest, lsrc, n);
return rv;
}
/*****************************************************************************/
/* returns error */
/* trim spaces and tabs, anything <= space */
/* trim_flags 1 trim left, 2 trim right, 3 trim both, 4 trim through */
/* this will always shorten the string or not change it */
int
g_strtrim(char *str, int trim_flags)
{
int index;
int len;
int text1_index;
int got_char;
wchar_t *text;
wchar_t *text1;
len = mbstowcs(0, str, 0);
if (len < 1)
{
return 0;
}
if ((trim_flags < 1) || (trim_flags > 4))
{
return 1;
}
text = (wchar_t *)malloc(len * sizeof(wchar_t) + 8);
text1 = (wchar_t *)malloc(len * sizeof(wchar_t) + 8);
if (text == NULL || text1 == NULL)
{
free(text);
free(text1);
return 1;
}
text1_index = 0;
mbstowcs(text, str, len + 1);
switch (trim_flags)
{
case 4: /* trim through */
for (index = 0; index < len; index++)
{
if (text[index] > 32)
{
text1[text1_index] = text[index];
text1_index++;
}
}
text1[text1_index] = 0;
break;
case 3: /* trim both */
got_char = 0;
for (index = 0; index < len; index++)
{
if (got_char)
{
text1[text1_index] = text[index];
text1_index++;
}
else
{
if (text[index] > 32)
{
text1[text1_index] = text[index];
text1_index++;
got_char = 1;
}
}
}
text1[text1_index] = 0;
len = text1_index;
/* trim right */
for (index = len - 1; index >= 0; index--)
{
if (text1[index] > 32)
{
break;
}
}
text1_index = index + 1;
text1[text1_index] = 0;
break;
case 2: /* trim right */
/* copy it */
for (index = 0; index < len; index++)
{
text1[text1_index] = text[index];
text1_index++;
}
/* trim right */
for (index = len - 1; index >= 0; index--)
{
if (text1[index] > 32)
{
break;
}
}
text1_index = index + 1;
text1[text1_index] = 0;
break;
case 1: /* trim left */
got_char = 0;
for (index = 0; index < len; index++)
{
if (got_char)
{
text1[text1_index] = text[index];
text1_index++;
}
else
{
if (text[index] > 32)
{
text1[text1_index] = text[index];
text1_index++;
got_char = 1;
}
}
}
text1[text1_index] = 0;
break;
}
wcstombs(str, text1, text1_index + 1);
free(text);
free(text1);
return 0;
}

View File

@ -21,6 +21,8 @@
#if !defined(STRING_CALLS_H)
#define STRING_CALLS_H
#include "arch.h"
/**
* Map a character to a string value
*
@ -55,9 +57,9 @@ struct info_string_tag
* the buffer length (as in snprintf())
*/
unsigned int
g_format_info_string(char* dest, unsigned int len,
const char* format,
const struct info_string_tag map[]);
g_format_info_string(char *dest, unsigned int len,
const char *format,
const struct info_string_tag map[]);
/**
@ -78,4 +80,25 @@ g_bool2text(int value);
int
g_text2bool(const char *s);
int g_strlen(const char *text);
const char *g_strchr(const char *text, int c);
char *g_strcpy(char *dest, const char *src);
char *g_strncpy(char *dest, const char *src, int len);
char *g_strcat(char *dest, const char *src);
char *g_strncat(char *dest, const char *src, int len);
char *g_strdup(const char *in);
char *g_strndup(const char *in, const unsigned int maxlen);
int g_strcmp(const char *c1, const char *c2);
int g_strncmp(const char *c1, const char *c2, int len);
int g_strncmp_d(const char *c1, const char *c2, const char delim, int len);
int g_strcasecmp(const char *c1, const char *c2);
int g_strncasecmp(const char *c1, const char *c2, int len);
int g_atoi(const char *str);
int g_htoi(char *str);
int g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str,
int bytes_out_str);
int g_pos(const char *str, const char *to_find);
int g_mbstowcs(twchar *dest, const char *src, int n);
int g_wcstombs(char *dest, const twchar *src, int n);
int g_strtrim(char *str, int trim_flags);
#endif

View File

@ -23,6 +23,7 @@
#endif
#include "os_calls.h"
#include "string_calls.h"
#include "trans.h"
#include "arch.h"
#include "parse.h"

View File

@ -30,6 +30,7 @@
#endif
#include "os_calls.h"
#include "string_calls.h"
#include "ssl_calls.h"
#include "arch.h"
#include "list.h"

View File

@ -23,6 +23,7 @@
#endif
#include "libxrdp.h"
#include "string_calls.h"
#include "xrdp_orders_rail.h"
#include "ms-rdpbcgr.h"

View File

@ -23,6 +23,7 @@
#endif
#include "libxrdp.h"
#include "string_calls.h"
/* todo, move these to constants.h */
//#define CHANNEL_CHUNK_LENGTH 1600 /* todo, why is this so small? */

View File

@ -23,6 +23,7 @@
#include "libxrdp.h"
#include "ms-rdpegdi.h"
#include "xrdp_rail.h"
#include "string_calls.h"
/* [MS-RDPERP]: Remote Desktop Protocol:
Remote Programs Virtual Channel Extension

View File

@ -25,6 +25,7 @@
#include "libxrdp.h"
#include "ms-rdpbcgr.h"
#include "log.h"
#include "string_calls.h"
#define LOG_LEVEL 1
#define LLOG(_level, _args) \

View File

@ -29,6 +29,7 @@
#endif
#include "sesman.h"
#include "string_calls.h"
extern struct config_sesman *g_cfg; /* in sesman.c */

View File

@ -23,6 +23,7 @@
#include "arch.h"
#include "os_calls.h"
#include "string_calls.h"
#include "thread_calls.h"
#include "trans.h"
#include "chansrv.h"

View File

@ -169,6 +169,7 @@ x-special/gnome-copied-files
#include "arch.h"
#include "parse.h"
#include "os_calls.h"
#include "string_calls.h"
#include "chansrv.h"
#include "chansrv_config.h"
#include "clipboard.h"

View File

@ -33,6 +33,7 @@
#include "arch.h"
#include "parse.h"
#include "os_calls.h"
#include "string_calls.h"
#include "list.h"
#include "chansrv.h"
#include "clipboard.h"

View File

@ -49,6 +49,7 @@
#include "arch.h"
#include "parse.h"
#include "os_calls.h"
#include "string_calls.h"
#include "log.h"
#include "chansrv.h"
#include "chansrv_fuse.h"

View File

@ -28,6 +28,7 @@
#include "chansrv.h"
#include "parse.h"
#include "os_calls.h"
#include "string_calls.h"
#include "irp.h"
IRP *g_irp_head = NULL;

View File

@ -39,6 +39,7 @@
#include "xcommon.h"
#include "log.h"
#include "os_calls.h"
#include "string_calls.h"
#include "thread_calls.h"
#include "list.h"

View File

@ -28,6 +28,7 @@
#include <string.h>
#include "os_calls.h"
#include "string_calls.h"
#include "smartcard.h"
#include "log.h"
#include "irp.h"

View File

@ -33,6 +33,7 @@
#define PCSC_STANDIN 1
#include "os_calls.h"
#include "string_calls.h"
#include "smartcard.h"
#include "log.h"
#include "irp.h"

View File

@ -34,6 +34,7 @@
#include "list.h"
#include "sesman.h"
#include "ssl_calls.h"
#include "string_calls.h"
extern unsigned char g_fixedkey[8]; /* in sesman.c */
extern struct config_sesman *g_cfg; /* in sesman.c */

View File

@ -29,6 +29,7 @@
#endif
#include "libscp_session.h"
#include "string_calls.h"
#include <sys/types.h>
#include <sys/socket.h>

View File

@ -31,6 +31,7 @@
#include "libscp_v0.h"
#include "os_calls.h"
#include "string_calls.h"
extern struct log_config *s_log;

View File

@ -29,6 +29,7 @@
#endif
#include "libscp_v1c.h"
#include "string_calls.h"
#include <stdlib.h>
#include <stdio.h>

View File

@ -29,6 +29,7 @@
#endif
#include "libscp_v1c_mng.h"
#include "string_calls.h"
#include <stdlib.h>
#include <stdio.h>

View File

@ -32,6 +32,7 @@
#define LIBSCP_V1S_C
#include "libscp_v1s.h"
#include "string_calls.h"
//extern struct log_config* s_log;

View File

@ -32,6 +32,7 @@
#define LIBSCP_V1S_MNG_C
#include "libscp_v1s_mng.h"
#include "string_calls.h"
//extern struct log_config* s_log;

View File

@ -32,6 +32,7 @@
#include "sesman.h"
#include "xrdp_configure_options.h"
#include "string_calls.h"
struct sesman_startup_params
{

View File

@ -41,6 +41,7 @@
#include "libscp_types.h"
#include "xauth.h"
#include "xrdp_sockets.h"
#include "string_calls.h"
#ifndef PR_SET_NO_NEW_PRIVS
#define PR_SET_NO_NEW_PRIVS 38

View File

@ -27,6 +27,7 @@
#include "parse.h"
#include "log.h"
#include "libscp.h"
#include "string_calls.h"
#include <stdio.h>
#include <unistd.h>

View File

@ -37,6 +37,7 @@
#include "config.h"
#include "log.h"
#include "tcp.h"
#include "string_calls.h"
#if !defined(PACKAGE_VERSION)
#define PACKAGE_VERSION "???"

View File

@ -26,6 +26,7 @@
#include "libscp.h"
#include "parse.h"
#include "log.h"
#include "string_calls.h"
#include <stdio.h>

View File

@ -30,6 +30,7 @@
#include "arch.h"
#include "os_calls.h"
#include "string_calls.h"
#include <stdio.h>
#include <security/pam_appl.h>

View File

@ -30,6 +30,7 @@
#include <stdio.h>
#include "log.h"
#include "os_calls.h"
#include "string_calls.h"
/******************************************************************************/

View File

@ -34,6 +34,7 @@
#include "log.h"
#include "trans.h"
#include "ssl_calls.h"
#include "string_calls.h"
#include "xrdp_client_info.h"
#define LLOG_LEVEL 1

View File

@ -23,6 +23,7 @@
#endif
#include "xrdp.h"
#include "string_calls.h"
/*****************************************************************************/
/* returns boolean */

View File

@ -26,6 +26,7 @@
#include "xrdp.h"
#include "ms-rdpbcgr.h"
#include "log.h"
#include "string_calls.h"
/* map for rdp to x11 scancodes
code1 is regular scancode, code2 is extended scancode */

View File

@ -27,6 +27,7 @@
#include "xrdp.h"
#include "log.h"
#include "xrdp_configure_options.h"
#include "string_calls.h"
#if !defined(PACKAGE_VERSION)
#define PACKAGE_VERSION "???"

View File

@ -29,6 +29,7 @@
#include "xrdp.h"
#include "log.h"
#include "string_calls.h"
#define LLOG_LEVEL 1
#define LLOGLN(_level, _args) \

View File

@ -23,6 +23,7 @@
#endif
#include "xrdp.h"
#include "string_calls.h"
#if defined(XRDP_PAINTER)
#include <painter.h> /* libpainter */

View File

@ -25,6 +25,7 @@
#include "xup.h"
#include "log.h"
#include "trans.h"
#include "string_calls.h"
#define LOG_LEVEL 1
#define LLOG(_level, _args) \