#line 1 "local.c"
local void processBOOL(void *p,object arg){}
local void processFINDEX_INFO_LEVELS(void *p,object arg){}
local void processFINDEX_SEARCH_OPS(void *p,object arg){}
local void processLPSTR(void *p,object arg){}
local void processLPWSTR(void *p,object arg){}
local void processPBITMAPINFO(void *p,object arg){}
local void processPINT(void *p,object arg){}
local void processPPOINT(void *p,object arg){}
local void processSTR_P(void *p,object arg){}
local void processWSTR_P(void *p,object arg){}
local void outputCOLORADJUSTMENT(COLORADJUSTMENT *p, object arg){}
local void outputXFORM(XFORM *p, object arg){}
local void processABC(ABC *p, object arg){}
local void processPBYTE(BYTE *p, object arg){}
local void processBYTE(BYTE *p, object arg){}
local void processABCFLOAT(ABCFLOAT *p, object arg){}
local void processENHMETAHEADER(void *p, object arg){}
local void processFONTSIGNATURE(void *p, object arg){}
local void processKERNINGPAIR(void *p, object arg){}
local void processOUTLINETEXTMETRICA(void *p, object arg){}
local void processOUTLINETEXTMETRICW(void *p, object arg){}
local void processRASTERIZER_STATUS(void *p, object arg){}
local void processRGBQUAD(RGBQUAD *p, object arg){}
local void processTEXTMETRICW(TEXTMETRICW*p, object arg){}
local void outputGLYPHMETRICS(GLYPHMETRICS* p, object arg){}
local void processGCP_RESULTSA(GCP_RESULTSA* p, object arg){}
local void processGCP_RESULTSW(GCP_RESULTSW* p, object arg){}
local void processHANDLETABLE_C(HANDLETABLE* p, object arg, unsigned int count){}
local void processLOGCOLORSPACEA(LOGCOLORSPACEA* p, object arg){}
local void processLOGCOLORSPACEW(LOGCOLORSPACEW* p, object arg){}
local void processMETARECORD(METARECORD* p, object arg){}
local void processPOLYTEXTW(POLYTEXTW* p, object arg){}
local void processSIZE(SIZE* p, object arg){}
local void processvoid(void* p, object arg){}

