/**************************************************************************** INTERNATIONAL AVS CENTER (This disclaimer must remain at the top of all files) WARRANTY DISCLAIMER This module and the files associated with it are distributed free of charge. It is placed in the public domain and permission is granted for anyone to use, duplicate, modify, and redistribute it unless otherwise noted. Some modules may be copyrighted. You agree to abide by the conditions also included in the AVS Licensing Agreement, version 1.0, located in the main module directory located at the International AVS Center ftp site and to include the AVS Licensing Agreement when you distribute any files downloaded from that site. The International AVS Center, MCNC, the AVS Consortium and the individual submitting the module and files associated with said module provide absolutely NO WARRANTY OF ANY KIND with respect to this software. The entire risk as to the quality and performance of this software is with the user. IN NO EVENT WILL The International AVS Center, MCNC, the AVS Consortium and the individual submitting the module and files associated with said module BE LIABLE TO ANYONE FOR ANY DAMAGES ARISING FROM THE USE OF THIS SOFTWARE, INCLUDING, WITHOUT LIMITATION, DAMAGES RESULTING FROM LOST DATA OR LOST PROFITS, OR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES. This AVS module and associated files are public domain software unless otherwise 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) */ /* Author: 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 */