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

📄 strrev.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
字号:
.func strrev _strrev _fstrrev _wcsrev _mbsrev _fmbsrev _ustrrev
#include <string.h>
char *strrev( char *s1 );
.ixfunc2 '&String' &func
.if &'length(&_func.) ne 0 .do begin
char *_strrev( char *s1 );
.ixfunc2 '&String' &_func
.do end
.if &farfnc eq 1 .do begin
char __far *_fstrrev( char __far *s1 );
.ixfunc2 '&String' &ffunc
.do end
.if &'length(&wfunc.) ne 0 .do begin
#include <wchar.h>
wchar_t *_wcsrev( wchar_t *s1 );
.ixfunc2 '&String' &wfunc
.ixfunc2 '&Wide' &wfunc
.do end
.if &'length(&mfunc.) ne 0 .do begin
#include <mbstring.h>
unsigned char *_mbsrev( unsigned char *s1 );
.ixfunc2 '&String' &mfunc
.ixfunc2 '&Multibyte' &mfunc
.do end
.if &'length(&fmfunc.) ne 0 .do begin
unsigned char __far *_fmbsrev( unsigned char __far *s1 );
.ixfunc2 '&String' &fmfunc
.ixfunc2 '&Multibyte' &fmfunc
.do end
.if &'length(&ufunc.) ne 0 .do begin
wchar_t *_ustrrev( wchar_t *s1 );
.ixfunc2 '&String' &ufunc
.do end
.funcend
.desc begin
The &func function replaces the string
.arg s1
with a string whose characters are in the reverse order.
.if &'length(&_func.) ne 0 .do begin
.np
The &_func function is identical to &func..
Use &_func for ANSI/ISO naming conventions.
.do end
.im farfunc
.im widefunc
.im mbsffunc
.im unifunc
.desc end
.return begin
The address of the original string
.arg s1
is returned.
.return end
.exmp begin
#include <stdio.h>
#include <string.h>

char source[] = { "A sample STRING" };

void main()
  {
    printf( "%s\n", source );
    printf( "%s\n", strrev( source ) );
    printf( "%s\n", strrev( source ) );
  }
.exmp output
A sample STRING
GNIRTS elpmas A
A sample STRING
.exmp end
.class WATCOM
.if &'length(&_func.) ne 0 .do begin
.np
&_func conforms to ANSI/ISO naming conventions
.do end
.system

⌨️ 快捷键说明

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