Functions

options.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <candl/candl.h>
#include <candl/options.h>
Include dependency graph for options.c:

Functions

void candl_options_print (FILE *foo, CandlOptions *options)
void candl_options_free (CandlOptions *options)
CandlOptionscandl_options_malloc (void)
void candl_options_help ()
void candl_options_version ()
void candl_options_set (int *option, int argc, char **argv, int *number)
void candl_options_read (int argc, char **argv, FILE **input, FILE **output, CandlOptions **options)

Function Documentation

void candl_options_free ( CandlOptions options  ) 

candl_options_free function: This function frees the allocated memory for a CandlOptions structure. April 19th 2003: first version.

Referenced by candl_dependence_prune_with_privatization(), candl_dependence_scalar_is_privatizable_at(), and main().

void candl_options_help (  ) 

candl_options_help function: This function displays the quick help when the user set the option -help while calling candl. Prints are cutted to respect the 509 characters limitation of the ISO C 89 compilers. August 5th 2002: first version.

References CANDL_SUPPORTS_SCOPLIB.

Referenced by candl_options_read().

CandlOptions* candl_options_malloc ( void   ) 
void candl_options_print ( FILE *  foo,
CandlOptions options 
)

------ ( ----------------------------------------------------------** )\ CAnDL ** ----- / ) --------------------------------------------------------** ( * ( options.c ** ---- #/ --------------------------------------------------------** .-"#'-. First version: september 8th 2003 ** --- |"-.-"| -------------------------------------------------------** | | | | | | ************************************************************* CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *

* Copyright (C) 2003 Cedric Bastoul * * This 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 software 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 software; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * CAnDL, the Chunky Dependence Analyser * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * * candl_option_print function: This function prints the content of a CandlOptions structure (program) into a file (foo, possibly stdout). April 19th 2003: first version.

void candl_options_read ( int  argc,
char **  argv,
FILE **  input,
FILE **  output,
CandlOptions **  options 
)

candl_options_read function: This functions reads all the options and the input/output files thanks the the user's calling line elements (in argc). It fills a CandlOptions structure and the FILE structure corresponding to input and output files. August 5th 2002: first version. April 19th 2003: now in options.c and support of the CandlOptions structure.

References candl_options_help(), candl_options_malloc(), candl_options_set(), and candl_options_version().

Referenced by main().

void candl_options_set ( int *  option,
int  argc,
char **  argv,
int *  number 
)

candl_options_set function: This function sets the value of an option thanks to the user's calling line.

  • option is the value to set,
  • argc are the elements of the user's calling line,
  • number is the number of the element corresponding to the considered option, this function adds 1 to number to pass away the option value. August 5th 2002: first version. June 29th 2003: (debug) lack of argument now detected.

Referenced by candl_options_read().

void candl_options_version (  ) 

candl_options_version function: This function displays some version informations when the user set the option -version while calling candl. Prints are cutted to respect the 509 characters limitation of the ISO C 89 compilers. August 5th 2002: first version.

References CANDL_RELEASE, and CANDL_VERSION.

Referenced by candl_options_read().