1. 21 Dec, 2020 5 commits
  2. 18 Dec, 2020 1 commit
    • Werner Koch's avatar
      core: Fix the "ignore" meta command of the argparser. · 4b09c8c2
      Werner Koch authored
      
      
      * src/argparse.c (_gpgrt_argparse): Factor some code out to ...
      (prepare_arg_return): new.
      (_gpgrt_argparse): No missing arg error in ignore sections.
      --
      
      Options in an [ignore] section do not anymore lead to an error if an
      argument is missing.  However, if the option is also in a force
      section the error is thrown.
      
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      4b09c8c2
  3. 07 Dec, 2020 1 commit
  4. 17 Nov, 2020 2 commits
    • NIIBE Yutaka's avatar
      m4: Update with newer autoconf constructs. · 8047ca99
      NIIBE Yutaka authored
      
      
      * src/gpg-error.m4: Replace AC_HELP_STRING to AS_HELP_STRING.
      
      Signed-off-by: NIIBE Yutaka's avatarNIIBE Yutaka <gniibe@fsij.org>
      8047ca99
    • NIIBE Yutaka's avatar
      build: Update to new autoconf constructs. · 41d753e2
      NIIBE Yutaka authored
      
      
      * configure.ac Replace AC_GNU_SOURCE to Use AC_USE_SYSTEM_EXTENSIONS.
      Replace AC_HELP_STRING to AS_HELP_STRING.
      * m4/estream.m4: Replace AC_TRY_LINK to AC_LINK_IFELSE.
      * m4/gnupg-misc.m4: Replace AC_TRY_COMPILE to AC_COMPILE_IFELSE.
      * m4/libtool.m4: Use AC_LANG_PUSH/AC_LANG_POP instead of
      AC_LANG_SAVE/AC_LANG_RESTORE.
      * m4/readline.m4: Replace AC_HELP_STRING to AS_HELP_STRING.
      Fix quote for _combo.
      * m4/threadlib.m4: Replace AC_HELP_STRING to AS_HELP_STRING.
      
      Signed-off-by: NIIBE Yutaka's avatarNIIBE Yutaka <gniibe@fsij.org>
      41d753e2
  5. 19 Oct, 2020 1 commit
    • Werner Koch's avatar
      New public function gpgrt_access. · 4764c5a3
      Werner Koch authored
      * src/gpg-error.h.in (gpgrt_access): New.
      * src/gpg-error.vers. src/gpg-error.def.in: Add new function.
      * src/sysutils.c (any8bitchar): New.
      (_gpgrt_access): New.
      * src/visibility.c (gpgrt_access): New.
      
      * src/spawn-w32.c (_gpgrt_spawn_process_detached): Use it.
      * src/argparse.c (try_versioned_conffile): Use it.
      * tests/t-stringutils.c (check_access): New simple test.
      --
      
      This is basically a wrapper to allow handling of utf8 encoded file
      names on Windows.  This also fixes the case for versioned config files
      in directories with non-ascii characters.
      
      The new test needs to be run manually on Windows using a directory
      with Unicode characters.
      
      GnuPG-bug-id: 5098
      4764c5a3
  6. 09 Oct, 2020 1 commit
    • Werner Koch's avatar
      w32: Support utf8 also for getcwd. · dbedf190
      Werner Koch authored
      * src/sysutils.c (_gpgrt_getcwd) [W32]: Implement utf-8 support.
      * src/w32-gettext.c (wchar_to_native): Factor some code out to ..
      (wchar_to_cp): new.
      (_gpgrt_wchar_to_utf8): New.
      * tests/t-stringutils.c: Include windows.h.
      (utf8_to_wchar): New.
      (wchar_to_utf8): New.
      (mygetcwd): Use wchar version for Windows.
      (main): New option --pwd.
      dbedf190
  7. 08 Oct, 2020 1 commit
  8. 25 Aug, 2020 1 commit
  9. 24 Aug, 2020 2 commits
  10. 21 Aug, 2020 2 commits
  11. 17 Aug, 2020 1 commit
  12. 11 Aug, 2020 1 commit
  13. 05 Aug, 2020 1 commit
  14. 03 Aug, 2020 1 commit
  15. 15 Jul, 2020 1 commit
  16. 26 Jun, 2020 1 commit
    • Werner Koch's avatar
      estream: Add gpgrt_fcancel · 3413489d
      Werner Koch authored
      
      
      * src/estream.c (do_close): Add arg 'cancel_mode' and chnage all
      callers.
      (_gpgrt_fcancel): New.
      * src/gpg-error.def.in, src/gpg-error.vers: Add function.
      * src/visibility.c (gpgrt_fcancel): New.
      * src/gpg-error.h.in (gpgrt_fcancel): New.
      --
      
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      3413489d
  17. 15 Jun, 2020 1 commit
  18. 11 Jun, 2020 2 commits
  19. 03 Jun, 2020 1 commit
  20. 29 May, 2020 5 commits
  21. 19 May, 2020 1 commit
  22. 09 Apr, 2020 2 commits
  23. 03 Apr, 2020 3 commits
    • Werner Koch's avatar
      core: Improve the echo and info meta commands of the arg parser · 98d11eff
      Werner Koch authored
      
      
      * src/argparse.c (handle_meta_echo): Substitue some vars.
      (handle_meta_user): Factor some code out to ...
      (assure_username): new.
      --
      
      Yeah, that is not really needed but might sometimes be helpful.
      
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      98d11eff
    • Werner Koch's avatar
      core: Implement meta command [user] also for Windows · ef07aedc
      Werner Koch authored
      
      
      * src/argparse.c (initialize): Clear username.
      * src/sysutils.c (_gpgrt_getusername): Implement for Windows.
      --
      
      This also fixes a missing intialization
      
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      ef07aedc
    • Werner Koch's avatar
      core: Implement meta command [user] for the arg parser. · d843d260
      Werner Koch authored
      
      
      * src/sysutils.c (_gpgrt_getusername): New.
      * src/argparse.c (struct _gpgrt_argparse_internal_s): New flags user_*
      and store the current user.
      (initialize): Free new malloced field.  Clear new flags.
      (handle_meta_user): Implement.
      (handle_metacmd): Implement user sections.  Remove "group" meta
      command.
      (_gpgrt_argparse): Implement user sections.
      (finish_read_sys): Reset new vars.
      --
      
      Implementing group would be somewhat complicated and it is doubtful
      whether this really makes sense and is manageable for the admin.
      
      Note that we have not yet implemented this for Windows.
      
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      d843d260
  24. 06 Mar, 2020 2 commits
    • Werner Koch's avatar
      core: Tweak the printing of headers in the --help output. · 85b5006d
      Werner Koch authored
      
      
      * src/argparse.c (show_help): Do not print empty sections between
      headers.
      
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      85b5006d
    • Werner Koch's avatar
      core: Add features for pretty printing the help · c59bf582
      Werner Koch authored
      
      
      * src/gpg-error.h.in (ARGPARSE_OPT_HEADER): New.
      (ARGPARSE_OPT_VERBATIM): New.
      (ARGPARSE_verbatim): New.
      (ARGPARSE_header): New.
      * src/argparse.c (show_help): Implement them.
      --
      
      These two macros are useful for custom help screens.  In contrast to
      the ARGPARSE_group hack they do not need a short option number (we use
      1 here as a surrogate) and not the "@" hack.  Thus already translated
      strings can be used.  ARGPARSE_header further allows to specify a
      symbolic name for the group and does some minor formatting.  If such a
      symbolic name is given --dump-option-table also emits this as a pseudo
      option for consumption by GUIs which for example use tabs to group
      options.
      
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      c59bf582