buf2[0] = CR; buf2[1] = LF;
buf2[0] = nsCRT::CR; buf2[1] = nsCRT::LF;
MimeEncoderDestroy (MimeEncoderData *data, PRBool abort_p){  int status = 0;  /* If we're uuencoding, we have our own finishing routine. */  if (data->encoding == mime_uuencode)	 mime_uuencode_finish(data);  /* Since Base64 (and uuencode) output needs to do some buffering to get 	 a multiple of three bytes on each block, there may be a few bytes 	 left in the buffer after the last block has been written.  We need to	 flush those out now.   */  PR_ASSERT (data->encoding == mime_Base64 ||			 data->in_buffer_count == 0);  if (!abort_p &&	  data->in_buffer_count > 0)	{	  char buf2 [6];	  char *buf = buf2 + 2;	  char *out = buf;	  int j;	  /* fixed bug 55998, 61302, 61866	   * type casting to PRUint32 before shifting	   */	  PRUint32 n = ((PRUint32) data->in_buffer[0]) << 16;	  if (data->in_buffer_count > 1)		n = n | (((PRUint32) data->in_buffer[1]) << 8);	  buf2[0] = CR;	  buf2[1] = LF;	  for (j = 18; j >= 0; j -= 6)		{		  unsigned int k = (n >> j) & 0x3F;		  if (k < 26)       *out++ = k      + 'A';		  else if (k < 52)  *out++ = k - 26 + 'a';		  else if (k < 62)  *out++ = k - 52 + '0';		  else if (k == 62) *out++ = '+';		  else if (k == 63) *out++ = '/';		  else abort ();		}	  /* Pad with equal-signs. */	  if (data->in_buffer_count == 1)		buf[2] = '=';	  buf[3] = '=';	  if (data->current_column >= 72)		status = data->write_buffer (buf2, 6, data->closure);	  else		status = data->write_buffer (buf,  4, data->closure);	}  PR_FREEIF(data->filename);  PR_Free (data);  return status;}