function C(s,filename)
%CSYNTAX - C represention of symbolic output.
%	CSYNTAX(S) prints the C representation of S.
%	CSYNTAX(S,'filename') also prints it to the specified file.
%
%	Example:
%	    r = '(1+2*x+3*x^2)/(4+5*x+6*x^2)';
%	    csyntax(r)
%	  
% 	    t0 = (1.0+2.0*x+3.0*x*x)/(4.0+5.0*x+6.0*x*x);
%
%	See also PRETTY, LATEX.

global csyntax_INITIALIZED;

if (csyntax_INITIALIZED ~= 1)
  maplemex(['readlib(C);'],1);
  csyntax_INITIALIZED = 1;
end

if nargin > 1, diary(filename); end
if ~isstr(s), s = sym(s); end
if s(1) == '[', s = sm2ar(s); end
% Use maplemex directly to print multiple line output.
maplemex(['C(' s ');'],1)
if nargin > 1, diary('off'); end
