libfreerdp-core: More strings cleanup.

- Comment out unused lookup tables.
- ifdef tables where appropriate.
- Change declarations to produce read-only sections.

See also:
http://blog.flameeyes.eu/2007/12/19/array-of-pointers-and-array-of-arrays
This commit is contained in:
Mike Gilbert 2011-11-29 20:15:50 -05:00
parent 3993f54474
commit 4048ddce6d
6 changed files with 17 additions and 7 deletions

View File

@ -19,7 +19,8 @@
#include "activation.h"
uint8 CTRLACTION_STRINGS[][32] =
/*
static const char* const CTRLACTION_STRINGS[] =
{
"",
"CTRLACTION_REQUEST_CONTROL",
@ -27,6 +28,7 @@ uint8 CTRLACTION_STRINGS[][32] =
"CTRLACTION_DETACH",
"CTRLACTION_COOPERATE"
};
*/
void rdp_write_synchronize_pdu(STREAM* s, rdpSettings* settings)
{

View File

@ -19,7 +19,8 @@
#include "capabilities.h"
uint8 CAPSET_TYPE_STRINGS[][32] =
/*
static const char* const CAPSET_TYPE_STRINGS[] =
{
"Unknown",
"General",
@ -53,6 +54,7 @@ uint8 CAPSET_TYPE_STRINGS[][32] =
"Bitmap Codecs",
"Frame Acknowledge"
};
*/
/* CODEC_GUID_REMOTEFX 0x76772F12BD724463AFB3B73C9C6F7886 */
#define CODEC_GUID_REMOTEFX "\x12\x2F\x77\x76\x72\xBD\x63\x44\xAF\xB3\xB7\x3C\x9C\x6F\x78\x86"

View File

@ -24,13 +24,15 @@
#define INFO_TYPE_LOGON_PLAIN_NOTIFY 0x00000002
#define INFO_TYPE_LOGON_EXTENDED_INF 0x00000003
uint8 INFO_TYPE_LOGON_STRINGS[][32] =
/*
static const char* const INFO_TYPE_LOGON_STRINGS[] =
{
"Logon Info V1",
"Logon Info V2",
"Logon Plain Notify",
"Logon Extended Info"
};
*/
/**
* Read SYSTEM_TIME structure (TS_SYSTEMTIME).\n

View File

@ -21,7 +21,8 @@
#include "license.h"
uint8 LICENSE_MESSAGE_STRINGS[][32] =
#ifdef WITH_DEBUG_LICENSE
static const char* const LICENSE_MESSAGE_STRINGS[] =
{
"",
"License Request",
@ -39,7 +40,7 @@ uint8 LICENSE_MESSAGE_STRINGS[][32] =
"Error Alert"
};
uint8 error_codes[][32] =
static const char* const error_codes[] =
{
"ERR_UNKNOWN",
"ERR_INVALID_SERVER_CERTIFICATE",
@ -56,7 +57,7 @@ uint8 error_codes[][32] =
"ERR_INVALID_MESSAGE_LENGTH"
};
uint8 state_transitions[][32] =
static const char* const state_transitions[] =
{
"ST_UNKNOWN",
"ST_TOTAL_ABORT",
@ -64,6 +65,7 @@ uint8 state_transitions[][32] =
"ST_RESET_PHASE_TO_START",
"ST_RESEND_LAST_MESSAGE"
};
#endif
/**
* Read a licensing preamble.\n

View File

@ -75,6 +75,7 @@ static const char server_sign_magic[] = "session key to server-to-client signing
static const char client_seal_magic[] = "session key to client-to-server sealing key magic constant";
static const char server_seal_magic[] = "session key to server-to-client sealing key magic constant";
#ifdef WITH_DEBUG_NLA
static const char* const NTLMSSP_NEGOTIATE_STRINGS[] =
{
"NTLMSSP_NEGOTIATE_56",
@ -125,6 +126,7 @@ static const char* const AV_PAIRS_STRINGS[] =
"MsvAvTargetName",
"MsvChannelBindings"
};
#endif
/**
* Set NTLMSSP username.

View File

@ -23,7 +23,7 @@
#include "per.h"
#include "redirection.h"
uint8 DATA_PDU_TYPE_STRINGS[][32] =
static const char* const DATA_PDU_TYPE_STRINGS[] =
{
"", "", /* 0x00 - 0x01 */
"Update", /* 0x02 */