local void processABORTPROC(ABORTPROC *p,object arg){}
local void processBITMAPINFO(BITMAPINFO *p,object arg){}
local void processBITMAPINFOHEADER(BITMAPINFOHEADER *p,object arg){}
local void processDEVMODEA(DEVMODEA *p,object arg){}
local void processDEVMODEW(DEVMODEW *p,object arg){}
local void processDOCINFOA(DOCINFOA *p,object arg){}
local void processDOCINFOW(DOCINFOW *p,object arg){}
local void processENHMETARECORD(ENHMETARECORD *p,object arg){}
local void processENHMFENUMPROC(ENHMFENUMPROC *p,object arg){}
local void processFONTENUMPROCA(FONTENUMPROCA *p,object arg){}
local void processFONTENUMPROCW(FONTENUMPROCW *p,object arg){}
local void processGLYPHMETRICS(GLYPHMETRICS *p,object arg){}
local void processGOBJENUMPROC(GOBJENUMPROC *p,object arg){}
local void processICMENUMPROCA(ICMENUMPROCA *p,object arg){}
local void processICMENUMPROCW(ICMENUMPROCW *p,object arg){}
local void processLINEDDAPROC(LINEDDAPROC *p,object arg){}
local void processLOGPALETTE(LOGPALETTE *p,object arg){}
local void processLOGPEN(LOGPEN *p,object arg){}
local void processLPABC(LPABC *p,object arg){}
local void processLPABCFLOAT(LPABCFLOAT *p,object arg){}
local void processLPBITMAPINFO(LPBITMAPINFO *p,object arg){}
local void processLPCHARSETINFO(LPCHARSETINFO *p,object arg){}
local void processLPCOLORADJUSTMENT(LPCOLORADJUSTMENT *p,object arg){}
local void processLPCRECT(LPCRECT *p,object arg){}
local void processLPENHMETAHEADER(LPENHMETAHEADER *p,object arg){}
local void processLPFONTSIGNATURE(LPFONTSIGNATURE *p,object arg){}
local void processLPGCP_RESULTSA(LPGCP_RESULTSA *p,object arg){}
local void processLPGCP_RESULTSW(LPGCP_RESULTSW *p,object arg){}
local void processLPHANDLETABLE(LPHANDLETABLE *p,object arg){}
local void processLPINT(LPINT *p,object arg){}
local void processLPKERNINGPAIR(LPKERNINGPAIR *p,object arg){}
local void processLPLOGCOLORSPACEA(LPLOGCOLORSPACEA *p,object arg){}
local void processLPLOGCOLORSPACEW(LPLOGCOLORSPACEW *p,object arg){}
local void processLPMETARECORD(LPMETARECORD *p,object arg){}
local void processLPOUTLINETEXTMETRICA(LPOUTLINETEXTMETRICA *p,object arg){}
local void processLPOUTLINETEXTMETRICW(LPOUTLINETEXTMETRICW *p,object arg){}
local void processLPPALETTEENTRY(LPPALETTEENTRY *p,object arg){}
local void processLPPIXELFORMATDESCRIPTOR(LPPIXELFORMATDESCRIPTOR *p,object arg){}
local void processLPPOINT(LPPOINT *p,object arg){}
local void processLPRASTERIZER_STATUS(LPRASTERIZER_STATUS *p,object arg){}
local void processLPRECT(LPRECT *p,object arg){}
local void processLPSIZE(LPSIZE *p,object arg){}
local void processLPTEXTMETRICA(LPTEXTMETRICA *p,object arg){}
local void processLPTEXTMETRICW(LPTEXTMETRICW *p,object arg){}
//local void processLPXFORM(LPXFORM *p,object arg){}
local void processMFENUMPROC(MFENUMPROC *p,object arg){}
local void processPFLOAT(PFLOAT *p,object arg){}
local void processRGNDATA(RGNDATA *p,object arg){}
local void processRGNDATA_C(RGNDATA *p,object arg, int count){}

