Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(ARM).Porting TCP-IP programmer's guide.Ver 1.6.pdf
Скачиваний:
43
Добавлен:
23.08.2013
Размер:
2.64 Mб
Скачать

Miscellaneous Library Functions

9.2.10std_out()

This function outputs characters to the standard output channel.

Syntax

int std_out(long s, char *buf, int len) where:

s

Is the index of the output device (unused by std_out()).

buf

Is a pointer to the data to be printer.

len

Is the number of characters to output from buf.

Return value

Returns the number of characters actually printed.

Usage

The std_out() function is used with a GenericIO structure to allow the ns_printf() function to print network statistics to the standard output channel.

9.2.11sysuptime()

This function returns the age of the system.

Syntax

unsigned long sysuptime(void)

Return value

Returns the number of centiseconds since the clock started counting.

Usage

The sysuptime() function returns the time since some arbitrary epoch. This epoch is usually the moment when the clock driver was initialized at boot time. The time period is expressed in hundredths of a second.

ARM DUI 0144B

Copyright © 1998-2001 ARM Limited. All rights reserved.

9-15

Miscellaneous Library Functions

9.2.12uslash()

This function is used to translate DOS-style path separator characters (\) into

UNIX-style separator characters (/).

Syntax

char *uslash(char *path)

where:

path

Is the string to be translated.

Return value

Returns the string pointed to by path, with every occurrence of the \ character replaced with /.

Usage

The string is modified in place, and therefore must not be a constant (read-only) string.

9-16

Copyright © 1998-2001 ARM Limited. All rights reserved.

ARM DUI 0144B