libDXF 0.0.1
A library with DXF related functions written in C.
Functions

file.h File Reference

Header for the handling of DXF files. More...

#include <stdio.h>
#include "block.h"
#include "global.h"
#include "class.h"
#include "entities.h"
#include "header.h"
#include "object.h"
#include "section.h"
#include "table.h"
#include "thumbnail.h"
#include "util.h"
Include dependency graph for file.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int dxf_file_read (char *filename)
 Function opens and reads a DXF file.
int dxf_file_write (DxfFile *fp, DxfHeader dxf_header, DxfClass dxf_classes_list, DxfTable dxf_tables_list)
 Function generates dxf output to a file for a complete DXF file.
int dxf_file_write_eof (DxfFile *fp)
 Write DXF output for an End Of File marker.

Detailed Description

Header for the handling of DXF files.

Author:
Copyright (C) 2010 ... 2016 by Bert Timmerman <bert.timmerman@xs4all.nl>.

Copyright Notices.


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to:
Free Software Foundation, Inc.,
59 Temple Place,
Suite 330,
Boston,
MA 02111 USA.

Drawing eXchange Format (DXF) is a defacto industry standard for the exchange of drawing files between various Computer Aided Drafting programs.
DXF is an industry standard designed by Autodesk(TM).
For more details see http://www.autodesk.com.


Definition in file file.h.


Function Documentation

int dxf_file_read ( char *  filename)

Function opens and reads a DXF file.

After opening the DXF file with the name filename the file is read line by line until a line containing the SECTION keyword is encountered.
At this point a function which reads the SECTION until the ENDSEC keyword is encountered and the invoked fuction returns here.

Parameters:
filenamefilename of input file (or device).

Definition at line 55 of file file.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_MAX_STRING_LENGTH, dxf_read_close(), dxf_read_init(), dxf_read_line(), and dxf_section_read().

Here is the call graph for this function:

int dxf_file_write ( DxfFile fp,
DxfHeader  dxf_header,
DxfClass  dxf_classes_list,
DxfTable  dxf_tables_list 
)

Function generates dxf output to a file for a complete DXF file.

Parameters:
fpfile pointer to output file (or device).
dxf_headera dxf header.
dxf_classes_listpointer to a list of CLASSES.
dxf_tables_listpointer to a list of TABLES.

Definition at line 129 of file file.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_entities_list, dxf_objects_list, and dxf_thumbnail.

int dxf_file_write_eof ( DxfFile fp)

Write DXF output for an End Of File marker.

Parameters:
fpfile pointer to output file (or device).

Definition at line 177 of file file.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_file_struct::fp.