|
|
1.1 ! root 1: #include <pads.pri> ! 2: SRCFILE("padrcv.c") ! 3: ! 4: void PadRcv::invalidate() ! 5: { ! 6: static short uniq; ! 7: ! 8: magic = 0; ! 9: oid = ++uniq; ! 10: } ! 11: ! 12: #define MAGIC (('P'<<8)|'R') ! 13: PadRcv::PadRcv() ! 14: { ! 15: invalidate(); ! 16: magic = MAGIC; ! 17: } ! 18: ! 19: int PadRcv::isvalid() { return magic == MAGIC; } ! 20: ! 21: PadRcv::~PadRcv() { invalidate(); } ! 22: ! 23: char *PadRcv::help() ! 24: { ! 25: trace("%d.help()", this); ! 26: return "Sorry - no help. Complain to application programmer."; ! 27: } ! 28: ! 29: void MissingVirtual(char *s, char *f) ! 30: { ! 31: char t[128]; ! 32: trace("MissingVirtual(%s,%s)", s, f); ! 33: sprintf(t, "%s object does not define %s()", s, f); ! 34: PadsWarn(t); ! 35: } ! 36: ! 37: char *PadRcv::kbd(char*s) { return "no kbd() function"; } ! 38: ! 39: void PadRcv::numeric(long n) { MissingVirtual("NumericRange()", "numeric"); } ! 40: ! 41: void PadRcv::userclose() { MissingVirtual("USERCLOSE", "userclose"); } ! 42: ! 43: void PadRcv::usercut() { MissingVirtual("USERCUT", "usercut"); } ! 44: ! 45: void PadRcv::cycle() { MissingVirtual("alarm()", "cycle"); } ! 46: ! 47: void PadRcv::linereq(long, Attrib) { MissingVirtual("lines()", "linereq"); } ! 48: ! 49: int PadRcv::accept(Action a) { trace("%d.accept(%d)", this, a); return 0;} ! 50: ! 51: int PadRcv::disc() { trace("%d.disc()", this); return 0; }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.