Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Macros | Typedefs | Functions
valcmp.cpp File Reference
#include <rw_valcmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for valcmp.cpp:

Go to the source code of this file.

Macros

#define _RWSTD_TEST_SRC
 
#define Abs(x)   ((x) < 0 ? -(x) : (x))
 

Typedefs

typedef unsigned char UChar
 

Functions

_TEST_EXPORT int rw_valcmp (const void *buf1, const void *buf2, size_t nelems, size_t size1, size_t size2, int flags)
 
_TEST_EXPORT int rw_strncmp (const char *str1, const char *str2, size_t nelems, int flags)
 
_TEST_EXPORT int rw_strncmp (const char *str1, const wchar_t *str2, size_t nelems, int flags)
 
_TEST_EXPORT int rw_strncmp (const wchar_t *str1, const char *str2, size_t nelems, int flags)
 
_TEST_EXPORT int rw_strncmp (const wchar_t *str1, const wchar_t *str2, size_t nelems, int flags)
 
_TEST_EXPORT int rw_fltcmp (float x, float y)
 
_TEST_EXPORT int rw_dblcmp (double x, double y)
 
_TEST_EXPORT int rw_ldblcmp (long double x, long double y)
 

Macro Definition Documentation

◆ _RWSTD_TEST_SRC

#define _RWSTD_TEST_SRC

valcmp.cpp - definitions of the rw_valcmp() family of helper functions

$Id$

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 28 of file valcmp.cpp.

◆ Abs

#define Abs (   x)    ((x) < 0 ? -(x) : (x))

Definition at line 749 of file valcmp.cpp.

Typedef Documentation

◆ UChar

typedef unsigned char UChar

Definition at line 38 of file valcmp.cpp.

Function Documentation

◆ rw_dblcmp()

_TEST_EXPORT int rw_dblcmp ( double  x,
double  y 
)
See also
rw_fltcmp.

Definition at line 753 of file valcmp.cpp.

◆ rw_fltcmp()

_TEST_EXPORT int rw_fltcmp ( float  x,
float  y 
)

Compares two floating point numbers for equality.

Parameters
xThe left hand side of the comparison.
yThe right hand side of the comparison.
Returns
Returns a negative value, 0, or a positive value, depending on whether the first number is less than, equal to, or greater than the second number. The magnitude of the returned value indicates the number of distinct values representable in the type of the number between the two arguments.

Definition at line 712 of file valcmp.cpp.

◆ rw_ldblcmp()

_TEST_EXPORT int rw_ldblcmp ( long double  x,
long double  y 
)
See also
rw_fltcmp.

Definition at line 816 of file valcmp.cpp.

◆ rw_strncmp() [1/4]

_TEST_EXPORT int rw_strncmp ( const char *  str1,
const char *  str2,
size_t  nelems,
int  flags 
)

Definition at line 664 of file valcmp.cpp.

◆ rw_strncmp() [2/4]

_TEST_EXPORT int rw_strncmp ( const char *  str1,
const wchar_t *  str2,
size_t  nelems,
int  flags 
)

Definition at line 676 of file valcmp.cpp.

◆ rw_strncmp() [3/4]

_TEST_EXPORT int rw_strncmp ( const wchar_t *  str1,
const char *  str2,
size_t  nelems,
int  flags 
)

Definition at line 686 of file valcmp.cpp.

◆ rw_strncmp() [4/4]

_TEST_EXPORT int rw_strncmp ( const wchar_t *  str1,
const wchar_t *  str2,
size_t  nelems,
int  flags 
)

Definition at line 696 of file valcmp.cpp.

◆ rw_valcmp()

_TEST_EXPORT int rw_valcmp ( const void *  buf1,
const void *  buf2,
size_t  nelems,
size_t  size1,
size_t  size2,
int  flags 
)

Definition at line 640 of file valcmp.cpp.