local void processICONINFO(ICONINFO *p,object arg)
{
   int i = 1;
   p->fIcon = nullp(TheRecord(arg)->recdata[i++]);
   p->xHotspot = I_to_L(TheRecord(arg)->recdata[i++]);
   p->yHotspot = I_to_L(TheRecord(arg)->recdata[i++]);
   p->hbmMask = TheFpointer(TheRecord(arg)->recdata[i++])->fp_pointer;
   p->hbmColor = TheFpointer(TheRecord(arg)->recdata[i++])->fp_pointer;
}
local void processLOGFONTA(LOGFONTA *p,object arg)
{
   int i = 1;
   p->lfHeight = I_to_L(TheRecord(arg)->recdata[i++]);
   p->lfWidth = I_to_L(TheRecord(arg)->recdata[i++]);
   p->lfEscapement = I_to_L(TheRecord(arg)->recdata[i++]);
   p->lfOrientation = I_to_L(TheRecord(arg)->recdata[i++]);
   p->lfWeight = I_to_L(TheRecord(arg)->recdata[i++]);
   p->lfItalic = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->lfUnderline = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->lfStrikeOut = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->lfCharSet = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->lfOutPrecision = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->lfClipPrecision = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->lfQuality = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->lfPitchAndFamily = I_to_uint8(TheRecord(arg)->recdata[i++]);
   strncpy(p->lfFaceName,
      TheAsciz(string_to_asciz(TheRecord(arg)->recdata[i++],encoding)),
      sizeof(p->lfFaceName));
}
local void processLOGFONTW(LOGFONTW *p,object arg){}
local void outputRECT(object p, RECT *r)
{
  int i = 0;
  object num;
  pushSTACK(p); // Push the record to keep it safe from gc
  num = UL_to_I(r->left); // Can cause gc
  TheRecord(STACK_0)->recdata[i++] = num;
  num = UL_to_I(r->top); // Can cause gc
  TheRecord(STACK_0)->recdata[i++] = num;
  num = UL_to_I(r->right); // Can cause gc
  TheRecord(STACK_0)->recdata[i++] = num;
  num = UL_to_I(r->bottom); // Can cause gc
  TheRecord(popSTACK())->recdata[i++] = num;
}
// untested - was never called
local void processPALETTEENTRY(PALETTEENTRY* p, object arg)
{
   int i = 0;
   p->peRed = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->peGreen = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->peBlue = I_to_uint8(TheRecord(arg)->recdata[i++]);
   p->peFlags = I_to_uint8(TheRecord(arg)->recdata[i++]);
}
// untested - was never called
local void processRGBQUAD_C(RGBQUAD* p, object args,DWORD length)
{
   int j;
   for(j = 0; j < length; j++,p++)
   {
      int i = 0;
      object arg = TheSvector(args)->data[j];
      p->rgbRed = I_to_uint8(TheRecord(arg)->recdata[i++]);
      p->rgbGreen = I_to_uint8(TheRecord(arg)->recdata[i++]);
      p->rgbBlue = I_to_uint8(TheRecord(arg)->recdata[i++]);
      p->rgbReserved = 0;
   }
}
local DWORD processCOLORREF(object arg)
{
    int i = 0;
    BYTE r = I_to_uint8(TheRecord(arg)->recdata[i++]);
    BYTE g = I_to_uint8(TheRecord(arg)->recdata[i++]);
    BYTE b = I_to_uint8(TheRecord(arg)->recdata[i++]);
    return RGB(r,g,b);
}
// untested - was never called
// uninspected - compiles but code was not checked
local void processXFORM(XFORM *p, object arg)
{
    int i = 0;
    p->eM11 = ffloat_value(TheRecord(arg)->recdata[i++]);
    p->eM12 = ffloat_value(TheRecord(arg)->recdata[i++]);
    p->eM21 = ffloat_value(TheRecord(arg)->recdata[i++]); 
    p->eM22 = ffloat_value(TheRecord(arg)->recdata[i++]); 
    p->eDx = ffloat_value(TheRecord(arg)->recdata[i++]); 
    p->eDy = ffloat_value(TheRecord(arg)->recdata[i++]);
}
// untested - was never called
// uninspected - compiles but code was not checked
local void outputLPSIZE(LPSIZE lpsize,object arg)
{
}
// untested - was never called
// uninspected - compiles but code was not checked
local void processPOINT(POINT* p, object arg)
{
   int i = 0;
   p->x = I_to_sint32(TheRecord(arg)->recdata[i++]);
   p->y = I_to_sint32(TheRecord(arg)->recdata[i++]);
}
// untested - was never called
// uninspected - compiles but code was not checked
local void processRECT(RECT* p, object arg)
{
  int i = 0;
  p->left = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->top = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->right = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->bottom = I_to_sint32(TheRecord(arg)->recdata[i++]);
}
local void processPOLYTEXTA(POLYTEXTA* p, object arg)
{
  int i = 0;
  p->x = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->y = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->n = I_to_uint32(TheRecord(arg)->recdata[i++]);
  p->lpstr = TheAsciz(TheRecord(arg)->recdata[i++]);
  p->uiFlags = I_to_uint32(TheRecord(arg)->recdata[i++]);
  processRECT(&p->rcl, TheRecord(arg)->recdata[i++]);
  p->pdx = I_to_sint32(TheRecord(arg)->recdata[i++]);
}
// untested - was never called
local void processCOLORADJUSTMENT(COLORADJUSTMENT *p, object arg)
{
   int i;
   WORD *w = (WORD*)p;
   SHORT *s = (SHORT*)p;
   for(i = 0; i < 8; i++)w[i]= I_to_uint16(TheRecord(arg)->recdata[i]);
   for(; i < 12; i++)s[i] = I_to_sint16(TheRecord(arg)->recdata[i]);
}
// untested - was never called
local void processPIXELFORMATDESCRIPTOR(PIXELFORMATDESCRIPTOR* p,object arg)
{
  int i = 0;
  p->nSize = I_to_uint16(TheRecord(arg)->recdata[i++]);
  p->nVersion = I_to_uint16(TheRecord(arg)->recdata[i++]);
  p->dwFlags = I_to_uint32(TheRecord(arg)->recdata[i++]);
  p->iPixelType = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cColorBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cRedBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cRedShift = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cGreenBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cGreenShift = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cBlueBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cBlueShift = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cAlphaBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cAlphaShift = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cAccumBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cAccumRedBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cAccumGreenBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cAccumBlueBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cAccumAlphaBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cDepthBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cStencilBits = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->cAuxBuffers = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->iLayerType = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->bReserved = I_to_uint8(TheRecord(arg)->recdata[i++]);
  p->dwLayerMask = I_to_uint32(TheRecord(arg)->recdata[i++]);
  p->dwVisibleMask = I_to_uint32(TheRecord(arg)->recdata[i++]);
  p->dwDamageMask = I_to_uint32(TheRecord(arg)->recdata[i++]);
}
// untested - was never called
// uninspected - compiles but code was not checked
// known not to work
local FIXED toFixed(float f)
{
  FIXED fixed;
  int i;
  fixed.value = (int)f;
  fixed.fract = (WORD)(10000*(f - i));
  return fixed;
}

