/*-*-C-*-
 * Relocation etc
 */


#ifndef __defined_relocate_h
#define __defined_relocate_h


/*
 * The following structure contains the information needed to construct a
 * StringReference, MsgReference, Offset or SpriteAreaReference value
 * inside a window template.
 */

typedef struct
{
    char *body;           /* address of object template body */
    char *string;         /* next free location in strings table */
    char *stringbase;     /* base of strings table */
    char *msg;            /* next free location in messages table */
    char *msgbase;        /* base of messages table */
    RelocationPtr reloc;  /* next free record in relocation table */
    int numrelocs;        /* number of records in relocation table */
} TemplateInfoRec, *TemplateInfoPtr;


extern void relocate_make_ref (
    TemplateInfoPtr tip,
    int type,
    int *location,
    char *value
);
extern char * relocate_object (ResourceFileObjectTemplateHeaderPtr object);


#endif
