⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 in

📁 Algorithms for Image Processing and Computer Vision Source Code
💻
字号:
@c ----------------------------------------------------------------------
@node index, string
@heading @code{index}
@subheading Syntax

@example
#include <strings.h>

char *index(const char *string, int ch);
@end example

@subheading Description

Returns a pointer to the first occurrence of @var{ch} in @var{string}. 
Note that the @code{NULL} character counts, so if you pass zero as
@var{ch} you'll get a pointer to the end of the string back. 

@subheading Return Value

A pointer to the character, or @code{NULL} if it wasn't found.

@subheading Example

@example
if (index(path, '*'))
  do_wildcards(path);
@end example

@c ----------------------------------------------------------------------
@node initstate, random number
@heading @code{initstate}
@subheading Syntax

@example
#include <std.h>

char *initstate(unsigned int seed, char *state, int n);
@end example

@subheading Description

This function fully initializes the random number generator
(@pxref{random}).  For more information on the random number generator,
consult the source code @file{libsrc/c/gen/random.c}. 

@subheading Return Value

A pointer to the old state.

@c ----------------------------------------------------------------------
@node insque, misc
@heading @code{insque}
@subheading Syntax

@example
void insque(struct vaxque *elem, struct vaxque *prev);
@end example

@subheading Description

Given a queue of elements derived from this structure:

@example
struct vaxque @{
  struct vaxque *vq_next;
  struct vaxque *vq_prev;
@};
@end example

This function inserts a new element @var{elem} in the queue after the
element specified (@var{prev}).  This function emulates the VAX
@code{insque} opcode.  @xref{remque}

@subheading Return Value

None.

@c ----------------------------------------------------------------------
@node int86, dos
@heading @code{int86}
@subheading Syntax

@example
#include <dos.h>

int int86(int ivec, union REGS *in, union REGS *out);
@end example

@subheading Description

This function is just like @code{int86x} (@pxref{int86x}) except that
suitable default values are used for the segment registers. 

@subheading Return Value

The returned value of @code{EAX}. 

@subheading Example

@example
union REGS r;
r.x.ax = 0x0100;
r.h.dl = 'c';
int86(0x21, &r, &r);
@end example

@c ----------------------------------------------------------------------
@node int86x, dos
@heading @code{int86x}
@subheading Syntax

@example
#include <dos.h>

int int86x(int ivec, union REGS *in, union REGS *out, struct SREGS *seg);
@end example

@subheading Description

This function simulates a software interrupt.  Note that, unlike the
@code{_go32_dpmi_*} functions, requests that go through @code{int86x}
and similar functions are normally processed by go32 to make it easier
for the programmer to use these functions.  For example, if a particular
routine takes a pointer in @code{ES:BX}, go32 expects you to put a
virtual pointer in @code{EBX} and it ignores @code{ES}.  This is mostly
because segments aren't used in protected mode the way they are in real
mode, so go32 takes care of the conversion for you - and it knows what
your segment selectors are anyway. 

When the interrupt is invoked, the CPU registers are copied from
@var{in}.  After the interrupt, the CPU registers are copied to
@var{out}.  In addition, the segment registers are loaded from @var{seg}
and afterwards stored back into @var{seg}. 

@xref{int86} @xref{intdos} @xref{bdos}

@subheading Return Value

The value of @code{EAX} is returned.

@subheading Example

@example
union REGS r;
struct SREGS s;
r.h.ah = 0x31;
r.h.dl = 'c';
r.x.si = si_val;
s.ds = ds_val;
int86x(0x21, &r, &r, &s);
@end example

@c ----------------------------------------------------------------------
@node intdos, dos
@heading @code{intdos}
@subheading Syntax

@example
#include <dos.h>

int intdos(union REGS *in, union REGS *out);
@end example

@subheading Description

This function is just like @code{int86x} (@pxref{int86x}) except that
suitable default values are used for the segment registers and the
interrupt vector is 0x21. 

@subheading Return Value

@code{EAX}

@c ----------------------------------------------------------------------
@node intdosx, dos
@heading @code{intdosx}
@subheading Syntax

@example
#include <dos.h>

int intdosx(union REGS *in, union REGS *out, struct SREGS *s);
@end example

@subheading Description

This function is just like @code{int86x} (@pxref{int86x}) except that the
interrupt vector is 0x21.

@subheading Return Value

@code{EAX}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -