Skip to content
This repository
Browse code

Add the netmisc.cc source file.

  • Loading branch information...
commit 1bae5677288fcf44320309f757ba99a043d99753 1 parent 7d7beee
steve authored

Showing 1 changed file with 49 additions and 0 deletions. Show diff stats Hide diff stats

  1. +49 0 netmisc.cc
49 netmisc.cc
... ... @@ -0,0 +1,49 @@
  1 +/*
  2 + * Copyright (c) 2001 Stephen Williams (steve@icarus.com)
  3 + *
  4 + * This source code is free software; you can redistribute it
  5 + * and/or modify it in source code form under the terms of the GNU
  6 + * General Public License as published by the Free Software
  7 + * Foundation; either version 2 of the License, or (at your option)
  8 + * any later version.
  9 + *
  10 + * This program is distributed in the hope that it will be useful,
  11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13 + * GNU General Public License for more details.
  14 + *
  15 + * You should have received a copy of the GNU General Public License
  16 + * along with this program; if not, write to the Free Software
  17 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  18 + */
  19 +#if !defined(WINNT) && !defined(macintosh)
  20 +#ident "$Id: netmisc.cc,v 1.1 2001/02/11 02:15:52 steve Exp $"
  21 +#endif
  22 +
  23 +# include "netlist.h"
  24 +# include "netmisc.h"
  25 +# include "PExpr.h"
  26 +
  27 +
  28 +NetExpr* elab_and_eval(Design*des, NetScope*scope, const PExpr*pe)
  29 +{
  30 + NetExpr*tmp = pe->elaborate_expr(des, scope);
  31 + if (tmp == 0)
  32 + return 0;
  33 +
  34 + if (NetExpr*tmp2 = tmp->eval_tree()) {
  35 + delete tmp;
  36 + tmp = tmp2;
  37 + }
  38 +
  39 + return tmp;
  40 +}
  41 +
  42 +
  43 +/*
  44 + * $Log: netmisc.cc,v $
  45 + * Revision 1.1 2001/02/11 02:15:52 steve
  46 + * Add the netmisc.cc source file.
  47 + *
  48 + */
  49 +

0 comments on commit 1bae567

Please sign in to comment.
Something went wrong with that request. Please try again.