Logo Search packages:      
Sourcecode: hat version File versions

for_foreign_imports.h

#include <sys/types.h>
#include <unistd.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <signal.h>
#include "art.h"
#include "artutils.h"
#include "pathutils.h"
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include "pathutils.h"
#include "art.h"
#include "artutils.h"
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include "art.h"
#include "artutils.h"

/* artutils.c */
void initialise(int argc, char **argv);
void finalise(void);
FILE *openFile(char *base, char *ext);
int sizeFile(char *base, char *ext);
int freadAt(FileOffset fo, void *ptr, int size, int nmemb, FILE *stream);
int q_fread(void *buf, int siz, int num, FILE *file);
FileOffset readFO(void);
FileOffset q_readFO(void);
char *readString(void);
char *q_readString(void);
char q_peek(void);
void readModuleAt(FileOffset fo, char **modname, char **srcname, bool *traced);
Ident *readAtomAt(FileOffset fo);
SrcRef *readSRAt(FileOffset fo);
Ident *readValueAt(FileOffset fo);
void q_skipNode(char tag);
FileOffset readTraceAt(FileOffset fo, char **expr, SrcRef **sr, int *infix, int followHidden, int depth);
char *infixPrint(char *str1, int arg1, char *strfn, int fn, char *str2, int arg2);
void openHatFile(char *prog, char *arg);
FileOffset getBridgeValue(void);
FileOffset getErrorLoc(void);
char *errorMessage(void);
char *versionNumber(void);
int getNodeType(FileOffset fo);
FileOffset parentNode(FileOffset fo);
char *getNm(FileOffset fo);
char *getNmMod(FileOffset fo);
int getFixity(FileOffset fo);
bool isLiteral(FileOffset fo);
bool isConstructor(FileOffset fo);
bool isConstrFields(FileOffset fo);
bool isLambda(FileOffset fo);
char *identName(Ident *id);
char *identModName(Ident *id);
char *identSrcFile(Ident *id);
int identFixity(Ident *id);
int identArity(Ident *id);
int identDefnLine(Ident *id);
int identDefnCol(Ident *id);
bool identIsTraced(Ident *id);
int getExpArity(FileOffset fo);
FileOffset getExpArg(FileOffset fo, int n);
FileOffset getFieldLabel(FileOffset fo, int n);
FileOffset getSrcRef(FileOffset fo);
char *getSrcRefFile(FileOffset fo);
int srcRefLine(FileOffset fo);
int srcRefCol(FileOffset fo);
FileOffset getDefnRef(FileOffset fo);
char *getDefnFile(FileOffset fo);
int defnLine(FileOffset fo);
int defnCol(FileOffset fo);
FileOffset peekTrace(FileOffset fo);
FileOffset getResult(FileOffset fo, bool stopAtHidden);
FileOffset getResultNoCycle(FileOffset fo, bool stopAtHidden);
FileOffset peekResult(FileOffset fo);
int fileoffset_compare(FileOffset i, FileOffset j);
void ctrlC(int sig);
/* hat-names.c */
typedef enum {
    TopId, LocalId, Construct
} idkind;
typedef struct {
    char* name;
    FileOffset thispos;
    idkind kind;
    unsigned char arity;
    int uses;           /* number of evaluated applications */
    int pending;  /* number of entered but unevaluated applications */
    int thunks;         /* number of applications never demanded */
} item;
struct _defn {
    FileOffset atom;
    unsigned char arity;
    struct _defn *next;
};
typedef struct _defn defn;
FileOffset itemIdent(item *i);
int itemArity(item *i);
int itemUses(item *i);
int itemPending(item *i);
int itemThunks(item *i);
item *getItemPtr(item **arr, int n);
item **getGlobals(void);
item **getLocals(void);
item **getConstrs(void);
int getGlobalsN(void);
int getLocalsN(void);
int getConstrsN(void);
void map1_insert(FileOffset node, char *id, idkind k, unsigned char arity);
defn *map2_insert(FileOffset usage, FileOffset def, unsigned char ap);
int item_flatten(FileOffset node, item *it, void *dummy);
void collateIdents(void);
void q_oneNode(void);
void countCAFResult(FileOffset caf, FileOffset value, defn *def, unsigned char arity, FileOffset mostRecentHidden);
/* observeutils.c */
void insert_mapAtom2Info(FileOffset atom, char *var, unsigned char arity);
void setObserveContext(bool hascontext, bool rec, int arity, char *caller);
FileOffset lookForFirstApp(char *callee);
FileOffset lookForFirstSrc(int line, int col, char *module);
FileOffset nextObservation(FileOffset seen);
FileOffset varSearch(void);
FileOffset srcSearch(void);
void searchCAFResult(FileOffset caf, FileOffset value, unsigned char arity, FileOffset mostRecentHidden);

Generated by  Doxygen 1.6.0   Back to index