• Aucun résultat trouvé

hypot, hypotl

Dans le document Library Reference (Page 158-168)

Function

heapwalk

returns with hLptr containing the address of the first block. hi.size holds the size of the block in bytes. hLin_use is a flag that's set if the block is

currently in use. .

One of the following values:

_HEAPEMPTY No heap

_HEAPEND End of the heap has been reached _HEAPOK Heapinfo block contains valid data farheapwalk, _rtCheapwalk

. malloc.h.

Obsolete 'nction. See _rtl_heapwalk.

conio.h

, Selects high-intensity characters.

void highvideo(void)i

highvideo selects high-intensity characters by setting the high-intensity bit of the currently selected foreground color.

This function does not affect any characters currently onscreen, but does affect those displayed by functions (such as cprintf) that perform direct video, text mode output after highvideo is called.

. I

This function should not be used in Win32s or Win32 GUI applications.

None.

cprintf, cputs, gettextinfo, lowvideo, normvideo, textattr, textcolor

math.h

Calculates hypotenuse of a right triangle.

hypot, hypotl

Syntax

Remarks

Return value

hypot hypotl

double hypot(double X, double y);

long double hypotl(long double X, long double y);

DOS UNIX Win 16 Win 32 ANSI C ANSI C++ OS/2

• • •

• •

• • •

hypot calculates the value z where

Z2 = x2 + y2. and z >= 0

This is equivalent to the length of the hypotenuse of a right triangle, if the lengths of the two sides are x and y.

hypotl is the long double version; it takes long double arguments and returns a long double result.

I

On success, these functions return z, a double (hypot) or a long double)

(hypotl).' On error (such as an overflow), they set the global variable errno to ERANGE Result out of range

and return the value HUGE_ V AL (hypot) or _LHUGE_ V AL (hypotl). Error handling for these routines can be modified through the functions _matherr and _matherrl.

_lnitEasyWin io.h

Function Initializes Easy Windows.

Syntax void _InitEasyWin(void);

Remarks Return value

inp

Function Syntax

"DOS UNIX

I

Win 16

I

Win 32

I

ANSI C

I

ANSI C++

I

OS/2 "

" I I I I I "

_InitEasyWin allows programs to use functions which perform console I/O within 16-bit Windows. '

None.

conio.h

Reads a byte from a hardware port.

int .inp (unsigned portid) ;

Remarks

Return value See also

inport

Function Syntax

Remarks

Return value -See also

inportb

Function Syntax

Remarks

Return value

inp

inp is a macro that reads a byte from the input port specified by portid. If inp is called when conio.h has been included, it will be treated as a macro that expands to inline code. If you don't include conio.h, or if you do include conio.h and undefine the macro inp, you get the inp function.

inp returns the value read.

inpw, outp, outpw

dos.h

Reads a word from a hardware port.

int inport(int portid)i

DOS

I

UNIX Win 16 Win 32 ANSI C ANSI C++ OS/2

• 1

inport works just like the 80x86 instruction IN. It reads the low byte of a word from the input port specified by portid; it reads the high byte from portid + 1.

inport returns the value read. -inportb, outport, outportb

Reads ~ byte from a hardware port. . unsigned char inportb(int portid)i

dos.h

inportb is a macro that reads a byte from the input port specified by portid.

If inportb is called when dos.h has been included, it will be treat~d as a macro that expands to inline code. If you don't include dos.h, or if you do include dos.h and #undef the macro inportb, you get the inportb function.

inportb returns the value read.

inportb

See also

inpw

Function Syntax

Remarks

inport, outport, outportb

conio.h

Reads a word from a hardware port.

unsigned inpw(unsigned portid);

inpw is a macro that reads a 16-bit word from the inport port specified by portid. It reads the low byte of the word from portid, and the high byte from portid + 1.

· If inpw is called when conio.h has been included, it will be treated as a

· macro that expands to inline code. If you don't include conio.h, or if you do include conio.h and #undef the macro inpw, you get the inpw function.

Return value inpw returns the value read.

See also inp, outp, outpw

insline conio.h

Function Inserts a blank line in the text window.

Syntax void ins line (void) ;

Remarks. insline inserts an empty line in the text window at the cursor position using the current text background color. All lines below the empty one move

· down one line, and the bottom line scrolls off the bottom of the window.

- . . This function should not be used in Win32s or Win32 GUI applications.

Return value None.

See also clreol, delline, window

int86

Function Syntax

Remarks

Return value

See also

int86x

Function Syntax

Remarks

int86

dos.h

General 8086 software interrupt.

int int86(int intno, union REGS *inregs, union REGS *outregs);

