/[ascend]/trunk/tcltk98/generic/interface/Qlfdid.c
ViewVC logotype

Contents of /trunk/tcltk98/generic/interface/Qlfdid.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 64 - (show annotations) (download) (as text)
Wed Nov 30 06:06:46 2005 UTC (14 years, 7 months ago) by johnpye
File MIME type: text/x-csrc
File size: 2115 byte(s)
Moved non-Tcl parts of qlfdid to base/generic.
Moved non-Tcl parts of SimsProc to base/generic/compiler/simlist (changeset 96).
Moved g_compiler_timing to base/generic/compiler/simlist.
1 /*
2 * Qlfdid.c
3 * by Kirk Abbott and Ben Allan
4 * Created: 1/94
5 * Version: $Revision: 1.22 $
6 * Version control file: $RCSfile: Qlfdid.c,v $
7 * Date last modified: $Date: 2003/08/23 18:43:07 $
8 * Last modified by: $Author: ballan $
9 *
10 * This file is part of the ASCEND Tcl/Tk interface
11 *
12 * Copyright 1997, Carnegie Mellon University
13 *
14 * The ASCEND Tcl/Tk interface is free software; you can redistribute
15 * it and/or modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
18 *
19 * The ASCEND Tcl/Tk interface is distributed in hope that it will be
20 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with the program; if not, write to the Free Software Foundation,
26 * Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named
27 * COPYING. COPYING is found in ../compiler.
28 */
29
30 #include "tcl.h"
31 #include "tk.h"
32 #include "compiler/qlfdid.h"
33
34 int Asc_BrowQlfdidSearchCmd(ClientData cdata, Tcl_Interp *interp,
35 int argc, CONST84 char *argv[])
36 {
37 char temp[MAXIMUM_ID_LENGTH];
38 struct gl_list_t *search_list;
39 struct SearchEntry *se;
40 unsigned long len,c;
41
42 (void)cdata; /* stop gcc whine about unused parameter */
43
44 if ( argc != 2 ) {
45 Tcl_SetResult(interp,"wrong # args : Usage is qlfdid \"name\"",TCL_STATIC);
46 return TCL_ERROR;
47 }
48 search_list = Asc_BrowQlfdidSearch(QUIET(argv[1]),temp);
49 g_relative_inst = g_search_inst;
50 if ((g_search_inst==NULL) || (search_list==NULL)) {
51 Tcl_AppendResult(interp,"Orphaned ",temp,(char *)NULL);
52 return TCL_ERROR;
53 } else {
54 len = gl_length(search_list);
55 for(c=1;c<=len;c++) {
56 se = gl_fetch(search_list,c);
57 Tcl_AppendResult(interp,se->name," ",(char *)NULL);
58 }
59 Asc_SearchListDestroy(search_list);
60 return TCL_OK;
61 }
62 }
63
64

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22