ftp.nice.ch/users/chris/Studium/psopt-0.01.tar.gz#/psopt-0.01/src/psopt.c

This is psopt.c in view mode; [Download] [Up]

/* -*-C-*-
 ******************************************************************************
 *
 * File:         psopt.c
 * RCS:          $Header: /home/chris/Psopt/cvs/psopt/src/psopt.c,v 1.6 1997/08/25 20:58:23 chris Exp $
 * Description:  
 * Author:       Christian Limpach <chris@nice.ch>
 * Created:      Thu Jun 19 00:47:31 1997
 * Modified:     Mon Aug 25 14:13:00 1997 (Christian Limpach) chris@nice.ch
 * Language:     C
 * Package:      N/A
 * Status:       Experimental (Do Not Distribute)
 *
 * (C) Copyright 1997, Christian Limpach, all rights reserved.
 *            
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *            
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *            
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, a copy can be obtained from this
 * program's author (send electronic mail to chris@nice.ch) or from
 * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
 * 02139, USA.
 *
 ******************************************************************************
 */

#include "psopt.h"

Code *code_head;
Code *code_tail;

void
add_code (type, d)
     enum code_type type;
     void *d;
{
  Code *c = (Code *)malloc (sizeof (Code));

  c->type = type;
  c->d = d;
  c->next = NULL;
  code_tail->next = c;
  code_tail = c;
}

void
code_init ()
{
  code_head = (Code *)malloc (sizeof (Code));
  code_head->type = START;
  code_head->next = NULL;
  code_tail = code_head;
}

main ()
{
  code_init ();
  ps_ops_init ();
  identifiers_init ();
  yylex ();
  fold_identifiers ();
  output (code_head);
  identifier_histogramm ();
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.