1 #include <portability.h>
41 #include "soar_TraceNames.h"
45 using namespace soar_TraceNames;
165 print (thisAgent,
"Error: bad trace format string: %s\n",
string);
168 print (thisAgent,
" Error found at: %s\n",
format);
172 if (prev) prev->
next = New;
else first = New;
214 push (thisAgent, sym, path);
236 if (read_opening_bracket) {
254 if (prev) prev->
next = New;
else first = New;
273 list *attribute_path;
300 if (!strncmp(
format,
"%v", 2)) {
311 if (!strncmp(
format,
"%o", 2)) {
322 if (!strncmp(
format,
"%av", 3)) {
333 if (!strncmp(
format,
"%ao", 3)) {
344 if (!strncmp(
format,
"%cs", 3)) {
352 if (!strncmp(
format,
"%co", 3)) {
360 if (!strncmp(
format,
"%dc", 3)) {
368 if (!strncmp(
format,
"%ec", 3)) {
376 if (!strncmp(
format,
"%%", 2)) {
384 if (!strncmp(
format,
"%[", 2)) {
392 if (!strncmp(
format,
"%]", 2)) {
400 if (!strncmp(
format,
"%sd", 3)) {
408 if (!strncmp(
format,
"%id", 3)) {
416 if (! strncmp (
format,
"%ifdef", 6)) {
427 if (! strncmp (
format,
"%left", 5)) {
455 if (! strncmp (
format,
"%right", 6)) {
483 if (! strncmp (
format,
"%rsd", 4)) {
494 if (!strncmp(
format,
"%nl", 3)) {
517 for ( ; tf!=
NIL; tf=tf->
next) {
525 for (i=1; i<len-1; i++)
print (thisAgent,
"%c", *(s+i));
584 strncpy (msg,
"Internal error: bad trace format type\n",
BUFFER_MSG_SIZE);
657 for (i=0; i<3; i++) {
673 if (name_restriction) {
700 if (name_restriction) {
709 if (! tr)
return FALSE;
721 if (! *format)
return FALSE;
731 const char *format_string) {
738 if (!new_tf)
return FALSE;
744 if (name_restriction) {
786 print (thisAgent,
"\"\n");
799 print (thisAgent,
"}\n");
828 for (i=0; i<3; i++) {
834 for (i=0; i<3; i++) {
848 for (i=0; i<3; i++) {
854 for (i=0; i<3; i++) {
867 "%id %ifdef[(%v[name])]");
869 "%id %ifdef[(%v[attribute] %v[impasse])]");
880 "%right[6,%dc]: %rsd[ ]==>S: %cs");
882 "%right[6,%dc]: %rsd[ ] O: %co");
889 "%id\" %ifdef[name=\"%v[name]\"]");
891 "%id\" %ifdef[impasse_object=\"%v[attribute]\" impasse_type=\"%v[impasse]\"]");
903 "<state stack_level=\"%sd\" decision_cycle_count=\"%dc\" current_state_id=\"%cs>");
905 "<operator stack_level=\"%sd\" decision_cycle_count=\"%dc\" current_operator_id=\"%co>");
996 Bool print_attribute,
1002 if (print_attribute) {
1032 Bool print_attributes,
1066 if (print_attributes) {
1068 for (c=path; c!=
NIL; c=c->
rest) {
1087 #define GROWABLE_STRING_TRACE_FORMAT_LIST_TO_STRING_BUFFER_SIZE 50
1094 for ( ; tf!=
NIL; tf=tf->
next) {
1175 {
Bool saved_found_undefined;
1229 strncpy (msg,
"Internal error: bad trace format type\n",
BUFFER_MSG_SIZE);
1326 object->id.tc_num = 0;
1352 if (current_state) {
1429 xml_att_val( thisAgent, kOperator_ID, current_o );
1476 char *format_string) {