void print_rcs_version() { rcs_version_printed = 1; #if !defined(rtlinux) && !defined(DISABLE_RCS_PRINT) rcs_print((char *) rcs_version_info_string); #endif }
int NML_INTERP_LIST::append(NMLmsg *nml_msg_ptr) { /* check for invalid data */ if (NULL == nml_msg_ptr) { rcs_print_error("NML_INTERP_LIST::append : attempt to append NULL msg\n"); return -1; } if (0 == nml_msg_ptr->type) { rcs_print_error("NML_INTERP_LIST::append : attempt to append 0 type\n"); return -1; } if(nml_msg_ptr->size > MAX_NML_COMMAND_SIZE -64 ) { rcs_print_error("NML_INTERP_LIST::append : command size is too large."); return -1; } if(nml_msg_ptr->size < 4 ) { rcs_print_error("NML_INTERP_LIST::append : command size is invalid."); return -1; } #ifdef DEBUG_INTERPL if(sizeof(temp_node) < MAX_NML_COMMAND_SIZE+4 || sizeof(temp_node) > MAX_NML_COMMAND_SIZE+16 || ((void *) &temp_node.line_number) > ((void *) &temp_node.command.commandbuf)) { rcs_print_error("NML_INTERP_LIST::append : assumptions about NML_INTERP_LIST_NODE have been violated."); return -1; } #endif if (NULL == linked_list_ptr) { return -1; } // fill in the NML_INTERP_LIST_NODE temp_node.line_number = next_line_number; temp_node.file_line=next_file_line; memcpy(temp_node.command.commandbuf, nml_msg_ptr, nml_msg_ptr->size); // stick it on the list linked_list_ptr->store_at_tail(&temp_node, nml_msg_ptr->size+sizeof(temp_node.line_number)+sizeof(temp_node.file_line)+sizeof(temp_node.dummy)+32+(32-nml_msg_ptr->size%32), 1); #ifdef DEBUG_INTERPL if(EMC_DEBUG & EMC_DEBUG_INTERP_LIST) { rcs_print("NML_INTERP_LIST::append(nml_msg{size=%d,type=%d}) : list_size=%d, line_number = %d\n", nml_msg_ptr->size,nml_msg_ptr->type,linked_list_ptr->list_size, temp_node.line_number); } #endif return 0; }
void NML_INTERP_LIST::print() { NMLmsg *nml_msg; if (NULL == linked_list_ptr) { return; } nml_msg = (NMLmsg *) linked_list_ptr->get_head(); while (NULL != nml_msg) { rcs_print("%d ", nml_msg->type); nml_msg = (NMLmsg *)linked_list_ptr->get_next(); } rcs_print("\n"); }