int86 executes an 8086 software interrupt specified by the argument intno . . Before executing the software interrupt, it copies register values from inregs

into the registers. '

After the software interrupt returns, int86 copies the current register values to outregs, copies the status of the carry flag to the x.cflag field in outregs, and copies the value of the 8086 flags register to the x.flags field in outregs. If the carry flag is set, it usually indicates that an error has occurred.

Note that in regs can point to the same structure that outregs points to.

int86 returns the value of AX after completion of the software interrupt. If ,,-the carry flag is set (out regs -> x. cflag ! = 0), indicating an error, this

function sets the global variable _doserrno to the error code. Note that when the carry flag is not set (outregs -> x.cflag = 0), you mayor may not have an error. To be certain, always check _doserrno.

bdos, bdosptr, geninterrupt, int86x, intdos, intdosx, intr

General 8086 software interrupt interface.

int int86x(int intno, union REGS *inregs, union REGS *outregs, , struct SREGS *segregs);

dos.h

int86x executes an 8086 software interrupt specified by the argument intno.

Before executing the software interrupt, it copies register values from inregs into the registers.

In addition, int86x copies the segregs ->ds and segregs ->es values into the corresponding registers before executing the software interrupt. This

int86x

Return value

See also

intdos

Function Syntax

Remarks

Return value

feature allows programs that use far pointers or a large data memory model to specify which segment is to be used for the software interrupt.

. After the software interrupt returns, int86x copies the current register values to outregs, the status of the carry flag to the x.cflag field in outregs, and the value of the 8086 flags register to the x.flags field in outregs. In addition, int86x restores OS and sets the segregs ->es and segregs ->ds fields to the values of the correspqnding segment registers. If the carry flag is set, it usually indicates that an error has occurred.

int86x lets you invoke an 8086 software interrupt that takes a value of OS different from the default data segment, and/or takes a~ argument in ES.

Note that inregs can point to the same structure that outregs points to.

int86x returns the value of AX after completion of the software interrupt. If the carry flag is set (out regs -> x.cflag != .0), indicating an error, this function sets the global variable _doserrno to the error code. Note that when the carry flag is not set (out regs -> x. cf'lag

=

0), you mayor may not have an error. To be certain, always check _doserrno.

bdos, bdosptr, geninterrupt, intdos, intdosx, int86, intr, segread

dos.h

General DOS interrupt interface.

int intdos(union REGS *inregs, union REGS *outregs);

intdos executes DOS interrupt Ox21 to invoke a specified DOS function. The value of in regs -> h.ah specifies the DOS function to be invoked.

