Logo Search packages:      
Sourcecode: cernlib version File versions


/* Dummy file to avoid undefined symbols in the library */
/* Kevin McCarty, 14 Jan 2003 */
/* Last revised 5 December 2005 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* Want the dummy functions to be weakly defined so they may be overridden
 * without error. */

#define kludge(x)    #x
#define stringify(x) kludge(x)
#define underline(x) __ ## x

#define DUMMY(domain, UPPERNAME, fortranname_, returntype) \
static returntype underline(fortranname_)() {print_dummy(#domain,#UPPERNAME);} \
void fortranname_() \
      __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))

static void print_dummy(const char *domain, const char *function)
  fprintf(stderr, "Geant321: Now in dummy %s routine.\n", function);
"If you see this message, you are presumably trying to call (possibly\n"
"indirectly) the %s routine");

  if (strcmp(domain, "Jetset") == 0)
" in the Jetset library.\n"
"To obtain the Jetset library, please see the file\n"

  else if (strcmp(domain, "Fluka") == 0)
" in the Fluka library.\n"
"Fluka is unfortunately not available in Debian for licensing reasons;\n"
"please see the file /usr/share/doc/geant321/README.Debian for details.\n");
  else if (strcmp(domain, "User") == 0)
    fprintf(stderr, ".  This routine is not built into Geant;\n"
"you must write code for it yourself.  Please see the documentation\n"
"(for instance in the geant321-doc package).\n");

DUMMY(Jetset, LU1ENT, lu1ent_, void);
DUMMY(Jetset, LUCOMP, lucomp_, int);
DUMMY(Jetset, LUEEVT, lueevt_, void);
DUMMY(Jetset, LUEXEC, luexec_, void);

DUMMY(Fluka, DOST,   dost_,   double);
DUMMY(Fluka, EEXLVL, eexlvl_, void);
DUMMY(Fluka, EVENTV, eventv_, void);
DUMMY(Fluka, EVEVAP, evevap_, void);
DUMMY(Fluka, EVVINI, evvini_, void);
DUMMY(Fluka, FKENER, fkener_, double);
DUMMY(Fluka, FKZERO, fkzero_, void);
DUMMY(Fluka, NIZLNW, nizlnw_, void);
DUMMY(Fluka, NUCREL, nucrel_, void);
DUMMY(Fluka, RACO,   raco_,   void);
DUMMY(Fluka, SAMCST, samcst_, void);
DUMMY(Fluka, SIGEL,  sigel_,  void);
DUMMY(Fluka, SITSAO, sitsao_, double);

DUMMY(User, UGINIT, uginit_, void);
DUMMY(User, UGLAST, uglast_, void);

/* The following dummy functions are added due to the removal
 * of the corresponding code from Geant (it is also part of FLUKA).
 * We are constrained to keep the ABI for the dynamic library, so
 * these dummy functions must be kept until next time the libgeant321
 * soversion is changed. */

