/usr/include/singular/singular/Singular/blackbox.h is in libsingular4-dev-common 1:4.1.0-p3+ds-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | #ifndef BLACKBOX_H
#define BLACKBOX_H
#include <kernel/mod2.h>
#include <omalloc/omalloc.h>
#include <kernel/structs.h>
#include <Singular/lists.h>
#include <Singular/links/silink.h>
void removeBlackboxStuff(const int rt);
struct blackbox_struct;
typedef struct blackbox_struct blackbox;
struct blackbox_struct
{
/// destroy the object: b points to blackbox_struct, d to data
void (*blackbox_destroy)(blackbox *b, void *d);
/// convert the object to a string (which should be freed by omFree)
char *(*blackbox_String)(blackbox *b,void *d);
/// print the object: default: use string representation
void (*blackbox_Print)(blackbox *b,void *d);
/// construct the default object
void *(*blackbox_Init)(blackbox *b);
/// copy the object: b points to blackbox_struct, d to data
void *(*blackbox_Copy)(blackbox *b,void *d);
/// interpreter assign: l:=r
BOOLEAN (*blackbox_Assign)(leftv l, leftv r);
/// interpreter: unary operations op(r), r(), ...
// convention for blackbox_Op1..blackbox_OpM:
// return FALSE, if op was successfully performed
// return TRUE (and an error message) for failure
// return TRUE (and no error message) if not defined
BOOLEAN (*blackbox_Op1)(int op,leftv l, leftv r);
/// interpreter: binary operations: op(r1,r2), r1 op r2,...
BOOLEAN (*blackbox_Op2)(int op,leftv l, leftv r1,leftv r2);
/// interpreter: tertiary op: op(r1,r2,r3)
BOOLEAN (*blackbox_Op3)(int op,leftv l, leftv r1,leftv r2, leftv r3);
/// interpreter: operations with undefined number of operands
BOOLEAN (*blackbox_OpM)(int op,leftv l, leftv r);
/// is an assign of r to l (part of b) impossible?
BOOLEAN (*blackbox_CheckAssign)(blackbox *b,leftv l, leftv r);
/// serialize
BOOLEAN (*blackbox_serialize)(blackbox *b,void *d, si_link f);
/// deserialize
BOOLEAN (*blackbox_deserialize)(blackbox **b,void **d, si_link f);
/// additional type info
void *data;
/// addtinional gneral properties
int properties; // bit 0:blackbox is only a wrapper for lists
#define BB_LIKE_LIST(B) ((B)->properties &1)
} ;
/// default procedure blackboxDefaultOp1, to be called as "default:" branch
BOOLEAN blackboxDefaultOp1(int op,leftv l, leftv r);
/// default procedure blackboxDefaultOp2, to be called as "default:" branch
BOOLEAN blackboxDefaultOp2(int op,leftv l, leftv r1, leftv r2);
/// default procedure blackboxDefaultOp3, to be called as "default:" branch
BOOLEAN blackboxDefaultOp3(int op,leftv l, leftv r1,leftv r2, leftv r3);
/// default procedure blackboxDefaultOpM, to be called as "default:" branch
BOOLEAN blackboxDefaultOpM(int op,leftv l, leftv r);
/// default procedure blackbox_default_Print: print the string
void blackbox_default_Print(blackbox *b,void *d);
/// return the structure to the type given by t
blackbox* getBlackboxStuff(const int t);
/// return the name to the type given by t (r/o)
const char * getBlackboxName(const int t);
/// used by scanner: returns ROOT_DECL for known types
/// (and the type number in @c tok)
int blackboxIsCmd(const char *n, int & tok);
/// define a new type
int setBlackboxStuff(blackbox *bb,const char *name);
/// list all defined type (for debugging)
void printBlackboxTypes();
#endif
|