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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
/* file generated by oo2c -- do not edit */
#include "__oo2c.h"
#include "__libc.h"
#include "Channel.d"
static _ModId _mid;
Msg__Msg Channel__GetError(int code) {
register int i0;
i0 = (int)Channel__errorContext;
i0 = (int)Msg__New((Msg__Context)i0, (int)code);
return (void*)i0;
}
void Channel__ErrorContextDesc_GetTemplate(Channel__ErrorContext context, Msg__Msg msg, Msg__LString templ, int templ_0d) {
register int i0;
unsigned char str[128];
i0 = (int)msg + 8;
i0 = *(int*)i0;
if (!(i0<=0 || i0>=14)) goto l0;
(void)memcpy((void*) (int)str, (const void*) (int)_c0, 21);
goto l13;
l0:
if (!(i0==1)) goto l1;
(void)memcpy((void*) (int)str, (const void*) (int)_c1, 27);
goto l13;
l1:
if (!(i0==2)) goto l2;
(void)memcpy((void*) (int)str, (const void*) (int)_c2, 12);
goto l13;
l2:
if (!(i0==3)) goto l3;
(void)memcpy((void*) (int)str, (const void*) (int)_c3, 24);
goto l13;
l3:
if (!(i0==4)) goto l4;
(void)memcpy((void*) (int)str, (const void*) (int)_c4, 31);
goto l13;
l4:
if (!(i0==5)) goto l5;
(void)memcpy((void*) (int)str, (const void*) (int)_c5, 40);
goto l13;
l5:
if (!(i0==6)) goto l6;
(void)memcpy((void*) (int)str, (const void*) (int)_c6, 24);
goto l13;
l6:
if (!(i0==7)) goto l7;
(void)memcpy((void*) (int)str, (const void*) (int)_c7, 11);
goto l13;
l7:
if (!(i0==8)) goto l8;
(void)memcpy((void*) (int)str, (const void*) (int)_c8, 35);
goto l13;
l8:
if (!(i0==9)) goto l9;
(void)memcpy((void*) (int)str, (const void*) (int)_c9, 31);
goto l13;
l9:
if (!(i0==10)) goto l10;
(void)memcpy((void*) (int)str, (const void*) (int)_c10, 32);
goto l13;
l10:
if (!(i0==11)) goto l11;
(void)memcpy((void*) (int)str, (const void*) (int)_c11, 32);
goto l13;
l11:
if (!(i0==12)) goto l12;
(void)memcpy((void*) (int)str, (const void*) (int)_c12, 31);
goto l13;
l12:
if (!(i0==13)) goto l13;
(void)memcpy((void*) (int)str, (const void*) (int)_c13, 48);
l13:
_string_copy2l((int)templ, (int)str, templ_0d);
}
int Channel__ReaderDesc_Pos(Channel__Reader r) {
}
int Channel__ReaderDesc_Available(Channel__Reader r) {
}
void Channel__ReaderDesc_SetPos(Channel__Reader r, int newPos) {
}
void Channel__ReaderDesc_ReadByte(Channel__Reader r, unsigned char *x) {
}
void Channel__ReaderDesc_ReadBytes(Channel__Reader r, unsigned char* x, int x_0d, int start, int n) {
}
void Channel__ReaderDesc_ClearError(Channel__Reader r) {
register int i0;
i0 = (int)r + 4;
*(void**)i0 = (void*)0;
}
int Channel__WriterDesc_Pos(Channel__Writer w) {
}
void Channel__WriterDesc_SetPos(Channel__Writer w, int newPos) {
}
void Channel__WriterDesc_WriteByte(Channel__Writer w, unsigned char x) {
}
void Channel__WriterDesc_WriteBytes(Channel__Writer w, unsigned char* x, int x_0d, int start, int n) {
}
void Channel__WriterDesc_ClearError(Channel__Writer w) {
register int i0;
i0 = (int)w + 4;
*(void**)i0 = (void*)0;
}
int Channel__ChannelDesc_Length(Channel__Channel ch) {
}
void Channel__ChannelDesc_GetModTime(Channel__Channel ch, Time__TimeStamp *mtime, _Type mtime__tag) {
}
Channel__Reader Channel__ChannelDesc_NewReader(Channel__Channel ch) {
register int i0;
i0 = (int)ch + 6;
i0 = *(unsigned char*)i0;
if (i0) goto l0;
i0 = (int)Channel__GetError((int)6);
*(void**)(int)ch = (void*)i0;
goto l1;
l0:
i0 = (int)Channel__GetError((int)9);
*(void**)(int)ch = (void*)i0;
l1:
return (int)0;
}
Channel__Writer Channel__ChannelDesc_NewWriter(Channel__Channel ch) {
register int i0;
i0 = (int)ch + 6;
i0 = *(unsigned char*)i0;
if (i0) goto l0;
i0 = (int)Channel__GetError((int)6);
*(void**)(int)ch = (void*)i0;
goto l1;
l0:
i0 = (int)Channel__GetError((int)10);
*(void**)(int)ch = (void*)i0;
l1:
return (int)0;
}
void Channel__ChannelDesc_Flush(Channel__Channel ch) {
}
void Channel__ChannelDesc_Close(Channel__Channel ch) {
}
void Channel__ChannelDesc_ClearError(Channel__Channel ch) {
*(void**)(int)ch = (void*)0;
}
void Channel_init(void) {
register int i0;
_mid = _register_module(&Channel_md.md, &Channel__ErrorContextDesc_td.td);
{
char *_mem, *_var;
_mem = GC_malloc(4+8);
if (!_mem) _new_failed(_P(24095));
_var = _mem+8;
((_Type*)_var)[-1] = &Channel__ErrorContextDesc_td.td;
i0 = (int)_var;
}
Msg__InitContext((Msg__Context)i0, (const Msg__String)(int)_c14, 17);
Channel__errorContext = (void*)i0;
}
|