Branch: Tag:

2014-06-26

2014-06-26 16:53:37 by Martin Nilsson <nilsson@opera.com>

No need for COMPATIBILITY now that we have __deprecated__. Removed the old class aliases and made more internal things protected.

3:      #pike __REAL_VERSION__   #pragma strict_types - #define COMPATIBILITY +       #if 0   #define WERROR werror
223:    return t=='O' && sprintf("%O(%*O)", this_program, params, elements);    }    - #ifdef COMPATIBILITY +     __deprecated__ string debug_string() {    WERROR("asn1_compound[%s]->debug_string(), elements = %O\n",    type_name, elements);    return _sprintf('O');    } - #endif +    }      //! string object primitive
278:    return t=='O' && sprintf("%O(%O)", this_program, value);    }    - #ifdef COMPATIBILITY +     __deprecated__ string debug_string() {    WERROR("asn1_string[%s]->debug_string(), value = %O\n", type_name, value);    return _sprintf('O');    } - #endif +    }      //! boolean object
322:    return t=='O' && sprintf("%O(%s)", this_program, (value?"TRUE":"FALSE"));    }    - #ifdef COMPATIBILITY +     __deprecated__ string debug_string() {    return value ? "TRUE" : "FALSE";    } - #endif +    }      //! Integer object
386:    value->size(), value->digits());    }    - #ifdef COMPATIBILITY +     __deprecated__ string debug_string() {    return sprintf("INTEGER (%d) %s", value->size(), value->digits());    } - #endif +    }      //! Enumerated object
593:    ->digits(2));    }    - #ifdef COMPATIBILITY +     __deprecated__ string debug_string() {    return sprintf("BIT STRING (%d) %s",    sizeof(value) * 8 - unused,    ([object(Gmp.mpz)](Gmp.mpz(value, 256) >> unused))    ->digits(2));    } - #endif +    }      //! Octet string object
629:    return !sizeof(contents) && this;    }    - #ifdef COMPATIBILITY +     __deprecated__ string debug_string() { return "NULL"; } - #endif +    }      //! Object identifier object
698:    return sprintf("%O(%s)", this_program, (array(string))id*".");    }    - #ifdef COMPATIBILITY +     __deprecated__ string debug_string() {    return "IDENTIFIER " + (array(string)) id * ".";    } - #endif +        protected int __hash()    {
830:    }   }    - Regexp asn1_printable_invalid_chars = Regexp("([^-A-Za-z0-9 '()+,./:=?])"); + protected Regexp asn1_printable_invalid_chars = Regexp("([^-A-Za-z0-9 '()+,./:=?])");      //! Checks if a Pike string can be encoded as a @[PrintableString].   int(0..1) asn1_printable_valid (string s) {
846:    constant type_name = "PrintableString";   }    - Regexp asn1_teletex_invalid_chars = Regexp ("([\\\\{}\240®©¬¦\255Ð])"); + protected Regexp asn1_teletex_invalid_chars = Regexp ("([\\\\{}\240®©¬¦\255Ð])");      //!   int(0..1) asn1_teletex_valid (string s)
916:   #define OG(char) "\316" char /* Combining ogonek */   #define CA(char) "\317" char /* Combining caron */    -  constant encode_from = ({ +  protected constant encode_from = ({    /*"#", "$",*/ "¤", // Note 3    "\\", "{", "}", // Note 7    "\240", // No-break space (note 7)
960:    "ý",    });    -  constant encode_to = ({ +  protected constant encode_to = ({    /*"#", "$",*/ "\250", // Note 3    ENC_ERR("\\"), ENC_ERR("{"), ENC_ERR("}"), // Note 7    ENC_ERR("\240"), // No-break space (note 7)
1004:    GR("y"),    });    -  constant decode_from = ({ +  protected constant decode_from = ({    /*"#", "$",*/ "\244", "\246", "\250", // Note 3    /*"^", "`", "~",*/ // Note 4    "\251", // Left single quotation mark (note 7)
1080:    "\377", // Soft hyphen (note 7)    });    -  constant decode_to = ({ +  protected constant decode_to = ({    /*"#", "$",*/ "$", "#", "\244", // Note 3    /*"^", "`", "~",*/ // Note 4    DEC_ERR("\251"), // Left single quotation mark (note 7)
1156:    "\255", // Soft hyphen (note 7)    });    -  constant decode_comb = ([ +  protected constant decode_comb = ([    GR(" "): "`",    AC(" "): "´",    CI(" "): "^",
1278:    constant type_name = "TeletexString"; // Alias: T61String   }    - Regexp asn1_IA5_invalid_chars = Regexp ("([\200-\377])"); + protected Regexp asn1_IA5_invalid_chars = Regexp ("([\200-\377])");      //!   int(0..1) asn1_IA5_valid (string s)
1496:    real_tag, contents);    }    - #ifdef COMPATIBILITY +     __deprecated__ string debug_string() {    return type_name + "[" + (int) real_tag + "]";    } - #endif +     }       //!
1533:   MetaExplicit TaggedType1 = MetaExplicit(2, 1);   MetaExplicit TaggedType2 = MetaExplicit(2, 2);   MetaExplicit TaggedType3 = MetaExplicit(2, 3); -  - #ifdef COMPATIBILITY - constant meta_explicit = MetaExplicit; - constant asn1_object = Object; - constant asn1_compound = Compound; - constant asn1_string = String; - constant asn1_boolean = Boolean; - constant asn1_integer = Integer; - constant asn1_enumerated = Enumerated; - constant asn1_bit_string = BitString; - constant asn1_octet_string = OctetString; - constant asn1_null = Null; - constant asn1_identifier = Identifier; - constant asn1_utf8_string = UTF8String; - constant asn1_sequence = Sequence; - constant asn1_set = Set; - constant asn1_printable_string = PrintableString; - constant asn1_teletex_string = TeletexString; - constant asn1_broken_teletex_string = BrokenTeletexString; - constant asn1_IA5_string = IA5String; - constant asn1_utc = UTC; - constant asn1_universal_string = UniversalString; - constant asn1_bmp_string = BMPString; - #endif +