local void processMAT2(MAT2 *p, object arg)
{
  int i = 0;
  p->eM11 = toFixed(ffloat_value(TheRecord(arg)->recdata[i++]));
  p->eM12 = toFixed(ffloat_value(TheRecord(arg)->recdata[i++]));
  p->eM21 = toFixed(ffloat_value(TheRecord(arg)->recdata[i++]));
  p->eM22 = toFixed(ffloat_value(TheRecord(arg)->recdata[i++]));
}
// untested - was never called
// uninspected - compiles but code was not checked
local void processBITMAP(BITMAP *p,object arg)
{
  int i = 0;
  p->bmType = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->bmWidth = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->bmHeight = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->bmWidthBytes = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->bmPlanes = I_to_uint16(TheRecord(arg)->recdata[i++]);
  p->bmBitsPixel = I_to_uint16(TheRecord(arg)->recdata[i++]);
  p->bmBits = &TheSbvector( TheRecord(arg)->recdata[i++])->data[0];
}
// untested - was never called
// uninspected - compiles but code was not checked
local void processLOGBRUSH(LOGBRUSH* p, object arg)
{
   int i = 0;
   p->lbStyle = I_to_uint32(TheRecord(arg)->recdata[i++]);
   p->lbColor = processCOLORREF(TheRecord(arg)->recdata[i++]);
   p->lbHatch = I_to_sint32(TheRecord(arg)->recdata[i++]);
}
// untested - was never called
// uninspected - compiles but code was not checked
local void processMETAFILEPICT(METAFILEPICT *p,object arg)
{
  int i = 0;
  p->mm = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->xExt = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->yExt = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->hMF = TheFpointer(TheRecord(arg)->recdata[i++])->fp_pointer;
}

local void processWNDCLASSA(WNDCLASSA *p, object arg)
{
  object s;
  int i = 1;
  p->style = I_to_uint32(TheRecord(arg)->recdata[i++]);
  p->lpfnWndProc  = WindowProc;
  p->cbClsExtra = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->cbWndExtra = I_to_sint32(TheRecord(arg)->recdata[i++]);
  p->hInstance = TheFpointer(TheRecord(arg)->recdata[i++])->fp_pointer;
  s = TheRecord(arg)->recdata[i++];
  p->hIcon = nullp(s)?0:TheFpointer(s)->fp_pointer;
  p->hCursor = TheFpointer(TheRecord(arg)->recdata[i++])->fp_pointer;
  p->hbrBackground = TheFpointer(TheRecord(arg)->recdata[i++])->fp_pointer;
  s = TheRecord(arg)->recdata[i++];
  if(nullp(s))
  {
     p->lpszMenuName = NULL;
  }
  else if(stringp(s))
  {
     p->lpszMenuName = TheAsciz(string_to_asciz(s,encoding));
  }
  else if(fpointerp(s))
  {
     p->lpszMenuName = TheFpointer(s)->fp_pointer;
  }
  else argumentum_inritum(s);
  s = TheRecord(arg)->recdata[i++];
  p->lpszClassName = stringp(s)?
       TheAsciz(string_to_asciz(s,encoding)):
       TheFpointer(s)->fp_pointer;
}

