2017-04-25 14:41:48 +02:00
|
|
|
/*
|
|
|
|
|
* calma.h --
|
|
|
|
|
*
|
|
|
|
|
* This file defines things that are exported by the
|
|
|
|
|
* calma module to the rest of the world.
|
|
|
|
|
*
|
2020-05-23 23:13:14 +02: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 14:41:48 +02:00
|
|
|
* *********************************************************************
|
|
|
|
|
*
|
|
|
|
|
* rcsid $Header: /usr/cvsroot/magic-8.0/calma/calma.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _CALMA_H
|
|
|
|
|
#define _CALMA_H
|
|
|
|
|
|
|
|
|
|
#include "utils/magic.h"
|
|
|
|
|
|
|
|
|
|
/* Externally visible variables */
|
2023-01-18 02:14:38 +01:00
|
|
|
extern unsigned char CalmaSubcellPolygons;
|
2017-10-07 04:32:52 +02:00
|
|
|
extern bool CalmaSubcellPaths;
|
2017-04-25 14:41:48 +02:00
|
|
|
extern bool CalmaDoLabels;
|
2020-07-16 14:55:46 +02:00
|
|
|
extern bool CalmaDoLibrary;
|
2017-04-25 14:41:48 +02:00
|
|
|
extern bool CalmaDoLower;
|
2020-10-13 15:47:54 +02:00
|
|
|
extern bool CalmaAddendum;
|
2020-12-04 22:56:51 +01:00
|
|
|
extern bool CalmaNoDuplicates;
|
2022-01-21 16:26:29 +01:00
|
|
|
extern time_t *CalmaDateStamp;
|
2021-04-27 19:07:27 +02:00
|
|
|
extern bool CalmaUnique;
|
2022-01-21 20:48:59 +01:00
|
|
|
extern TileTypeBitMask *CalmaMaskHints;
|
2017-04-25 14:41:48 +02:00
|
|
|
extern bool CalmaMergeTiles;
|
|
|
|
|
extern bool CalmaFlattenArrays;
|
|
|
|
|
extern bool CalmaNoDRCCheck;
|
|
|
|
|
extern bool CalmaFlattenUses;
|
2023-07-20 02:33:01 +02:00
|
|
|
extern int CalmaFlattenLimit;
|
|
|
|
|
extern float CalmaMagScale;
|
2020-12-22 20:44:30 +01:00
|
|
|
extern char **CalmaFlattenUsesByName;
|
2017-04-25 14:41:48 +02:00
|
|
|
extern bool CalmaReadOnly;
|
|
|
|
|
extern bool CalmaContactArrays;
|
2022-05-10 15:19:39 +02:00
|
|
|
#ifdef HAVE_ZLIB
|
2022-10-10 11:50:15 +02:00
|
|
|
extern int CalmaCompression;
|
2022-05-10 15:19:39 +02:00
|
|
|
#endif
|
2017-04-25 14:41:48 +02:00
|
|
|
extern bool CalmaPostOrder;
|
2021-01-14 21:21:39 +01:00
|
|
|
extern bool CalmaAllowUndefined;
|
2022-11-02 14:40:20 +01:00
|
|
|
extern bool CalmaAllowAbstract;
|
2017-04-25 14:41:48 +02:00
|
|
|
|
2023-01-18 02:14:38 +01: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 14:41:48 +02:00
|
|
|
/* Externally-visible procedures: */
|
2024-10-04 12:17:39 +02: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);
|
2023-07-11 17:31:37 +02:00
|
|
|
extern void CalmaReadError(char *format, ...);
|
2017-04-25 14:41:48 +02:00
|
|
|
|
2022-10-10 11:50:15 +02:00
|
|
|
/* C99 compat */
|
2024-10-04 12:17:39 +02:00
|
|
|
extern int calmaAddSegment(LinkedBoundary **lbptr, int poly_edge, int p1x, int p1y, int p2x, int p2y);
|
|
|
|
|
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 12:38:40 +02:00
|
|
|
#ifdef HAVE_ZLIB
|
2024-10-04 12:17:39 +02:00
|
|
|
extern int calmaProcessDefZ(CellDef *def, gzFile outf, bool do_library);
|
2024-10-04 12:38:40 +02:00
|
|
|
#endif
|
2024-10-04 12:17:39 +02:00
|
|
|
extern bool calmaReadI2Record(int type, int *pvalue);
|
|
|
|
|
extern bool calmaReadI4Record(int type, int *pvalue);
|
|
|
|
|
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);
|
|
|
|
|
extern void calmaMergeSegments(LinkedBoundary *edge, BoundaryTop **blist, int num_points);
|
|
|
|
|
extern void calmaRemoveDegenerate(BoundaryTop *blist);
|
|
|
|
|
extern void calmaRemoveColinear(BoundaryTop *blist);
|
2022-10-10 11:50:15 +02:00
|
|
|
|
2022-05-12 15:55:38 +02:00
|
|
|
#ifdef HAVE_ZLIB
|
2024-10-04 12:17:39 +02: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 15:55:38 +02:00
|
|
|
#endif
|
|
|
|
|
|
2017-04-25 14:41:48 +02:00
|
|
|
#endif /* _CALMA_H */
|