[settings] remove obsolete generator script
This commit is contained in:
parent
593e2bf4a9
commit
81d7558184
@ -1559,11 +1559,10 @@ static void freerdp_client_print_keyboard_list(void)
|
||||
|
||||
static void freerdp_client_print_tune_list(const rdpSettings* settings)
|
||||
{
|
||||
size_t x;
|
||||
SSIZE_T type = 0;
|
||||
|
||||
printf("%s\t%50s\t%s\t%s", "<index>", "<key>", "<type>", "<default value>\n");
|
||||
for (x = 0; x < FreeRDP_Settings_StableAPI_MAX; x++)
|
||||
for (size_t x = 0; x < FreeRDP_Settings_StableAPI_MAX; x++)
|
||||
{
|
||||
const char* name = freerdp_settings_get_name_for_key(x);
|
||||
type = freerdp_settings_get_type_for_key(x);
|
||||
@ -4029,7 +4028,7 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
if (count == 0)
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
|
||||
size_t singleOptionWithoutOnOff = 0;
|
||||
FreeRDP_Settings_Keys_Bool singleOptionWithoutOnOff = 0;
|
||||
for (x = 0; x < count; x++)
|
||||
{
|
||||
const char* cur = ptr[x];
|
||||
@ -4041,7 +4040,7 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
}
|
||||
|
||||
const BOOL val = bval != PARSE_OFF;
|
||||
size_t id = 0;
|
||||
FreeRDP_Settings_Keys_Bool id = 0;
|
||||
if (option_starts_with("rdp", cur)) /* Standard RDP */
|
||||
{
|
||||
id = FreeRDP_RdpSecurity;
|
||||
|
@ -1,51 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
# This scripts reads include/freerdp/settings.h and scans the
|
||||
# rdp_settings structure for all the fields until the /END of ABI
|
||||
# stable zone/ comment. It then generates a set of #define one per
|
||||
# non-padding field, valued as the index of the field, taking into
|
||||
# account padding fields. These field #defines are updated in that
|
||||
# same file.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# cd $freerdp_source_directory
|
||||
# scripts/update-rdpSettings
|
||||
|
||||
set -eu
|
||||
|
||||
srcroot=$(dirname $(dirname "${BASH_SOURCE[0]}"))
|
||||
srcroot=$(realpath "${srcroot}")
|
||||
file="${srcroot}/include/freerdp/settings.h"
|
||||
|
||||
(
|
||||
set -eu
|
||||
head='This is generated with a script parsing the rdpSettings data structure'
|
||||
tail='FreeRDP Settings Data Structure'
|
||||
sed -n -e "1,/${head}/p" < "${file}"
|
||||
printf ' */\n\n'
|
||||
(
|
||||
set -eu
|
||||
i=0
|
||||
sed -e '1,/struct rdp_settings/d' -e '/{/d' -e '/};/,$d' \
|
||||
| sed -e '/End of ABI stable zone/,$d' \
|
||||
| sed -e '$a\
|
||||
x*/' \
|
||||
| tr -d '\012' \
|
||||
| sed -e 's-/\*\([^*]\|\*[^/]\)*\*/--g' -e 's/[ ][ ]*/ /g' \
|
||||
| tr ';' '\012' \
|
||||
| sed -e 's/^[ ]*\([A-Za-z_][A-Za-z_0-9]*[* ]*\)*[* ]\([A-Za-z_][A-Za-z_0-9]*\)/\2/' \
|
||||
-e 's/padding[0-9]*[ ]*\[\(.*\)\]/$((\1))/' \
|
||||
| while read line ; do
|
||||
case "$line" in
|
||||
(*-*) i=$(( i + $(eval echo "$line") )) ;;
|
||||
(*) printf '#define FreeRDP_%-50s (%4d)\n' "$line" "$i" ; i=$(( i + 1 )) ;;
|
||||
esac
|
||||
done
|
||||
) < "${file}"
|
||||
printf '\n\n/**\n'
|
||||
sed -n -e '/'"$tail"'/,$p' < "${file}"
|
||||
) > "${file}.new" \
|
||||
&& cp -v "${file}" "${file}.old" \
|
||||
&& mv -v "${file}.new" "${file}"
|
Loading…
Reference in New Issue
Block a user