2017-04-25 08:41:48 -04:00
|
|
|
/*
|
|
|
|
|
* calma.h --
|
|
|
|
|
*
|
|
|
|
|
* This file defines things that are exported by the
|
|
|
|
|
* calma module to the rest of the world.
|
|
|
|
|
*
|
2020-05-23 17:13:14 -04:00
|
|
|
* *********************************************************************
|
|
|
|
|
* * Copyright (C) 1985, 1990 Regents of the University of California. *
|
|
|
|
|
* * Permission to use, copy, modify, and distribute this *
|
|
|
|
|
* * software and its documentation for any purpose and without *
|
|
|
|
|
* * fee is hereby granted, provided that the above copyright *
|
|
|
|
|
* * notice appear in all copies. The University of California *
|
|
|
|
|
* * makes no representations about the suitability of this *
|
|
|
|
|
* * software for any purpose. It is provided "as is" without *
|
|
|
|
|
* * express or implied warranty. Export of this software outside *
|
|
|
|
|
* * of the United States of America may require an export license. *
|
2017-04-25 08:41:48 -04:00
|
|
|
* *********************************************************************
|
|
|
|
|
*
|
|
|
|
|
* rcsid $Header: /usr/cvsroot/magic-8.0/calma/calma.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $
|
|
|
|
|
*/
|
|
|
|
|
|
2024-10-16 07:38:41 +01:00
|
|
|
#ifndef _MAGIC__CALMA__CALMA_H
|
|
|
|
|
#define _MAGIC__CALMA__CALMA_H
|
2017-04-25 08:41:48 -04:00
|
|
|
|
|
|
|
|
#include "utils/magic.h"
|
|
|
|
|
|
|
|
|
|
/* Externally visible variables */
|
2023-01-17 20:14:38 -05:00
|
|
|
extern unsigned char CalmaSubcellPolygons;
|
2017-10-06 22:32:52 -04:00
|
|
|
extern bool CalmaSubcellPaths;
|
2017-04-25 08:41:48 -04:00
|
|
|
extern bool CalmaDoLabels;
|
2020-07-16 08:55:46 -04:00
|
|
|
extern bool CalmaDoLibrary;
|
2017-04-25 08:41:48 -04:00
|
|
|
extern bool CalmaDoLower;
|
2020-10-13 09:47:54 -04:00
|
|
|
extern bool CalmaAddendum;
|
2020-12-04 16:56:51 -05:00
|
|
|
extern bool CalmaNoDuplicates;
|
2022-01-21 10:26:29 -05:00
|
|
|
extern time_t *CalmaDateStamp;
|
2021-04-27 13:07:27 -04:00
|
|
|
extern bool CalmaUnique;
|
2022-01-21 14:48:59 -05:00
|
|
|
extern TileTypeBitMask *CalmaMaskHints;
|
2017-04-25 08:41:48 -04:00
|
|
|
extern bool CalmaMergeTiles;
|
|
|
|
|
extern bool CalmaFlattenArrays;
|
|
|
|
|
extern bool CalmaNoDRCCheck;
|
2026-02-19 11:40:46 -05:00
|
|
|
extern bool CalmaRecordPaths;
|
2017-04-25 08:41:48 -04:00
|
|
|
extern bool CalmaFlattenUses;
|
2023-07-19 20:33:01 -04:00
|
|
|
extern int CalmaFlattenLimit;
|
|
|
|
|
extern float CalmaMagScale;
|
2020-12-22 14:44:30 -05:00
|
|
|
extern char **CalmaFlattenUsesByName;
|
2017-04-25 08:41:48 -04:00
|
|
|
extern bool CalmaReadOnly;
|
|
|
|
|
extern bool CalmaContactArrays;
|
2022-05-10 09:19:39 -04:00
|
|
|
#ifdef HAVE_ZLIB
|
2022-10-10 11:50:15 +02:00
|
|
|
extern int CalmaCompression;
|
2022-05-10 09:19:39 -04:00
|
|
|
#endif
|
2017-04-25 08:41:48 -04:00
|
|
|
extern bool CalmaPostOrder;
|
2021-01-14 15:21:39 -05:00
|
|
|
extern bool CalmaAllowUndefined;
|
2022-11-02 09:40:20 -04:00
|
|
|
extern bool CalmaAllowAbstract;
|
2017-04-25 08:41:48 -04:00
|
|
|
|
2023-01-17 20:14:38 -05:00
|
|
|
/* Definitions used by the return value for CalmaSubcellPolygons */
|
|
|
|
|
/* CALMA_POLYGON_NONE: Process polygons immediately */
|
|
|
|
|
/* CALMA_POLYGON_TEMP: Create temporary polygon subcells */
|
|
|
|
|
/* CALMA_POLYGON_KEEP: Keep polygons in subcells */
|
|
|
|
|
|
|
|
|
|
#define CALMA_POLYGON_NONE 0
|
|
|
|
|
#define CALMA_POLYGON_TEMP 1
|
|
|
|
|
#define CALMA_POLYGON_KEEP 2
|
|
|
|
|
|
2017-04-25 08:41:48 -04:00
|
|
|
/* Externally-visible procedures: */
|
2024-10-04 11:17:39 +01:00
|
|
|
extern bool CalmaWrite(CellDef *rootDef, FILE *f);
|
|
|
|
|
extern void CalmaReadFile(FILETYPE file, char *filename);
|
|
|
|
|
extern void CalmaTechInit(void);
|
|
|
|
|
extern bool CalmaGenerateArray(FILE *f, TileType type, int llx, int lly, int pitch, int cols, int rows);
|
2024-10-03 22:47:50 +01:00
|
|
|
extern void CalmaReadError(const char *format, ...) ATTR_FORMAT_PRINTF_1;
|
2017-04-25 08:41:48 -04:00
|
|
|
|
2022-10-10 11:50:15 +02:00
|
|
|
/* C99 compat */
|
2024-10-04 11:17:39 +01:00
|
|
|
extern void calmaDelContacts(void);
|
|
|
|
|
extern void calmaElementBoundary(void);
|
|
|
|
|
extern void calmaElementBox(void);
|
|
|
|
|
extern void calmaElementPath(void);
|
|
|
|
|
extern void calmaElementText(void);
|
|
|
|
|
extern bool calmaIsUseNameDefault(char *defName, char *useName);
|
|
|
|
|
extern bool calmaParseStructure(char *filename);
|
|
|
|
|
extern int calmaProcessDef(CellDef *def, FILE *outf, bool do_library);
|
2024-10-04 11:38:40 +01:00
|
|
|
#ifdef HAVE_ZLIB
|
2024-10-04 11:17:39 +01:00
|
|
|
extern int calmaProcessDefZ(CellDef *def, gzFile outf, bool do_library);
|
2024-10-04 11:38:40 +01:00
|
|
|
#endif
|
2024-10-04 11:17:39 +01:00
|
|
|
extern bool calmaReadI2Record(int type, int *pvalue);
|
|
|
|
|
extern bool calmaReadI4Record(int type, int *pvalue);
|
2026-02-24 20:56:27 -05:00
|
|
|
extern void calmaReadX(Point *p, int iscale);
|
|
|
|
|
extern void calmaReadY(Point *p, int iscale);
|
2024-10-04 11:17:39 +01:00
|
|
|
extern void calmaReadPoint(Point *p, int iscale);
|
|
|
|
|
extern bool calmaReadR8(double *pd);
|
|
|
|
|
extern bool calmaReadStampRecord(int type, int *stampptr);
|
|
|
|
|
extern bool calmaReadStringRecord(int type, char **str);
|
|
|
|
|
extern bool calmaReadStringRecord(int type, char **str);
|
|
|
|
|
extern bool calmaReadTransform(Transform *ptrans, char *name);
|
|
|
|
|
extern bool calmaSkipBytes(int nbytes);
|
|
|
|
|
extern bool calmaSkipExact(int type);
|
|
|
|
|
extern bool calmaSkipTo(int what);
|
|
|
|
|
extern void calmaUnexpected(int wanted, int got);
|
2022-10-10 11:50:15 +02:00
|
|
|
|
2022-05-12 09:55:38 -04:00
|
|
|
#ifdef HAVE_ZLIB
|
2024-10-04 11:17:39 +01:00
|
|
|
extern bool CalmaWriteZ(CellDef *rootDef, gzFile f);
|
|
|
|
|
extern bool CalmaGenerateArrayZ(gzFile f, TileType type, int llx, int lly, int pitch, int cols, int rows);
|
2022-05-12 09:55:38 -04:00
|
|
|
#endif
|
|
|
|
|
|
2024-10-16 07:38:41 +01:00
|
|
|
#endif /* _MAGIC__CALMA__CALMA_H */
|