summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-23 01:30:58 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-23 01:30:58 +0000
commit5052c65fd311273b5b3ea9c0546367235f0b945d (patch)
treeccfce5385598112aba3b680ce4c492bc0a046363 /source4/script
parentfec4b5b0cc8160d93dfbb91643a9783a08ed12a5 (diff)
downloadsamba-5052c65fd311273b5b3ea9c0546367235f0b945d.tar.gz
samba-5052c65fd311273b5b3ea9c0546367235f0b945d.tar.bz2
samba-5052c65fd311273b5b3ea9c0546367235f0b945d.zip
get rid of our awk scripts
(This used to be commit f11f757c871dcb66813e44a3144df0f927108d8e)
Diffstat (limited to 'source4/script')
-rw-r--r--source4/script/makeunicodecasemap.awk59
-rw-r--r--source4/script/mkproto.awk165
2 files changed, 0 insertions, 224 deletions
diff --git a/source4/script/makeunicodecasemap.awk b/source4/script/makeunicodecasemap.awk
deleted file mode 100644
index 8424b6c672..0000000000
--- a/source4/script/makeunicodecasemap.awk
+++ /dev/null
@@ -1,59 +0,0 @@
-function reset_vals() {
- upperstr = "";
- lowerstr = "";
- flagstr = "0";
-}
-
-function print_val() {
- upperstr = $13;
- lowerstr = $14;
- if ( upperstr == "" )
- upperstr = strval;
- if ( lowerstr == "" )
- lowerstr = strval;
-
- if ( $3 == "Lu" )
- flagstr = sprintf("%s|%s", flagstr, "UNI_UPPER");
- if ( $3 == "Ll" )
- flagstr = sprintf("%s|%s", flagstr, "UNI_LOWER");
- if ( val >= 48 && val <= 57)
- flagstr = sprintf("%s|%s", flagstr, "UNI_DIGIT");
- if ((val >= 48 && val <= 57) || (val >= 65 && val <= 70) || (val >=97 && val <= 102))
- flagstr = sprintf("%s|%s", flagstr, "UNI_XDIGIT");
- if ( val == 32 || (val >=9 && val <= 13))
- flagstr = sprintf("%s|%s", flagstr, "UNI_SPACE");
- if( index(flagstr, "0|") == 1)
- flagstr = substr(flagstr, 3, length(flagstr) - 2);
- printf("{ 0x%s, 0x%s, %s }, \t\t\t/* %s %s */\n", lowerstr, upperstr, flagstr, strval, $2);
- val++;
- strval=sprintf("%04X", val);
- reset_vals();
-}
-
-BEGIN {
- val=0
- FS=";"
- strval=sprintf("%04X", val);
- reset_vals();
-}
-
-{
- if ( $1 == strval ) {
- print_val();
- } else {
- while ( $1 != strval) {
- printf("{ 0x%04X, 0x%04X, 0 }, \t\t\t/* %s NOMAP */\n", val, val, strval);
- val++;
- strval=sprintf("%04X", val);
- }
- print_val();
- }
-}
-
-END {
- while ( val < 65536 ) {
- printf("{ 0x%04X, 0x%04X, 0 }, \t\t\t/* %s NOMAP */\n", val, val, strval);
- val++;
- strval=sprintf("%04X", val);
- }
-}
diff --git a/source4/script/mkproto.awk b/source4/script/mkproto.awk
deleted file mode 100644
index 999066ed7d..0000000000
--- a/source4/script/mkproto.awk
+++ /dev/null
@@ -1,165 +0,0 @@
-BEGIN {
- inheader=0;
-# use_ldap_define = 0;
- current_file="";
- if (headername=="") {
- headername="_PROTO_H_";
- }
-
- print "#ifndef",headername
- print "#define",headername
- print ""
- print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */"
- print ""
-}
-
-END {
- print ""
- print "#endif /* ",headername," */"
-}
-
-{
- if (FILENAME!=current_file) {
-# if (use_ldap_define)
-# {
-# print "#endif /* USE_LDAP */"
-# use_ldap_define = 0;
-# }
- print ""
- print "/* The following definitions come from",FILENAME," */"
- print ""
- current_file=FILENAME
- }
- if (inheader) {
- if (match($0,"[)][ \t]*$")) {
- inheader = 0;
- printf "%s;\n",$0;
- } else {
- printf "%s\n",$0;
- }
- next;
- }
-}
-
-# special handling for code merge of TNG to head
-/^#define OLD_NTDOMAIN 1/ {
- printf "#if OLD_NTDOMAIN\n"
-}
-/^#undef OLD_NTDOMAIN/ {
- printf "#endif\n"
-}
-/^#define NEW_NTDOMAIN 1/ {
- printf "#if NEW_NTDOMAIN\n"
-}
-/^#undef NEW_NTDOMAIN/ {
- printf "#endif\n"
-}
-
-# we handle the loadparm.c fns separately
-
-/^FN_LOCAL_BOOL/ {
- split($0,a,"[,()]")
- printf "BOOL %s(int );\n", a[2]
-}
-
-/^FN_LOCAL_LIST/ {
- split($0,a,"[,()]")
- printf "const char **%s(int );\n", a[2]
-}
-
-/^FN_LOCAL_STRING/ {
- split($0,a,"[,()]")
- printf "char *%s(int );\n", a[2]
-}
-
-/^FN_LOCAL_CONST_STRING/ {
- split($0,a,"[,()]")
- printf "const char *%s(int );\n", a[2]
-}
-
-/^FN_LOCAL_INT/ {
- split($0,a,"[,()]")
- printf "int %s(int );\n", a[2]
-}
-
-/^FN_LOCAL_CHAR/ {
- split($0,a,"[,()]")
- printf "char %s(int );\n", a[2]
-}
-
-/^FN_GLOBAL_BOOL/ {
- split($0,a,"[,()]")
- printf "BOOL %s(void);\n", a[2]
-}
-
-/^FN_GLOBAL_LIST/ {
- split($0,a,"[,()]")
- printf "const char **%s(void);\n", a[2]
-}
-
-/^FN_GLOBAL_STRING/ {
- split($0,a,"[,()]")
- printf "char *%s(void);\n", a[2]
-}
-
-/^FN_GLOBAL_CONST_STRING/ {
- split($0,a,"[,()]")
- printf "const char *%s(void);\n", a[2]
-}
-
-/^FN_GLOBAL_INT/ {
- split($0,a,"[,()]")
- printf "int %s(void);\n", a[2]
-}
-
-/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
- next;
-}
-
-#
-# We have to split up the start
-# matching as we now have so many start
-# types that it can cause some versions
-# of nawk/awk to choke and fail on
-# the full match. JRA.
-#
-
-{
- gotstart = 0;
- if( $0 ~ /^const|^connection_struct|^pipes_struct|^smb_np_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t|^double/ ) {
- gotstart = 1;
- }
-
- if( $0 ~ /^vuser_key|^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID|^RPC_HND_NODE|^BYTE/ ) {
- gotstart = 1;
- }
-
- if( $0 ~ /^ADS_STRUCT|^ADS_STATUS|^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) {
- gotstart = 1;
- }
-
- if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) {
- gotstart = 1;
- }
-
- if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^NTTIME|^DEVICEMODE/ ) {
- gotstart = 1;
- }
-
- if(!gotstart) {
- next;
- }
-}
-
-
-/[(].*[)][ \t]*$/ {
- printf "%s;\n",$0;
- next;
-}
-
-/[(]/ {
- inheader=1;
- printf "%s\n",$0;
- next;
-}
-