InChI
 
Loading...
Searching...
No Matches
ichicomp.h
Go to the documentation of this file.
1/*
2 * International Chemical Identifier (InChI)
3 * Version 1
4 * Software version 1.07
5 * April 30, 2024
6 *
7 * MIT License
8 *
9 * Copyright (c) 2024 IUPAC and InChI Trust
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in all
19 * copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * SOFTWARE.
28*
29* The InChI library and programs are free software developed under the
30 * auspices of the International Union of Pure and Applied Chemistry (IUPAC).
31 * Originally developed at NIST.
32 * Modifications and additions by IUPAC and the InChI Trust.
33 * Some portions of code were developed/changed by external contributors
34 * (either contractor or volunteer) which are listed in the file
35 * 'External-contributors' included in this distribution.
36 *
37 * info@inchi-trust.org
38 *
39*/
40
41
42#ifndef _INCHI_COMP_H_
43#define _INCHI_COMP_H_
44
45#ifndef COMPILE_ALL_CPP
46#ifdef __cplusplus
47extern "C" {
48#endif
49#endif
50
51 /* compatibility */
52
53#if ( defined(__GNUC__) && defined(__MINGW32__) && __GNUC__ == 3 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ == 0 && defined(_WIN32) )
54/* replace with the proper definition for GNU gcc & MinGW-2.0.0-3 (mingw special 20020817-1), gcc 3.2 core */
55#define my_va_start(A,B) ((A)=(va_list)__builtin_next_arg(lpszFormat))
56#else
57#define my_va_start va_start
58#endif
59
60
61
62/* ANSI redefinitions */
63#ifdef COMPILE_ANSI_ONLY /* { */
64#ifndef __isascii
65#define __isascii(val) ((unsigned)(val) <= 0x7F)
66#endif
67
68/* #ifndef __GNUC__ */
69/* these non-ANSI functions are implemented in gcc */
70#include <stdio.h>
71 /* this #include provides size_t definition */
72 /* implementation is located in util.c */
73/*#if ( !defined(_MSC_VER) || defined(__STDC__) && __STDC__ == 1 )*/
74
75#if ( defined(COMPILE_ADD_NON_ANSI_FUNCTIONS) || defined(__STDC__) && __STDC__ == 1 )
76
77/* support (VC++ Language extensions) = OFF && defined(COMPILE_ANSI_ONLY) */
78 int inchi_memicmp( const void*, const void*, size_t );
79 int inchi_stricmp( const char *s1, const char *s2 );
80 char *inchi__strnset( char *string, int c, size_t count );
81 char *inchi__strdup( const char *string );
82#endif
83/* #endif */
84
85#endif /* } */
86
87
88#ifndef COMPILE_ALL_CPP
89#ifdef __cplusplus
90}
91#endif
92#endif
93
94
95#endif /* _INCHI_COMP_H_ */
char * inchi__strnset(char *s, int val, size_t length)
Definition util.c:1973
int inchi_stricmp(const char *s1, const char *s2)
Definition util.c:1947
char * inchi__strdup(const char *string)
Definition util.c:1985
int inchi_memicmp(const void *p1, const void *p2, size_t length)
Compare two memory blocks in a case-insensitive manner.
Definition util.c:1924