
Standard Functions UM017105-0511
434
Zilog Developer Studio II – ZNEO™
User Manual
puts
Writes the string pointed to by s to the serial port and appends a new-line character to the
output. The terminating null character is not written.
Synopsis
#include <stdio.h>
int puts(char *s);
Returns
EOF if an error occurs; otherwise, it is a non-negative value.
Example
int i;
char strp[]="COMPASS";
i=puts(str);
The UART must be initialized using the Zilog init_uart() function. See init_uart – see
page 182.
qsort
Sorts an array of nmemb objects, the initial member of which is pointed to by any base.
The size of each object is specified by size.
The array is sorted in ascending order according to a comparison function pointed to by
compar, which is called with two arguments that point to the objects being compared. The
compar function returns an integer less than, equal to, or greater than zero if the first argu-
ment is considered to be respectively less than, equal to, or greater than the second.
If two members in the array compare as equal, their order in the sorted array is unspeci-
fied.
Synopsis
#include <stdlib.h>
void qsort(void *base, size_t nmemb, size_t size, int
(*compar)(const void *, const void *));
Komentarze do niniejszej Instrukcji