eudora-mac/Include/nickexp.h

1 line
9.4 KiB
C
Raw Permalink Normal View History

2018-05-23 09:59:15 +00:00
/* Copyright (c) 2017, Computer History Museum All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Computer History Museum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef NICKEXP_H #define NICKEXP_H #include "nickmng.h" #define EAL_VARS_DECL Str255 tempStr, junk, fmt, buffer, realname, shortAddress #define EAL_VARS tempStr, junk, fmt, buffer, realname, shortAddress #define EAL_VARS_FORM PStr tempStr, PStr junk, PStr fmt, PStr buffer, PStr realname, PStr shortAddress typedef struct { short aliasIndex; short nicknameIndex; Str255 entryStr; } NicknameTableEntry, *NicknameTableEntryPtr; typedef struct { long numEntries; long logicalSize; long physicalSize; Str255 prefixStr; long refCon; NicknameTableEntry table[]; } NicknameTable, *NicknameTablePtr, **NicknameTableHdl; void NEValidateWin(MyWindowPtr win); void NEValidatePte(PETEHandle pte); Boolean NicknameRawEqualString(ConstStr255Param str1, ConstStr255Param str2); void NicknameNormalizeString(Str255 theString, Boolean caseSens, Boolean diacSens, Boolean stickySens); Boolean NicknameEqualString(ConstStr255Param str1, ConstStr255Param str2, Boolean caseSens, Boolean diacSens, Boolean stickySens); Boolean EqualStringPrefix(Str255 prefixStr, Str255 otherStr, Boolean caseSens, Boolean diacSens, Boolean stickySens); Boolean CharIsTypingChar(unsigned char keyChar, unsigned char keyCode); PStr GetNicknameEmailAddressPStr(short aliasIndex, short nicknameIndex, PStr emailAddressStr); PStr GetNicknamePhrasePStr(short aliasIndex, short nicknameIndex, PStr nameStr); PStr GetNicknameTrueNamePStr(short aliasIndex, short nicknameIndex, PStr trueNameStr, Boolean okToMakeItUp); PStr GetExpandedNicknamePStr(short aliasIndex, short nicknameIndex, PStr expandedNicknameStr); OSErr GetNicknameRecipientText(PETEHandle pte, short aliasIndex, short nicknameIndex, UHandle *recipientText); Boolean NEFindNickname(Str255 nicknameSearchStr, Boolean caseSens, Boolean diacSens, Boolean stickySens, short *foundAliasIndex, short *foundNicknameIndex); Boolean FindNextNicknamePrefix(Str255 prefixStr, short startAliasIndex, short startNicknameIndex, short *foundAliasIndex, short *foundNicknameIndex, Boolean allowExactMatch, Boolean findInAllFiles); Boolean FindNextNicknameTablePrefix(Str255 prefixStr, NicknameTableHdl nicknameTable, long startEntryIndex, long *foundEntryIndex, Boolean allowExactMatch); Boolean NicknamePrefixOccursNTimes(Str255 prefixStr, long nTimes, short aliasFileToScan); long FindNicknameTableIndex(NicknameTableHdl nicknameTable, short aliasIndex, short nicknameIndex); long FindFirstNonHistory