Loading ...
Sorry, an error occurred while loading the content.
 

Re: urp, here is the patch,

Expand Messages
  • Glenn Maynard
    ... Don t forget to free cvrt with convert_setup(&cvrt, NULL, NULL); (or perhaps , ; I forget offhand.) It needs to close iconv, at least. -- Glenn
    Message 1 of 2 , Aug 15, 2002
      On Thu, Aug 15, 2002 at 01:56:53PM -0400, Maiorana, Jason wrote:
      > + else if (data->type == utf8_string_atom)
      > + {
      > + /*convert "utf-8" to "p_enc"*/
      > + vimconv_T cvrt;
      > +
      > +# ifdef USE_ICONV
      > + cvrt.vc_fd = (iconv_t)-1;
      > +# endif
      > + convert_setup(&cvrt,"utf-8",p_enc);
      > +
      > + if (cvrt.vc_type == CONV_NONE)
      > + {
      > + p = (char_u *)data->data;
      > + len = data->length;
      > + }
      > + else
      > + {
      > + int temp;
      > +
      > + p = string_convert(&cvrt, (char_u *)data->data, &temp);
      > + len = (long_u)temp;
      > + if(!p)
      > + {
      > + received_selection = RS_FAIL;
      > + if (gtk_main_level() > 0)
      > + gtk_main_quit();
      > + return;
      > + }
      > + free_p = TRUE;

      Don't forget to free cvrt with convert_setup(&cvrt, NULL, NULL); (or
      perhaps "", ""; I forget offhand.) It needs to close iconv, at least.

      --
      Glenn Maynard
    Your message has been successfully submitted and would be delivered to recipients shortly.