Files
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

41 lines
1.1 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*----------------------------------------------------------------------*\
| NAME : copy_ucase |
| CREATED : 24-August-83 LAST MODIFIED: 6-October-83 |
| FUNCTION: Copy_ucase copies n characters from the source |
| destination string, upper casing each char first. |
| NULL characters are replaced with a space if it |
| is not the last character on the line. |
| INPUT : src -- ptr to source string |
| dst -- ptr to destination string |
| max -- number of characters to copy |
| OUTPUT : No return value. |
\*----------------------------------------------------------------------*/
#include <portab.h>
#include "utildef.h"
#include "cpmfunc.h"
/* THIS REFERENCE IS IN CPMFUNC.H
EXTERN VOID c_write();
*/
VOID copy_ucase( dst,src,max_len )
BYTE dst[];
BYTE *src;
WORD max_len;
{
BYTE ch;
WORD dindex;
for( dindex=0; dindex < max_len; dindex++ )
{
ch = *src++;
if( ch == NULL )
dst[dindex] = ' ';
else
dst[dindex] = toupper( ch );
}
dst[dindex] = NULL;
}