ise noted. Permission is hereby granted to do whatever you like with it, subject to the conditions that may exist in copyrighted materials. Should you wish to make a contribution toward the improvement, modification, or general performance of this module, please send us your comments: why you liked or disliked it, how you use it, and most important, how it helps your work. We will receive your comments at avs@ncsc.org. Please send AVS module bug reports to avs@ncsc.org. ******************************************************************************/ /* NOTE: THIS MODULE AND SOURCE CODE IS FOR USE WITH THE AVS SOFTWARE ENVIRONMENT ONLY */ /* mod_gen Version 1 */ /* Module Name: "delete object" (Input) (Subroutine) */
John Stephen (Tessella) 0235-555511 */ /* Date Created: Thu Apr 22 08:41:14 1993 */ /* */ /* This file is automatically generated by the Module Generator (mod_gen)*/ /* Please do not modify or move the contents of this comment block as */ /* mod_gen needs it in order to read module sources back in. */ /* */ /* param 0 "search string" typein "" "" ":" */ /* End of Module Description Comments */ #include#include #include /* ----> START OF USER-SUPPLIED CODE SECTION #1 (INCLUDE FILES, GLOBAL VARIABLES)*/ /* <---- END OF USER-SUPPLIED CODE SECTION #1 */ /* *****************************************/ /* Module Description */ /* *****************************************/ int delete_object_desc() { int in_port, out_port, param, iresult; extern int delete_object_compute(); AVSset_module_name("delete object", MODULE_RENDER); /* Parameter Specifications */ param = AVSadd_parameter("search string", "string", "", "", ":"); AVSconnect_widget(param, "typein"); param = AVSadd_parameter("viewer", "string", "", "", ":"); AVSconnect_widget(param, "typein"); AVSset_compute_proc(delete_object_compute); /* ----> START OF USER-SUPPLIED CODE SECTION #2 (ADDITIONAL SPECIFICATION INFO)*/ /* <---- END OF USER-SUPPLIED CODE SECTION #2 */ return(1); } /* *****************************************/ /* Module Compute Routine */ /* *****************************************/ int delete_object_compute( search_string, viewer) char *search_string; char *viewer; { char com[200], *out, *err; char buf[1000]; char *a, *b, *c; int i, j, lines, length, count; /* viewer and search-sting names must be non-blank */ if(! viewer || ! *viewer)return(0); if(! search_string || ! *search_string)return(0); sprintf(com,"geom_set_scene -module %s",viewer); AVScommand("kernel",com,&out,&err); sprintf(com,"geom_get_all_obj_names"); AVScommand("kernel",com,&out,&err); strcpy(buf,out); length=strlen(out); if(length > 1) { lines=0;c=buf; for(i=0;i START OF USER-SUPPLIED CODE SECTION #4 (SUBROUTINES, FUNCTIONS, UTILITY ROUTINES)*/ /* <---- END OF USER-SUPPLIED CODE SECTION #4 */