~ubuntu-branches/ubuntu/vivid/tidy/vivid-updates

« back to all changes in this revision

Viewing changes to include/platform.h

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (0.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080120214603-oqicq5jwr1exrm55
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __PLATFORM_H__
2
 
#define __PLATFORM_H__
 
1
#ifndef __TIDY_PLATFORM_H__
 
2
#define __TIDY_PLATFORM_H__
3
3
 
4
4
/* platform.h -- Platform specifics
5
5
 
6
 
  (c) 1998-2005 (W3C) MIT, ERCIM, Keio University
 
6
  (c) 1998-2007 (W3C) MIT, ERCIM, Keio University
7
7
  See tidy.h for the copyright notice.
8
8
 
9
9
  CVS Info :
10
10
 
11
11
    $Author: arnaud02 $ 
12
 
    $Date: 2005/06/15 12:45:39 $ 
13
 
    $Revision: 1.55 $ 
 
12
    $Date: 2007/02/11 09:45:52 $ 
 
13
    $Revision: 1.65 $ 
14
14
 
15
15
*/
16
16
 
23
23
  want to specify the config file at compile-time.
24
24
*/
25
25
 
26
 
/* #define CONFIG_FILE "/etc/tidy_config.txt" */ /* original */
27
 
/* #define CONFIG_FILE "/etc/tidyrc" */
28
 
/* #define CONFIG_FILE "/etc/tidy.conf" */
 
26
/* #define TIDY_CONFIG_FILE "/etc/tidy_config.txt" */ /* original */
 
27
/* #define TIDY_CONFIG_FILE "/etc/tidyrc" */
 
28
/* #define TIDY_CONFIG_FILE "/etc/tidy.conf" */
29
29
 
30
30
/*
31
31
  Uncomment the following #define if you are on a system
33
33
  It enables tidy to find config files named ~/.tidyrc if 
34
34
  the HTML_TIDY environment variable is not set.
35
35
*/
36
 
/* #define USER_CONFIG_FILE "~/.tidyrc" */
 
36
/* #define TIDY_USER_CONFIG_FILE "~/.tidyrc" */
37
37
 
38
38
/*
39
39
  Uncomment the following #define if your
167
167
#endif
168
168
 
169
169
#define FILENAMES_CASE_SENSITIVE 0
 
170
#define SUPPORT_POSIX_MAPPED_FILES 0
170
171
 
171
172
#endif
172
173
 
482
483
#pragma warning( disable : 4706 ) /* assignment within conditional expression */
483
484
#endif
484
485
 
 
486
#if _MSC_VER > 1300
 
487
#pragma warning( disable : 4996 ) /* disable depreciation warning */
 
488
#endif
 
489
 
485
490
#endif /* _WIN32 */
486
491
 
487
492
#if defined(_WIN32)
491
496
#endif
492
497
 
493
498
#ifndef TIDY_CALL
494
 
#define TIDY_CALL __stdcall
 
499
#ifdef _WIN64
 
500
#  define TIDY_CALL __fastcall
 
501
#else
 
502
#  define TIDY_CALL __stdcall
 
503
#endif
495
504
#endif
496
505
 
497
506
#endif /* _WIN32 */
502
511
#include <sys/types.h>
503
512
#endif
504
513
#if !defined(HPUX_OS) && !defined(CYGWIN_OS) && !defined(MAC_OS_X) && !defined(BE_OS) && !defined(SOLARIS_OS) && !defined(BSD_BASED_OS) && !defined(OSF_OS) && !defined(IRIX_OS) && !defined(AIX_OS) && !defined(LINUX_OS)
 
514
# undef uint
505
515
typedef unsigned int uint;
506
516
#endif
507
517
#if defined(HPUX_OS) || defined(CYGWIN_OS) || defined(MAC_OS) || defined(BSD_BASED_OS) || defined(_WIN32)
 
518
# undef ulong
508
519
typedef unsigned long ulong;
509
520
#endif
510
521
 
 
522
/*
 
523
With GCC 4,  __attribute__ ((visibility("default"))) can be used along compiling with tidylib 
 
524
with "-fvisibility=hidden". See http://gcc.gnu.org/wiki/Visibility and build/gmake/Makefile.
 
525
*/
 
526
/*
 
527
#if defined(__GNUC__) && __GNUC__ >= 4
 
528
#define TIDY_EXPORT __attribute__ ((visibility("default")))
 
529
#endif
 
530
*/
 
531
 
511
532
#ifndef TIDY_EXPORT /* Define it away for most builds */
512
 
#define TIDY_EXPORT
 
533
#define TIDY_EXPORT 
513
534
#endif
514
535
 
515
536
#ifndef TIDY_STRUCT
544
565
# define HAS_VSNPRINTF 1
545
566
#endif
546
567
 
 
568
#ifndef SUPPORT_POSIX_MAPPED_FILES
 
569
# define SUPPORT_POSIX_MAPPED_FILES 1
 
570
#endif
 
571
 
547
572
/*
548
573
  bool is a reserved word in some but
549
574
  not all C++ compilers depending on age
570
595
#include "dmalloc.h"
571
596
#endif
572
597
 
573
 
void *MemAlloc(size_t size);
574
 
void *MemRealloc(void *mem, size_t newsize);
575
 
void MemFree(void *mem);
576
 
void ClearMemory(void *, size_t size);
577
 
void FatalError( ctmbstr msg );
578
 
 
579
598
/* Opaque data structure.
580
599
*  Cast to implementation type struct within lib.
581
600
*  This will reduce inter-dependencies/conflicts w/ application code.
583
602
#if 1
584
603
#define opaque_type( typenam )\
585
604
struct _##typenam { int _opaque; };\
586
 
typedef struct _##typenam* typenam
 
605
typedef struct _##typenam const * typenam
587
606
#else
588
 
#define opaque_type(typenam) typedef void* typenam
 
607
#define opaque_type(typenam) typedef const void* typenam
589
608
#endif
590
609
 
591
610
/* Opaque data structure used to pass back
598
617
} /* extern "C" */
599
618
#endif
600
619
 
601
 
#endif /* __PLATFORM_H__ */
 
620
#endif /* __TIDY_PLATFORM_H__ */
 
621
 
 
622
 
 
623
/*
 
624
 * local variables:
 
625
 * mode: c
 
626
 * indent-tabs-mode: nil
 
627
 * c-basic-offset: 4
 
628
 * eval: (c-set-offset 'substatement-open 0)
 
629
 * end:
 
630
 */