fjstrchr.c
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C语言 代码 · 共 86 行
C
86 行
/****************************************************************************
*
* Open Watcom Project
*
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
* ========================================================================
*
* This file contains Original Code and/or Modifications of Original
* Code as defined in and that are subject to the Sybase Open Watcom
* Public License version 1.0 (the 'License'). You may not use this file
* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
* provided with the Original Code and Modifications, and is also
* available at www.sybase.com/developer/opensource.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
* NON-INFRINGEMENT. Please see the License for the specific language
* governing rights and limitations under the License.
*
* ========================================================================
*
* Description: WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
* DESCRIBE IT HERE!
*
****************************************************************************/
#include "variety.h"
#include <jstring.h>
/**
*
* Name: _fjstrchr 暥帤傪専嶕偡傞
*
* Synopsis: p = _fjstrchr( s, c );
*
* FJSTRING p; 暥帤偺億僀儞僞
* FJSTRING s; 暥帤楍
* JMOJI c; 暥帤
*
* Description: 暥帤楍倱傪弴偵専嶕偟丄嵟弶偵暥帤們偲堦抳偟偨
* 埵抲偺億僀儞僞傪曉偡丅倞倱倲倰們倛倰偼愭摢偐傜
* 専嶕偟丄倞倱倲倰倰們倛倰偼嵟屻偐傜専嶕偡傞丅
*
* Returns: 堦抳偑側偐偭偨応崌偼僰儖億僀儞僞傪曉偡丅
*
*
* Name: _fjstrchr search out specified KANJI letter from string
*
* Synopsis: p = _fjstrchr( s, c );
*
* FJSTRING p; a pointer located to the specified letter
* FJSTRING s; a pointer to the KANJI string for reference
* JMOJI c; KANJI letter for search out
*
* Description: The jstrchr function locates the first occurrence of "c" in
* the KANJI string pointed to by "s". Jstrchr function starts to
* search out from the top of string , and jstrrchr function starts
* to search out from the end of string. This function is
* a data independent form that accept far pointer argunments.
* It is most useful in mix memory model applications.
*
* Returns: This function returns a pointer to the located letter, or NULL
* if the letter does not occur in the string.
*
**/
_WCRTLINK FJSTRING _WCI86FAR _fjstrchr( const JCHAR _WCFAR *s, JMOJI c )
{
JMOJI cc;
const JCHAR _WCFAR *ss;
do {
ss = _fjgetmoji( s, (JMOJI _WCFAR *)&cc );
if( c == cc ) return( (FJSTRING) s );
s = ss;
} while( cc );
return( (FJSTRING) NULL );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?