(root)/
libredwg-0.13/
src/
out_json.h
       1  /*****************************************************************************/
       2  /*  LibreDWG - free implementation of the DWG file format                    */
       3  /*                                                                           */
       4  /*  Copyright (C) 2018-2019 Free Software Foundation, Inc.                   */
       5  /*                                                                           */
       6  /*  This library is free software, licensed under the terms of the GNU       */
       7  /*  General Public License as published by the Free Software Foundation,     */
       8  /*  either version 3 of the License, or (at your option) any later version.  */
       9  /*  You should have received a copy of the GNU General Public License        */
      10  /*  along with this program.  If not, see <http://www.gnu.org/licenses/>.    */
      11  /*****************************************************************************/
      12  
      13  /*
      14   * out_json.h: write dwg as json
      15   * written by Reini Urban
      16   */
      17  
      18  #ifndef OUT_JSON_H
      19  #define OUT_JSON_H
      20  
      21  #include "dwg.h"
      22  #include "bits.h"
      23  
      24  #ifdef IN_DXF_H
      25  #  error in_dxf.h must be included after out_json.h because of FORMAT_BD
      26  #endif
      27  
      28  EXPORT int dwg_write_json (Bit_Chain *restrict dat, Dwg_Data *restrict dwg);
      29  EXPORT int dwg_write_geojson (Bit_Chain *restrict dat, Dwg_Data *restrict dwg);
      30  
      31  // converts a TV to a UTF-8 string (with codepage conversion) and quoting
      32  // ", \n \r, U+XXXX
      33  char *json_cquote (char *restrict dest, const char *restrict src,
      34                     const size_t len, const BITCODE_RS codepage);
      35  
      36  #endif