**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
/* === M A C R O S ========================================================= */
+#define VALUENODE_COMPATIBILITY_URL "http://synfig.org/Convert#Compatibility"
+
inline bool is_whitespace(char x) { return ((x)=='\n' || (x)=='\t' || (x)==' '); }
/* === P R O C E D U R E S ================================================= */
return atoi(val.c_str());
}
+// see 'minor hack' at the end of parse_vector() below
+// making this 'static' to give it file local scope
+// stops it working (where working means working around
+// bug #1509627)
+Vector &canvas_parser_vector_id(Vector &vector)
+{
+ return vector;
+}
+
Vector
CanvasParser::parse_vector(xmlpp::Element *element)
{
else
error_unexpected_element(child,child->get_name());
}
- return vect;
+ // Minor hack - gcc 4.1.2 and earlier think that we're not using
+ // 'vect' and optimize it out at -O2 and higher. This convinces
+ // them that we are really using it.
+ return canvas_parser_vector_id(vect);
+ // When the bug is fixed, we can just do this instead:
+ // return vect;
}
Color
return ValueBase(parse_canvas(element,canvas,true));
else
{
- DEBUGPOINT();
error_unexpected_element(element,element->get_name());
}
if(!value_node)
{
- error(element,strprintf(_("Unable to create <animated> with type \"%s\""),ValueBase::type_name(type).c_str()));
+ error(element,strprintf(_("Unable to create <animated> with type \"%s\""),ValueBase::type_local_name(type).c_str()));
return ValueNode_Animated::Handle();
}
else
error_unexpected_element(child,child->get_name());
}
- value_node->changed();
- return value_node;
-}
-
-handle<ValueNode_Subtract>
-CanvasParser::parse_subtract(xmlpp::Element *element,Canvas::Handle canvas)
-{
- assert(element->get_name()=="subtract");
- handle<ValueNode_Subtract> value_node;
- handle<ValueNode> lhs,rhs,scalar;
+ // in canvas version 0.1, angles used to wrap, so to get from -179
+ // degrees to 180 degrees meant a 1 degree change
+ // in canvas version 0.2 they don't, so that's a 359 degree change
- if(element->get_attribute("type"))
- {
- ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value());
-
- if(!type)
- {
- error(element,"Bad type in <subtract>");
- return ValueNode_Subtract::Handle();
- }
- value_node=ValueNode_Subtract::create(type);
- }
- else
- value_node=ValueNode_Subtract::create();
-
- if(!value_node)
+ // when loading a version 0.1 canvas, modify constant angle
+ // waypoints to that they are within 180 degrees of the previous
+ // waypoint's value
+ if (type == ValueBase::TYPE_ANGLE)
{
- error(element,strprintf(_("Unable to create <subtract>")));
- return handle<ValueNode_Subtract>();
- }
-
- //if(element->get_attribute("scalar"))
- //{
- // value_node->set_scalar(atof(element->get_attribute("scalar")->get_value().c_str()));
- //}
-
- try
- {
- if(element->get_attribute("scalar"))
- {
- // This is for compatibility with older versions of the file format
- String value(element->get_attribute("scalar")->get_value());
- if((value[0]<='9' && value[0]>='0') || value[0]=='-')
- {
- warning(element, _("Use of a real value where the ID should be is deprecated"));
- value_node->set_scalar(atof(value.c_str()));
- }
- else
- value_node->set_scalar(canvas->surefind_value_node(value));
- scalar=value_node->get_scalar();
- }
-
- if(element->get_attribute("lhs"))
- {
- lhs=canvas->surefind_value_node(element->get_attribute("lhs")->get_value());
- value_node->set_lhs(lhs);
- }
-
- if(element->get_attribute("rhs"))
- {
- rhs=canvas->surefind_value_node(element->get_attribute("rhs")->get_value());
- value_node->set_rhs(rhs);
- }
- }
- catch (Exception::IDNotFound)
- {
- error(element,"attribute in <subtract> references unknown ID");
- }
- catch (Exception::FileNotFound)
- {
- error(element,"Unable to open external file referenced in ID");
- }
-
- xmlpp::Element::NodeList list = element->get_children();
- for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
- {
- xmlpp::Element *child(dynamic_cast<xmlpp::Element*>(*iter));
- if(!child)
- continue;
- else
- if(child->get_name()=="lhs")
- {
- if(lhs)
- {
- error(child,"LHS component of <subtract> already defined!");
- continue;
- }
-
- xmlpp::Element::NodeList list = child->get_children();
- xmlpp::Element::NodeList::iterator iter;
-
- // Search for the first non-text XML element
- for(iter = list.begin(); iter != list.end(); ++iter)
- if(dynamic_cast<xmlpp::Element*>(*iter)) break;
-
- if(iter==list.end())
- {
- error(child,_("<lhs> is missing its contents"));
- continue;
- }
-
- lhs=parse_value_node(dynamic_cast<xmlpp::Element*>(*iter),canvas);
-
- if(lhs)
- value_node->set_lhs(lhs);
- else
- {
- error((*iter),"Parse of LHS ValueNode failed");
- }
-
- // \todo do a search for more elements and warn if they are found
- }
- else
- if(child->get_name()=="rhs")
+ if (canvas->get_version() == "0.1")
{
- if(rhs)
- {
- error(child,"RHS component of <subtract> already defined!");
- continue;
- }
-
- xmlpp::Element::NodeList list = child->get_children();
- xmlpp::Element::NodeList::iterator iter;
-
- // Search for the first non-text XML element
- for(iter = list.begin(); iter != list.end(); ++iter)
- if(dynamic_cast<xmlpp::Element*>(*iter)) break;
-
- if(iter==list.end())
- {
- error(child,_("<rhs> is missing its contents"));
- continue;
- }
-
- rhs=parse_value_node(dynamic_cast<xmlpp::Element*>(*iter),canvas);
-
- if(rhs)
- value_node->set_rhs(rhs);
- else
- {
- error((*iter),"Parse of RHS ValueNode failed");
- }
-
- // \todo do a search for more elements and warn if they are found
- }
- else
- if(child->get_name()=="scalar")
- {
- if(scalar)
- {
- error(child,"scalar component of <subtract> already defined!");
- continue;
- }
-
- xmlpp::Element::NodeList list = child->get_children();
- xmlpp::Element::NodeList::iterator iter;
-
- // Search for the first non-text XML element
- for(iter = list.begin(); iter != list.end(); ++iter)
- if(dynamic_cast<xmlpp::Element*>(*iter)) break;
-
- if(iter==list.end())
- {
- error(child,_("<scalar> is missing its contents"));
- continue;
- }
-
- scalar=parse_value_node(dynamic_cast<xmlpp::Element*>(*iter),canvas);
-
- if(scalar)
- value_node->set_scalar(scalar);
- else
- {
- error((*iter),"Parse of scalar ValueNode failed");
+ bool first = true;
+ Real angle, prev = 0;
+ WaypointList &wl = value_node->waypoint_list();
+ for (WaypointList::iterator iter = wl.begin(); iter != wl.end(); iter++)
+ {
+ angle = Angle::deg(iter->get_value(iter->get_time()).get(Angle())).get();
+ if (first)
+ first = false;
+ else if (iter->get_value_node()->get_name() == "constant")
+ {
+ if (angle - prev > 180)
+ {
+ while (angle - prev > 180) angle -= 360;
+ iter->set_value(Angle::deg(angle));
+ }
+ else if (prev - angle > 180)
+ {
+ while (prev - angle > 180) angle += 360;
+ iter->set_value(Angle::deg(angle));
+ }
+ }
+ prev = angle;
}
-
- // \todo do a search for more elements and warn if they are found
}
- else
- error_unexpected_element(child,child->get_name());
}
- if(!value_node->get_rhs() || !value_node->get_lhs() || !value_node->get_scalar())
- error(element,"<subtract> is missing LHS, RHS, or SCALAR");
-
- if(value_node->get_rhs() == value_node->get_lhs())
- warning(element,"LHS is equal to RHS in <subtract>, so this value_node will always be zero!");
-
+ value_node->changed();
return value_node;
}
etl::handle<LinkableValueNode>
CanvasParser::parse_linkable_value_node(xmlpp::Element *element,Canvas::Handle canvas)
{
- handle<LinkableValueNode> value_node;
- ValueBase::Type type;
-
// Determine the type
- if(element->get_attribute("type"))
+ if(!element->get_attribute("type"))
{
- type=ValueBase::ident_type(element->get_attribute("type")->get_value());
-
- if(!type)
- {
- error(element,"Bad type in ValueNode");
- return 0;
- }
+ error(element, strprintf(_("Missing attribute \"type\" in <%s>"), element->get_name().c_str()));
+ return 0;
}
- else
+
+ ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value());
+
+ if(!type)
{
- error(element,"Missing type in ValueNode");
+ error(element, strprintf(_("Bad type in <%s>"), element->get_name().c_str()));
return 0;
}
- value_node=LinkableValueNode::create(element->get_name(),type);
+ handle<LinkableValueNode> value_node=LinkableValueNode::create(element->get_name(),type);
+ handle<ValueNode> c[value_node->link_count()];
if(!value_node)
{
- error(element,"Unknown ValueNode type "+element->get_name());
+ error(element, strprintf(_("Error creating ValueNode <%s> with type '%s'. Refer to '%s'"),
+ element->get_name().c_str(),
+ ValueBase::type_local_name(type).c_str(),
+ VALUENODE_COMPATIBILITY_URL));
return 0;
}
if(value_node->get_type()!=type)
{
- error(element,"ValueNode did not accept type");
+ error(element, strprintf(_("<%s> did not accept type '%s'"),
+ element->get_name().c_str(),
+ ValueBase::type_local_name(type).c_str()));
return 0;
}
value_node->set_root_canvas(canvas->get_root());
- int i;
- for(i=0;i<value_node->link_count();i++)
+ // handle exported valuenodes
{
- if(element->get_attribute(value_node->link_name(i)))
- try {
- String id(element->get_attribute(value_node->link_name(i))->get_value());
-
- if(!value_node->set_link(i,
- canvas->surefind_value_node(
- id
- )
- )
- ) error(element,strprintf(_("Unable to set link \"%s\" to ValueNode \"%s\" (link #%d in \"%s\")"),value_node->link_name(i).c_str(),id.c_str(),i,value_node->get_name().c_str()));
- }
- catch(Exception::IDNotFound)
- {
- error(element,"Unable to resolve "+element->get_attribute(value_node->link_name(i))->get_value());
- }
- catch(Exception::FileNotFound)
+ int index;
+ String id, name;
+ xmlpp::Element::AttributeList attrib_list(element->get_attributes());
+ for(xmlpp::Element::AttributeList::iterator iter = attrib_list.begin(); iter != attrib_list.end(); iter++)
{
- error(element,"Unable to open file referenced in "+element->get_attribute(value_node->link_name(i))->get_value());
- }
- catch(...)
- {
- error(element,strprintf(_("Unknown Exception thrown when referencing ValueNode \"%s\""),
- element->get_attribute(value_node->link_name(i))->get_value().c_str()));
- throw;
- }
- }
+ name = (*iter)->get_name();
+ id = (*iter)->get_value();
+ if (name == "guid" || name == "id" || name == "type")
+ continue;
+ try {
+ index = value_node->get_link_index_from_name(name);
- xmlpp::Element::NodeList list = element->get_children();
- for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
- {
- xmlpp::Element *child(dynamic_cast<xmlpp::Element*>(*iter));
- try
- {
- if(!child)
- continue;
- int index=value_node->get_link_index_from_name(child->get_name());
+ if(c[index])
+ {
+ error(element,strprintf(_("'%s' was already defined in <%s>"),
+ name.c_str(),
+ element->get_name().c_str()));
+ continue;
+ }
- xmlpp::Element::NodeList list = child->get_children();
- xmlpp::Element::NodeList::iterator iter;
+ c[index] = canvas->surefind_value_node(id);
- // Search for the first non-text XML element
- for(iter = list.begin(); iter != list.end(); ++iter)
- if(dynamic_cast<xmlpp::Element*>(*iter)) break;
+ if (!c[index])
+ {
+ error(element, strprintf(_("'%s' attribute in <%s> references unknown ID '%s'"),
+ name.c_str(),
+ element->get_name().c_str(),
+ id.c_str()));
+ continue;
+ }
- if(iter==list.end())
+ if(!value_node->set_link(index, c[index]))
+ {
+ error(element, strprintf(_("Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")"),
+ value_node->link_name(index).c_str(),
+ id.c_str(),
+ index,
+ element->get_name().c_str()));
+ continue;
+ }
+
+ // printf(" <%s> set link %d (%s) using exported value\n", element->get_name().c_str(), index, name.c_str());
+ }
+ catch (Exception::BadLinkName)
{
- error(child,_("element is missing its contents"));
- continue;
+ warning(element, strprintf("Bad link name '%s'", name.c_str()));
}
-
- ValueNode::Handle link=parse_value_node(dynamic_cast<xmlpp::Element*>(*iter),canvas);
-
- if(!link)
+ catch(Exception::IDNotFound)
{
- error((*iter),"Parse of ValueNode failed");
+ error(element,"Unable to resolve " + id);
}
- else
- if(!value_node->set_link(index,link))
+ catch(Exception::FileNotFound)
{
- //error(dynamic_cast<xmlpp::Element*>(*iter),strprintf("Unable to connect value node ('%s' of type '%s') to link %d",link->get_name().c_str(),ValueBase::type_name(link->get_type()).c_str(),index));
- error(element,strprintf("Unable to connect value node ('%s' of type '%s') to link %d",link->get_name().c_str(),ValueBase::type_name(link->get_type()).c_str(),index));
+ error(element,"Unable to open file referenced in " + id);
}
-
- // \todo do a search for more elements and warn if they are found
-
- }
- catch(Exception::BadLinkName)
- {
- error_unexpected_element(child,child->get_name());
- }
- catch(...)
- {
- error(child,strprintf(_("Unknown Exception thrown when working on element \"%s\""),child->get_name().c_str()));
- throw;
- }
- }
-
- return value_node;
-}
-
-handle<ValueNode_Composite>
-CanvasParser::parse_composite(xmlpp::Element *element,Canvas::Handle canvas)
-{
- assert(element->get_name()=="composite");
-
- if(!element->get_attribute("type"))
- {
- error(element,"Missing attribute \"type\" in <composite>");
- return handle<ValueNode_Composite>();
- }
-
- ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value());
-
- if(!type)
- {
- error(element,"Bad type in <composite>");
- return handle<ValueNode_Composite>();
- }
-
- handle<ValueNode_Composite> value_node=ValueNode_Composite::create(type);
- handle<ValueNode> c[6];
-
- if(!value_node)
- {
- error(element,strprintf(_("Unable to create <composite>")));
- return handle<ValueNode_Composite>();
- }
-
- int i;
-
- for(i=0;i<value_node->link_count();i++)
- {
- string name=strprintf("c%d",i+1);
- if(c[i])
- {
- error(element,name+" was already defined in <composite>");
- continue;
- }
- if(element->get_attribute(name))
- {
- c[i]=canvas->surefind_value_node(element->get_attribute(name)->get_value());
- if(c[i])
+ catch(...)
{
- if(!value_node->set_link(i,c[i]))
- {
- error(element,'"'+name+"\" attribute in <composite> has bad type");
- }
+ error(element,strprintf(_("Unknown Exception thrown when referencing ValueNode \"%s\""), id.c_str()));
+ throw;
}
- else
- error(element,'"'+name+"\" attribute in <composite> references unknown ID");
}
}
- xmlpp::Element::NodeList list = element->get_children();
- for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
+ // handle inline valuenodes
{
- xmlpp::Element *child(dynamic_cast<xmlpp::Element*>(*iter));
- if(!child)
- continue;
- else
- for(i=0;i<value_node->link_count();i++)
+ int index;
+ String child_name;
+ xmlpp::Element::NodeList list = element->get_children();
+ for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
{
- string name=strprintf("c%d",i+1);
- if(child->get_name()==name)
+ xmlpp::Element *child(dynamic_cast<xmlpp::Element*>(*iter));
+ try
{
- if(c[i])
+ if(!child)
+ continue;
+
+ child_name = child->get_name();
+
+ index = value_node->get_link_index_from_name(child_name);
+
+ if(c[index])
{
- error(child,name+" was already defined in <composite>");
+ error(child, strprintf(_("'%s' was already defined in <%s>"),
+ child_name.c_str(),
+ element->get_name().c_str()));
break;
}
if(iter==list.end())
{
- error(child,strprintf(_("<%s> is missing its contents"),name.c_str()));
- break;
+ error(child,strprintf(_("element <%s> is missing its contents"),
+ child_name.c_str()));
+ continue;
}
- c[i]=parse_value_node(dynamic_cast<xmlpp::Element*>(*iter),canvas);
+ c[index]=parse_value_node(dynamic_cast<xmlpp::Element*>(*iter),canvas);
- if(!c[i])
+ if(!c[index])
{
- error((*iter),"Parse of "+name+" ValueNode failed");
- break;
+ error((*iter),strprintf(_("Parse of '%s' failed"),
+ child_name.c_str()));
+ continue;
}
- if(!value_node->set_link(i,c[i]))
+ if(!value_node->set_link(index,c[index]))
{
- error(child,strprintf(_("<%s> has a bad value"),name.c_str()));
- break;
+ error(child,strprintf(_("Unable to connect value node ('%s' of type '%s') to link %d (%s)"),
+ c[index]->get_name().c_str(),
+ ValueBase::type_local_name(c[index]->get_type()).c_str(),
+ index,
+ value_node->link_name(index).c_str()));
+ continue;
}
// \todo do a search for more elements and warn if they are found
- break;
+
+ // printf(" <%s> set link %d (%s) using inline value\n", element->get_name().c_str(), index, child_name.c_str());
+ }
+ catch(Exception::BadLinkName)
+ {
+ warning(child, strprintf("Bad link name for <%s>", element->get_name().c_str()));
+ }
+ catch(...)
+ {
+ error(child, strprintf(_("Unknown Exception thrown when working on element \"%s\""),child_name.c_str()));
+ throw;
}
}
- // somewhat of a hack, but it works
- if(i==value_node->link_count()) error_unexpected_element(child,child->get_name());
}
- switch(value_node->link_count())
+ for (int i = 0; i < value_node->link_count(); i++)
{
- case 1:
- if(!value_node->get_link(0))
- {
- error(element,"<composite> is missing parameters");
- return handle<ValueNode_Composite>();
- }
- break;
- case 2:
- if(!value_node->get_link(0) ||!value_node->get_link(1))
- {
- error(element,"<composite> is missing parameters");
- return handle<ValueNode_Composite>();
- }
- break;
- case 3:
- if(!value_node->get_link(0) ||!value_node->get_link(1) ||!value_node->get_link(2))
- {
- error(element,"<composite> is missing parameters");
- return handle<ValueNode_Composite>();
- }
- break;
- case 4:
- if(!value_node->get_link(0) ||!value_node->get_link(1) ||!value_node->get_link(2) ||!value_node->get_link(3))
+ if (!c[i] &&
+ // the 'width' parameter of <stripes> wasn't always present, so it won't be in old .sif files
+ !(element->get_name() == "stripes" && value_node->link_name(i) == "width"))
{
- error(element,"<composite> is missing parameters");
- return handle<ValueNode_Composite>();
+ error(element, strprintf(_("<%s> is missing link %d (%s)"),
+ element->get_name().c_str(),
+ i,
+ value_node->link_name(i).c_str()));
+ return 0;
}
- break;
- }
+ }
+
return value_node;
}
return value_node;
}
- // If ValueBase::ident_type() recognises the name, then we know it's a ValueBase
+ // If ValueBase::ident_type() recognizes the name, then we know it's a ValueBase
if(element->get_name()!="canvas" && ValueBase::ident_type(element->get_name()))
{
ValueBase data=parse_value(element,canvas);
if(element->get_name()=="hermite" || element->get_name()=="animated")
value_node=parse_animated(element,canvas);
else
- if(element->get_name()=="subtract")
- value_node=parse_subtract(element,canvas);
- else
- if(element->get_name()=="composite")
- value_node=parse_composite(element,canvas);
- else
if(element->get_name()=="dynamic_list")
value_node=parse_dynamic_list(element,canvas);
else
value_node=parse_dynamic_list(element,canvas);
else
if(LinkableValueNode::book().count(element->get_name()))
+ {
value_node=parse_linkable_value_node(element,canvas);
+ if (!value_node) value_node = PlaceholderValueNode::create();
+ }
else
if(element->get_name()=="canvas")
value_node=ValueNode_Const::create(parse_canvas(element,canvas,true));
else
{
error_unexpected_element(element,element->get_name());
- error(element, "Expected a ValueNode");
+ error(element, strprintf(_("Expected a ValueNode. Refer to '%s'"),
+ VALUENODE_COMPATIBILITY_URL));
+ value_node=PlaceholderValueNode::create();
}
-
value_node->set_root_canvas(canvas->get_root());
-
// If we were successful, and our element has
// an ID attribute, go ahead and add it to the
// value_node list
{
String version(element->get_attribute("version")->get_value());
if(version>layer->get_version())
- warning(element,_("Installed layer version is larger than layer version in file"));
+ warning(element,_("Installed layer version is smaller than layer version in file"));
if(version!=layer->get_version())
layer->set_version(version);
}
continue;
}
- // If we recognise the element name as a
+ // If we recognize the element name as a
// ValueBase, then treat is at one
if(/*(*iter)->get_name()!="canvas" && */ValueBase::ident_type((*iter)->get_name()) && !dynamic_cast<xmlpp::Element*>(*iter)->get_attribute("guid"))
{
canvas->set_guid(guid);
}
+ if(element->get_attribute("version"))
+ canvas->set_version(element->get_attribute("version")->get_value());
+ else if(parent)
+ canvas->set_version(parent->get_version());
+
if(element->get_attribute("width"))
canvas->rend_desc().set_w(atoi(element->get_attribute("width")->get_value().c_str()));
// If we don't have any name, warn
if(list.empty())
- warning(child,_("blank \"name\" entitity"));
+ warning(child,_("blank \"name\" entity"));
string tmp;
for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
// If we don't have any description, warn
if(list.empty())
- warning(child,_("blank \"desc\" entitity"));
+ warning(child,_("blank \"desc\" entity"));
string tmp;
for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
// If we don't have any description, warn
if(list.empty())
- warning(child,_("blank \"author\" entitity"));
+ warning(child,_("blank \"author\" entity"));
string tmp;
for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
if(canvas->value_node_list().placeholder_count())
{
- error(element,strprintf(_("Canvas %s has undefined ValueNodes"),canvas->get_id().c_str()));
+ String nodes;
+ for (ValueNodeList::const_iterator iter = canvas->value_node_list().begin(); iter != canvas->value_node_list().end(); iter++)
+ if(PlaceholderValueNode::Handle::cast_dynamic(*iter))
+ {
+ if (nodes != "") nodes += ", ";
+ nodes += "'" + (*iter)->get_id() + "'";
+ }
+ error(element,strprintf(_("Canvas '%s' has undefined %s: %s"),
+ canvas->get_id().c_str(),
+ canvas->value_node_list().placeholder_count() == 1 ? _("ValueNode") : _("ValueNodes"),
+ nodes.c_str()));
}
+ canvas->set_version(CURRENT_CANVAS_VERSION);
return canvas;
}
Canvas::Handle
CanvasParser::parse_from_file_as(const String &file_,const String &as_)
{
- CHECK_EXPIRE_TIME();
try
{
ChangeLocale change_locale(LC_NUMERIC, "C");
Canvas::Handle
CanvasParser::parse_from_string(const String &data)
{
- CHECK_EXPIRE_TIME();
-
try
{
ChangeLocale change_locale(LC_NUMERIC, "C");