local void processWNDCLASSW(WNDCLASSW *p, object arg){}

local void processCREATESTRUCTA(CREATESTRUCT *p, object arg)
{
  object s;
  int i = 1;
  p->dwExStyle = I_to_uint32(TheRecord(arg)->recdata[i++]);
  s = TheRecord(arg)->recdata[i++];
  p->lpszClass = stringp(s)?
       TheAsciz(string_to_asciz(s,encoding)):
       TheFpointer(s)->fp_pointer;
  p->lpszName = TheAsciz(string_to_asciz(TheRecord(arg)->recdata[i++],encoding));
  p->style = I_to_uint32(TheRecord(arg)->recdata[i++]);
  p->x = I_to_L(TheRecord(arg)->recdata[i++]);
  p->y = I_to_L(TheRecord(arg)->recdata[i++]);
  p->cx = I_to_L(TheRecord(arg)->recdata[i++]);
  p->cy = I_to_L(TheRecord(arg)->recdata[i++]);
  s = TheRecord(arg)->recdata[i++];
  p->hwndParent = nullp(s)?0:TheFpointer(s)->fp_pointer;
  s = TheRecord(arg)->recdata[i++];
  p->hMenu = nullp(s)?0:TheFpointer(s)->fp_pointer;
  s = TheRecord(arg)->recdata[i++];
  p->hInstance = nullp(s)?0:TheFpointer(s)->fp_pointer;
  p->lpCreateParams = 0;  //= I_to_uint8(TheRecord(arg)->recdata[i++]);
}
local void outputCREATESTRUCTA(CREATESTRUCT *p, object arg)
{
  int i = 1;
  pushSTACK(arg);
  TheRecord(STACK_0)->recdata[i++] = UL_to_I(p->dwExStyle);
  TheRecord(STACK_0)->recdata[i++] = asciz_to_string(p->lpszClass,encoding);
  TheRecord(STACK_0)->recdata[i++] = asciz_to_string(p->lpszName,encoding);
  TheRecord(STACK_0)->recdata[i++] = UL_to_I(p->style);
  TheRecord(STACK_0)->recdata[i++] = L_to_I(p->x);
  TheRecord(STACK_0)->recdata[i++] = L_to_I(p->y);
  TheRecord(STACK_0)->recdata[i++] = L_to_I(p->cx);
  TheRecord(STACK_0)->recdata[i++] = L_to_I(p->cy);
  TheRecord(STACK_0)->recdata[i++] = allocate_fpointer(p->hwndParent);
  TheRecord(STACK_0)->recdata[i++] = allocate_fpointer(p->hMenu);
  TheRecord(STACK_0)->recdata[i++] = allocate_fpointer(p->hInstance);
  TheRecord(popSTACK())->recdata[i++] = NIL; //L_to_I(p->lpCreateParams);
}
local void outputTEXTMETRICA(TEXTMETRICA *p, object arg)
{
  int i = 1;
  pushSTACK(arg);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmHeight);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmAscent);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmDescent);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmInternalLeading);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmExternalLeading);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmAveCharWidth);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmMaxCharWidth);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmWeight);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmOverhang);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmDigitizedAspectX);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmDigitizedAspectY);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmFirstChar);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmLastChar);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmDefaultChar);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmBreakChar);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmItalic);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmUnderlined);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmStruckOut);
  TheRecord(STACK_0)->recdata[i++] = fixnum(p->tmPitchAndFamily);
  TheRecord(popSTACK())->recdata[i++] = fixnum(p->tmCharSet);
}
local object outputFLOATS(FLOAT *p, UINT length){}

nonreturning_function(local, argumentum_inritum, (object obj)) {
  pushSTACK(obj);
  fehler(error,GETTEXT("~ is a invalid argument"));
}
