Commit 61ba1dab authored by Steve Holme's avatar Steve Holme
Browse files

tool_operate: Moved locale setup code into operate_init()

parent 06b4275c
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -193,6 +193,11 @@ static CURLcode operate_init(struct Configurable *config)
    return CURLE_FAILED_INIT;
    return CURLE_FAILED_INIT;
  }
  }


  /* Setup proper locale from environment */
#ifdef HAVE_SETLOCALE
  setlocale(LC_ALL, "");
#endif

  return CURLE_OK;
  return CURLE_OK;
}
}


@@ -230,11 +235,6 @@ static int operate_do(struct Configurable *config, int argc,
  ** from outside of nested loops further down below.
  ** from outside of nested loops further down below.
  */
  */


  /* setup proper locale from environment */
#ifdef HAVE_SETLOCALE
  setlocale(LC_ALL, "");
#endif

  /* Parse .curlrc if necessary */
  /* Parse .curlrc if necessary */
  if((argc == 1) || (!curlx_strequal(argv[1], "-q"))) {
  if((argc == 1) || (!curlx_strequal(argv[1], "-q"))) {
    parseconfig(NULL, config); /* ignore possible failure */
    parseconfig(NULL, config); /* ignore possible failure */