1. 10 Nov, 2002 1 commit
    • Niels Möller's avatar
      Use supplied getopt. · e5380bdf
      Niels Möller authored
      (werror): New function.
      (sexp_output_hash_init): New function.
      (sexp_put_char): Made base64 linebreaking configurable.
      Implemented hashing.
      (sexp_put_code_start, sexp_put_code_end): Don't output any
      delimiters here.
      (sexp_put_string): Output base64 delimiters.
      (sexp_put_digest): New function.
      (sexp_convert_item): Output transport delimiters.
      (sexp_convert_file): Deleted function, folded with main.
      (parse_options): New function.
      (main): Implemented --hash and --once, needed by lsh-authorize.
      Rev: src/nettle/tools/sexp-conv.c:1.2
  2. 07 Nov, 2002 1 commit
    • Niels Möller's avatar
      New files. · 3e1ddaff
      Niels Möller authored
      Rev: src/nettle/tools/Makefile.am:1.1
      Rev: src/nettle/tools/getopt.c:1.1
      Rev: src/nettle/tools/getopt.h:1.1
      Rev: src/nettle/tools/getopt1.c:1.1
      Rev: src/nettle/tools/sexp-conv.c:1.1
  3. 31 Oct, 2002 5 commits
    • Niels Möller's avatar
      * examples/sexp-conv.c(sexp_put_list_start): Deleted function. · 869cd834
      Niels Möller authored
      (sexp_put_list_end): Likewise.
      (sexp_put_display_start): Likewise.
      (sexp_put_display_end): Likewise.
      (sexp_puts): Likewise.
      Rev: src/nettle/examples/sexp-conv.c:1.15
    • Niels Möller's avatar
      Some reorder of the functions. · 4b11c57a
      Niels Möller authored
      Rev: src/nettle/examples/sexp-conv.c:1.14
    • Niels Möller's avatar
      * examples/sexp-conv.c (sexp_get_quoted_string): Deleted function. · f1c70f33
      Niels Möller authored
      Merged with sexp_get_String.
      (sexp_get_hex_string): Likewise.
      (sexp_get_base64_string): Likewise.
      (sexp_get_string): Do hex and base64 decoding.
      Rev: src/nettle/examples/sexp-conv.c:1.13
    • Niels Möller's avatar
      * examples/sexp-conv.c (enum sexp_char_type): New enum, for end · 21703d22
      Niels Möller authored
      markers in the input strem.
      (struct sexp_input): Deleted LEVEL attribute. Deleted all usage of
      (sexp_get_raw_char): Use INPUT->c and INPUT->ctype to store
      results. Deleted OUT argument.
      (sexp_get_char): Likewise. Also removed the
      INPUT->coding->decode_final call, for symmetry.
      (sexp_input_end_coding): Call INPUT->coding->decode_final.
      (sexp_next_char): New function.
      (sexp_push_char): New function.
      (sexp_get_token_char): Deleted function.
      (sexp_get_quoted_char): Simplified. Deleted output argument.
      (sexp_get_quoted_string): Simplified.
      (sexp_get_base64_string): Likewise.
      (sexp_get_token_string): Likewise.
      (sexp_get_string_length): Skip the character that terminates the
      (sexp_get_token): Cleared upp calling conventions. Always consume
      the final character of the token.
      (sexp_convert_list): Take responsibility for converting the start
      and end of the list.
      (sexp_convert_file): Call sexp_get_char first, to get the token
      reading started.
      (sexp_convert_item): Cleared up calling conventions. Should be
      called with INPUT->token being the first token of the expression,
      and returns with INPUT->token being the final token of the
      expression. Return value changed to void..
      Rev: src/nettle/examples/sexp-conv.c:1.12
    • Niels Möller's avatar
      (sexp_get_char): Use the nettle_armor · 648e5a29
      Niels Möller authored
      interface for decoding.
      (sexp_input_start_coding): New function.
      (sexp_input_end_coding): New function.
      (sexp_get_base64_string): Rewrote to use sexp_input_start_coding
      and sexp_input_end_coding.
      (sexp_get_token): Generate SEXP_TRANSPORT_START tokens.
      (sexp_convert_list): Lists are ended only by SEXP_LIST_END.
      (sexp_convert_item): Implemented transport mode, using
      sexp_input_start_coding and sexp_input_end_coding.
      Rev: src/nettle/examples/sexp-conv.c:1.11
  4. 30 Oct, 2002 1 commit
    • Niels Möller's avatar
      Deleted hex functions, moved to Nettle's · b7b49518
      Niels Möller authored
      base16 files.
      (struct sexp_output): Represent the current encoding as a
      nettle_armor pointer and a state struct.
      (sexp_output_init): Deleted MODE argument. Now passed to functions
      that need it.
      (sexp_get_char): Updated to new base64 conventions.
      (sexp_get_base64_string): Likewise.
      (sexp_put_raw_char): New function.
      (sexp_put_newline): Use sexp_put_raw_char.
      (sexp_put_char): Use nettle_armor interface for encoding data.
      Use OUTPUT->coding_indent for line breaking, so the INDENT
      argument was deleted.
      (sexp_put_code_start): New function, replacing sexp_put_base64_start.
      (sexp_put_code_end): New function, replacing sexp_put_base64_end.
      (sexp_put_data): Deleted argument INDENT.
      (sexp_puts): Likewise.
      (sexp_put_length): Likewise.
      (sexp_put_list_start): Likewise.
      (sexp_put_list_end): Likewise.
      (sexp_put_display_start): Likewise.
      (sexp_put_display_end): Likewise.
      (sexp_put_string): Likewise. Also changed base64 handling.
      (sexp_convert_string): Deleted argument INDENT. New argument
      (sexp_convert_list): New argument MODE_OUT.
      (sexp_convert_file): Likewise.
      (sexp_convert_item): Likewise. Also handle output in transport
      (match_argument): Simple string comparison.
      (main): Adapted to above changes.
      Rev: src/nettle/examples/sexp-conv.c:1.10
  5. 28 Oct, 2002 1 commit
  6. 26 Oct, 2002 1 commit
  7. 25 Oct, 2002 3 commits
    • Niels Möller's avatar
      (struct sexp_output): Added coding attribute. · 1c8a7192
      Niels Möller authored
      (sexp_put_char): Use output->coding.
      (sexp_put_base64_start): Likewise.
      (sexp_put_base64_end): Likewise.
      Rev: src/nettle/examples/sexp-conv.c:1.7
    • Niels Möller's avatar
      (struct sexp_input): Deleted the mode from · 3a69f832
      Niels Möller authored
      the state, that should be passed as argument to relevant
      functions. Instead, introduces enum sexp_coding, to say if base64
      coding is in effect.
      Rev: src/nettle/examples/sexp-conv.c:1.6
    • Niels Möller's avatar
      (sexp_put_newline): Return void, die on · 6ef2256c
      Niels Möller authored
      (sexp_put_char, sexp_put_data, sexp_puts, sexp_put_length,
      sexp_put_base64_start, sexp_put_base64_end, sexp_put_string,
      sexp_put_list_start, sexp_put_list_end, sexp_put_display_start,
      sexp_put_display_end, sexp_convert_string, sexp_convert_list,
      sexp_skip_token): Likewise.
      (sexp_convert_item): Die on error.
      Rev: src/nettle/examples/sexp-conv.c:1.5
  8. 24 Oct, 2002 1 commit
    • Niels Möller's avatar
      (die): New function. · 4da2bc6a
      Niels Möller authored
      (struct sexp_input): Deleted field ITEM.
      (sexp_get_char): Die on failure, never return -1.
      (sexp_get_quoted_char): Likewise.
      (sexp_get_quoted_string): Die on failure, no returned value.
      (sexp_get_base64_string): Likewise.
      (sexp_get_token_string): Likewise.
      (sexp_get_string): Likewise.
      (sexp_get_string_length): Likewise.
      (sexp_get_token): Likewise.
      (sexp_convert_string): Adapted to sexp_get_token.
      (sexp_convert_list): Likewise.
      (sexp_convert_file): New function.
      (main): Use sexp_convert_file.
      Rev: src/nettle/examples/sexp-conv.c:1.4
  9. 23 Oct, 2002 1 commit
    • Niels Möller's avatar
      (sexp_input_init): Initialize input->string · 30dca9e6
      Niels Möller authored
      (sexp_get_char): Fixed non-transport case.
      (sexp_get_quoted_char): Fixed default case.
      (sexp_get_token): Loop over sexp_get_char (needed for handling of
      white space). Don't modify input->level. Fixed the code that skips
      (sexp_put_char): Fixed off-by-one bug in assertion.
      (sexp_put_string): Fixed escape handling for output of quoted
      (sexp_convert_list): Prettier output, hanging indent after the
      first list element.
      (sexp_skip_token): New function.
      (sexp_convert_item): Use sexp_skip_token to skip the end of a
      Rev: src/nettle/examples/sexp-conv.c:1.3
  10. 22 Oct, 2002 1 commit
  11. 21 Oct, 2002 1 commit