After the interrupt Ox21 returns, intdos copies th~ current register values to outregs, copies the status of the carry flag to the x.cflag field in outregs, and copies the value of the 8086 flags register to the x.fl(lgs field in outregs. If the carry flag is set, it indicates that an error has occurred.

Note that inregs can point to the same structure that outregs points to.

intdos returns the value of AX after completion of the DOS function call. If the carry flag is set (out regs -> x. cflag !

=

0), indicating an error, it sets the global variable _doserrno to the error code. Note'that when the carry flag is not set (out regs -> x. cflag = 0), you mayor may not have an error. TO,be certain, always check _doserrno.

See also

intdosx

Function Syntax

Remarks

Return value

See also

intr

Function Syntax

intdos

bdos, bdosptr, geninterrupt, int86, int86x, intdosx, intr

dos.h

General DOS mterrupt interface.

int intdosx(union REGS *inregs, union REGS *outregs, struct SREGS *segregs)i

intdosx executes DOS interrupt Ox21 to invoke a specified DOS function.

The value of inregs -> h.ah specifies the DOS function to be invoked.

In addition, intdosx copies the segregs ->ds and segregs ->es values into the corresponding registers before invoking the DOS function. This feature allows programs that use far pointers or a large data memory model to specify which segment is to be used for the function execution.

After the interrupt Ox21 returns, intdosx copies the current register values to outregs, copies the status of the carry flag to the x.cflag field in outregs, and copies the value of the 8086 flags register to the x.flags field in outregs. In addition, intdosx sets the segregs ->es and segregs ->ds fields to the values of the corresponding segment registers and then restores DS. If the carry flag is set, it indicates that an error occurred.

intdosx lets you invoke a DOS function that takes a value of OS different from the default data segment and/or takes an argument in ES.

Note that inregs can point to the same structure that outregs points to.

intdosx returns the value of AX after completion of the DOS function call. If the carry flag is set (outregs -> x.cflag 1= 0), indicating an error, it sets the global variable _doserrno to the error code. Note that when the carry flag is not set (out regs -> x.cflag = O),you mayor may not have an error. To be certain, always check _doserrno.

bdos, bdosptr, geninterrupt, int86, int86x, intdos, intr, segread

dos.h

Alternate 8086 software interrupt interface.

void intr(int intno, struct REGPACK *preg)i

intr

Remarks

Return value See also

ioctl

Function Syntax

Remarks

The intr function is an alternate interface for executing software interrupts.

It generates an 8086 software interrupt specified by the argument intno.

intr copies register values from the REGP ACK structure *preg into the registers before executing the software interrupt. After the software interrupt completes, intr copies the current register values into *preg, including the flags.

The arguments passed to intr are as follows:

intno Interrupt number to be executed preg Address of a structure containing

(a) the input registers before the interrupt call (b) the value of the registers after the interrupt call The REGP ACK structure (defined in dos.h) has the following format:

struct REGPACK {

unsigned r_ax, r_bx, r_cx, r_dxi

unsigned r_bp, r_si, r_di, r_ds, r_es, r_flagsi

}i

No value is returned. The REGP ACK structure *preg contains the value of the registers after the interrupt call.

geninterrupt, int86,int86x, intdos, intdosx

"io.h

Controls I/O device.

int ioctl(int handle, int func' [, void *argdx, int argcx]li

ioetl is available on UNIX systems, but not with these parameters or functionality. UNIX version 7 and System III differ from each other in their use of ioetl. ioetl calls are not portable to UNIX and are rarely portable across DOS machines.

DOS 3.0 extends ioetl with June values of 8 and 11.

Return value

This is a direct interface to the DOS call Ox44 (IOCTL).

The exact function depends on the value of fune as follows:

o

Get device information.

1 Set device information (in argdx).

2 Read argex bytes into the address pointed to by argdx.

3 Write argex bytes from the address pointed to by argdx.

4 Same as 2 except handle is treated as a drive number (0 equals default, 1 equals A, and so on).

5 Same as 3 except handle is a drive number (0 equals default, 1 equals A, and so on).

6 Get input status.

7 Get output status.

8 Test removability; DOS 3.0 only.

11 Set sharing conflict retry count; DOS 3.0 only.

ioctl

ioetl can be used to get information about device channels. Regular files can also be used, but only June values 0, 6, and 7 are defined for them. All other calls return an EINV AL error for files.

See the documentation for system call Ox44 in your DOS reference manuals for detailed information on argument or return values.

The arguments argdx and argex are optional.

ioetl provides a direct interface to DOS device drivers for special functions.

As

a

result, the exact behavior of this function varies across different vendors' hardware and in different devices. Also, several vendors do not follow the interfaces described here. Refer to the vendor BIOS

documentation for exact use of ioetl.

For fune 0 or I, the return value is the device information (DX of the ioetl call). For fune values of 2 through 5, the return value is the number of bytes actually transferred. For June values of 6 or 7, the return value is the device status.

In any event, if an error is detected, a value of -1 is returned, and the global variable errno is set to one of the following:

EBADF EINVAL EINVDAT

Bad file number Invalid argument Invalid data

isalnum

isalnum

Function Syntax

Remarks

Return value

isalpha

Function Syntax

Remarks

Return value

isascii

Function Syntax

ctype.h ..

. Tests for an alphanumeric character.

int isalnurn(int e)i

isalnum is a macro that classifies ASCII-coded integer values by table lookup. The macro is affected by the current locale's LC_CTYPE category.

For the default C locale, c is a letter (A to Z or a to z) or a digit (0 to 9).

You can make this macro available as a function by un defining (#undef) it.

It is a predicate returning nonzero for true and 0 for false. isalnum returns nonzero if c is a letter or a digit.

ctype.h

Classifies an alphabetical character.

int isalpha(int e)i

isalpha is a macro that classifies ASCII-coded integer values by table lookup.

The macro is affected by the current locale's LC_CTYPE category. For the default C locale, c is a letter (A to Z or a to z).

You can make this macro available as a function by undefining (#undef) it.

isalpha returns nonzero if c is a letter.

ctype.h

Character classification macro.

int isaseii(int e)i

Remarks

Return value

isatty

Function Syntax

Remarks

Return value

iscntrl

F~nction

Syntax

Remarks

isascii

isascii isa macro that classifies ASCII-coded integer values by table lookup.

It is a predicate returning nonzero for true and 0 for false.

isascii is defined on all integer values.

isascii returns nonzero if the low order byte of c is in the range 0 to 127 (OxOO-Ox7F).

Checks for device type.

int isatty(int handle)i

Dans le document Library Reference (Page 158-168)