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

📄 do

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

@example
#include <stdio.h>

int _doprnt(const char *format, void *params, FILE *file);
@end example

@subheading Description

This is an internal function that is used by all the @code{printf} style
functions, which simply pass their format, arguments, and stream to this
function. 

@xref{printf} for a discussion of the allowed formats and arguments. 

@subheading Return Value

The number of characters generated is returned.

@subheading Example

@example
int args[] = @{ 1, 2, 3, 66 @};
_doprnt("%d %d %d %c\n", args, stdout);
@end example

@c ----------------------------------------------------------------------
@node dos.h, header
@heading @code{<dos.h>}

This header provides structure definitions and functions used to
access dos-specific functions.

@c ----------------------------------------------------------------------
@node _doscan, stdio
@heading @code{_doscan}
@subheading Syntax

@example
#include <stdio.h>

int _doscan(FILE *file, const char *format, void **ptrs_to_args);
@end example

@subheading Description

This is an internal function that is used by all the @code{scanf} style
functions, which simply pass their format, arguments, and stream to this
function. 

@xref{scanf} for a discussion of the allowed formats and arguments. 

@subheading Return Value

The number of characters successfully scanned is returned, or -1 on
error. 

@subheading Example

@example
int x, y;
int *args[2];
args[0] = &x;
args[1] = &y;
_doscan(stdin, "%d %d", args);
@end example

@c ----------------------------------------------------------------------
@node _doscan_low, stdio
@heading @code{_doscan_low}

@subheading Description

This is an internal function used by _doscan.

@c ----------------------------------------------------------------------
@node dosmemget, go32
@heading @code{dosmemget}
@subheading Syntax

@example
#include <go32.h>

void dosmemget(int offset, int length, void *buffer);
@end example

@subheading Description

This function transfers data from MS-DOS's conventional memory space to
the program's virtual address space.  The @var{offset} is a physical
address, which can be computed from a real-mode segment/offset pair as
follows:

@example
offset = segment * 16 + offset;
@end example

The @var{length} is the number of bytes to transfer, and @var{buffer} is
a pointer to somewhere in your virtual address space (such as memory
obtained from @code{malloc}) where the data will go.

@subheading Return Value

None.

@subheading Example

@example
unsigned short shift_state;
dosmemget(0x417, 2, &shift_state);
if (shift_state & 0x0004)
  /* Ctrl key pressed */;
@end example

@c ----------------------------------------------------------------------
@node dosmemput, go32
@heading @code{dosmemput}
@subheading Syntax

@example
#include <go32.h>

void dosmemput(const void *buffer, int length, int offset);
@end example

@subheading Description

This function transfers data from the program's virtual address space to
MS-DOS's conventional memory space.  The @var{offset} is a physical
address, which can be computed from a real-mode segment/offset pair as
follows:

@example
offset = segment * 16 + offset;
@end example

The @var{length} is the number of bytes to transfer, and @var{buffer} is
a pointer to somewhere in your virtual address space (such as memory
obtained from @code{malloc}) where the data will come from. 

@subheading Return Value

None.

@subheading Example

@example
unsigned short save_screen[25][80];
dosmemput(save_screen, 0xb8000, 80*2*25);
@end example

⌨️ 快捷键说明

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