#define DUMMY2(domain, UPPERNAME, fortranname_, returntype) \
 returntype fortranname_() {print_dummy(#domain,#UPPERNAME);}

/* From src/geant321/fiface */
DUMMY2(Fluka, FLDIST, fldist_, void);
DUMMY2(Fluka, FLINIT, flinit_, void);
DUMMY2(Fluka, FLUFIN, flufin_, void);

/* From src/geant321/miface */
DUMMY2(Fluka, GFMFIN, gfmfin_, void);
DUMMY2(Fluka, GFMDIS, gfmdis_, void);

/* From src/geant321/block */
DUMMY2(Fluka, FDEVAP, fdevap_, void);
DUMMY2(Fluka, FDNOPT, fdnopt_, void);
DUMMY2(Fluka, FDPREE, fdpree_, void);
DUMMY2(Fluka, FLKDT1, flkdt1_, void);
DUMMY2(Fluka, FLKDT2, flkdt2_, void);
DUMMY2(Fluka, FLKDT3, flkdt3_, void);
DUMMY2(Fluka, FLKDT4, flkdt4_, void);
DUMMY2(Fluka, FLKDT5, flkdt5_, void);
DUMMY2(Fluka, FLKDT6, flkdt6_, void);
DUMMY2(Fluka, FLKDT7, flkdt7_, void);

/* From src/geant321/peanut */
DUMMY2(Fluka, BIMNXT, bimnxt_, void);   /* alternate entry to BIMSEL */
DUMMY2(Fluka, BIMSEL, bimsel_, void);
DUMMY2(Fluka, COSLEG, cosleg_, double);
DUMMY2(Fluka, FEKFNC, fekfnc_, double);
DUMMY2(Fluka, FPFRNC, fpfrnc_, double);
DUMMY2(Fluka, FRADNC, fradnc_, double);
DUMMY2(Fluka, FRHINC, frhinc_, double);
DUMMY2(Fluka, FRHONC, frhonc_, double);
DUMMY2(Fluka, NCLVFX, nclvfx_, double); /* alternate entry to PFNCLV */
DUMMY2(Fluka, NCLVIN, nclvin_, void);
DUMMY2(Fluka, NCLVST, nclvst_, void);
DUMMY2(Fluka, NUCNUC, nucnuc_, void);
DUMMY2(Fluka, NWINXT, nwinxt_, void);   /* alternate entry to NWISEL */
DUMMY2(Fluka, NWISEL, nwisel_, void);
DUMMY2(Fluka, PEANUT, peanut_, void);
DUMMY2(Fluka, PFNCLV, pfnclv_, double);
DUMMY2(Fluka, PHDSET, phdset_, void);
DUMMY2(Fluka, PHDWLL, phdwll_, void);
DUMMY2(Fluka, PIOABS, pioabs_, void);
DUMMY2(Fluka, PREPRE, prepre_, void);
DUMMY2(Fluka, RSCOMP, rscomp_, void);   /* alternate entry to SBCOMP */
DUMMY2(Fluka, RSTNXT, rstnxt_, void);   /* alternate entry to RSTSEL */
DUMMY2(Fluka, RSTSEL, rstsel_, void);
DUMMY2(Fluka, SBCOMP, sbcomp_, void);
DUMMY2(Fluka, SIGFER, sigfer_, void);
DUMMY2(Fluka, UMOFIN, umofin_, void);
DUMMY2(Fluka, XINNEU, xinneu_, double);
DUMMY2(Fluka, XINPRO, xinpro_, double);

/* The following dummy common blocks are added for the same reason.
 * The number of bytes required was determined by inspecting the existing
 * shared libraries in the 12 official Debian architectures and determining
 * the maximum size of each common block there. */

#define COMMON(fortranname_, size) \
      struct { char c[size]; } fortranname_ = { { 0, } }

COMMON(fkadhn_, 1376);
COMMON(fkadhp_, 3712);
COMMON(fkbala_,  288);
COMMON(fkcd97_, 1152);
COMMON(fkchpa_, 1472);
COMMON(fkchpr_,  576);
COMMON(fkcmcy_,  176);
COMMON(fkcomc_, 7424);
COMMON(fkcosp_,   64);
COMMON(fkdech_, 4328);
COMMON(fkenco_,   16);
COMMON(fkhadf_,  352);
COMMON(fkheac_,   96);
COMMON(fkheav_, 5408);
COMMON(fkhet7_,   64);
COMMON(fkhetp_,   32);
COMMON(fkhigf_, 1632);
COMMON(fkidgb_,   16);
COMMON(fkinpf_,   32);
COMMON(fkmapa_, 5824);
COMMON(fknegx_,  128);
COMMON(fknuct_,   16);
COMMON(fknuda_, 1248);
COMMON(fknuge_, 1120);
COMMON(fknuii_, 1888);
COMMON(fknupw_,   32);
COMMON(fkpapr_, 2400);
COMMON(fkpare_,  256);
COMMON(fkparn_, 7296);
COMMON(fkpart_, 9696);
COMMON(fkploc_, 2864);
COMMON(fkquar_,  832);
COMMON(fkredv_, 2368);
COMMON(fkresn_,  256);
COMMON(fkrun_,    32);
COMMON(fkslop_,  608);

Generated by  Doxygen 1.6.0   Back to index