rem: *tmp = '\\'; *tmp++;
add: fprintf ( out, "\\" );
context: gchar * latex_safe ( gchar * text ) {  gchar * safe_text, *tmp;  if ( ! text || ! strlen(text))    return "";  safe_text = malloc ( strlen(text) * 2 );  for ( tmp = safe_text ; * text; text ++, tmp++ )    {      switch ( * text )	{	case '&':	case '\\':	  *tmp = '\\';	  *tmp++;	default:	  *tmp = *text;	  break;	}    }  *tmp = 0;  return safe_text;}