Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef _ASMSUB_H
  2. #define _ASMSUB_H
  3. /* asmsub.h */
  4. /*****************************************************************************/
  5. /* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only                     */
  6. /*                                                                           */
  7. /* AS-Portierung                                                             */
  8. /*                                                                           */
  9. /* Unterfunktionen, vermischtes                                              */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12.  
  13. #include <stddef.h>
  14. #include "datatypes.h"
  15. #include "striter.h"
  16.  
  17. struct sLineComp;
  18. struct sStrComp;
  19. struct as_dynstr;
  20.  
  21. typedef void (*TSwitchProc)(
  22. #ifdef __PROTOS__
  23. void
  24. #endif
  25. );
  26.  
  27.  
  28. extern void AsmSubPassInit(void);
  29.  
  30.  
  31. extern long GTime(void);
  32.  
  33.  
  34. extern void UpString(char *s);
  35.  
  36. extern char *QuotPosQualify(const char *s, char Zeichen, as_qualify_quote_fnc_t QualifyQuoteFnc);
  37. #define QuotPos(s, Zeichen) QuotPosQualify(s, Zeichen, NULL)
  38. extern char *QuotMultPosQualify(const char *s, const char *pSearch, as_qualify_quote_fnc_t QualifyQuoteFnc);
  39. #define QuotMultPos(s, pSearch) QuotMultPosQualify(s, pSearch, NULL)
  40. extern char *QuotSMultPosQualify(const char *s, const char *pStrs, as_qualify_quote_fnc_t QualifyQuoteFnc);
  41. #define QuotSMultPos(s, pStrs) QuotSMultPosQualify(s, pStrs, NULL)
  42.  
  43. extern char *RQuotPos(char *s, char Zeichen);
  44.  
  45. extern void KillBlanks(char *s);
  46.  
  47. extern int CopyNoBlanks(char *pDest, const char *pSrc, size_t MaxLen);
  48.  
  49. extern char *FirstBlank(const char *s);
  50.  
  51. extern void SplitString(char *Source, char *Left, char *Right, char *Trenner);
  52.  
  53. extern ShortInt StrCaseCmp(const char *s1, const char *s2, LongInt Hand1, LongInt Hand2);
  54.  
  55. extern char *MatchChars(const char *pStr, const char *pPattern, ...);
  56. extern char *MatchCharsRev(const char *pStr, const char *pPattern, ...);
  57.  
  58. extern char *FindClosingParenthese(const char *pStr);
  59.  
  60. extern char *FindOpeningParenthese(const char *pStrBegin, const char *pStrEnd, const char Bracks[2]);
  61.  
  62. #ifdef PROFILE_MEMO
  63. static inline Boolean Memo(const char *s)
  64. {
  65.   NumMemo++;
  66.   return !strcmp(OpPart.str.p_str, s);
  67. }
  68. #else
  69. # define Memo(s) (!strcmp(OpPart.str.p_str, (s)))
  70. #endif
  71.  
  72.  
  73. extern Boolean AddSuffix(char *s, const char *Suff);
  74.  
  75. extern void KillSuffix(char *s);
  76.  
  77. extern const char *NamePart(const char *Name);
  78.  
  79. extern char *PathPart(char *Name);
  80.  
  81.  
  82. extern void FloatString(char *pDest, size_t DestSize, as_float_t f);
  83.  
  84. struct sTempResult;
  85. extern void StrSym(const struct sTempResult *t, Boolean WithSystem, struct as_dynstr *p_dest, unsigned Radix);
  86.  
  87.  
  88. extern void ResetPageCounter(void);
  89.  
  90. extern void NewPage(ShortInt Level, Boolean WithFF);
  91.  
  92. extern void WrLstLine(const char *Line);
  93.  
  94. extern void SetListLineVal(struct sTempResult *t);
  95.  
  96. extern void PrintOneLineMuted(FILE *pFile, const char *pLine,
  97.                               const struct sLineComp *pMuteComponent,
  98.                               const struct sLineComp *pMuteComponent2);
  99. extern void PrLineMarker(FILE *pFile, const char *pLine, const char *pPrefix, const char *pTrailer,
  100.                          char Marker, const struct sLineComp *pLineComp);
  101.  
  102. extern LargeWord ProgCounter(void);
  103.  
  104. extern LargeWord EProgCounter(void);
  105.  
  106. extern Word Granularity(void);
  107.  
  108. extern Word ListGran(void);
  109.  
  110. extern void ChkSpace(Byte AddrSpace, unsigned AddrSpaceMask);
  111.  
  112.  
  113. extern void PrintUseList(void);
  114.  
  115. extern void ClearUseList(void);
  116.  
  117.  
  118. extern int CompressLine(const char *TokNam, unsigned TokenNum, struct as_dynstr *p_str, Boolean CaseSensitive);
  119.  
  120. extern void ExpandLine(const char *TokNam, unsigned TokenNum, struct as_dynstr *p_str);
  121.  
  122. extern void KillCtrl(char *Line);
  123.  
  124. #ifdef __TURBOC__
  125. extern void ChkStack(void);
  126.  
  127. extern void ResetStack(void);
  128.  
  129. extern LongWord StackRes(void);
  130. #else
  131. #define ChkStack() {}
  132. #define ResetStack() {}
  133. #define StackRes() 0
  134. #endif
  135.  
  136.  
  137. extern void AddCopyright(const char *NewLine);
  138.  
  139. extern void WriteCopyrights(void(*PrintProc)(const char *));
  140.  
  141.  
  142. extern char *ChkSymbNameUpTo(const char *pSym, const char *pUpTo);
  143. extern Boolean ChkSymbName(const char *pSym);
  144.  
  145. extern char *ChkMacSymbNameUpTo(const char *pSym, const char *pUpTo);
  146. extern Boolean ChkMacSymbName(const char *pSym);
  147. extern Boolean ChkMacSymbChar(char ch);
  148.  
  149. extern unsigned visible_strlen(const char *pSym);
  150.  
  151.  
  152. extern void AddIncludeList(const char *NewPath);
  153.  
  154. extern void RemoveIncludeList(const char *RemPath);
  155.  
  156.  
  157. extern void ClearOutList(void);
  158.  
  159. extern void AddToOutList(const char *NewName);
  160.  
  161. extern void RemoveFromOutList(const char *OldName);
  162.  
  163. extern char *MoveFromOutListFirst(void);
  164.  
  165.  
  166. extern void ClearShareOutList(void);
  167.  
  168. extern void AddToShareOutList(const char *NewName);
  169.  
  170. extern void RemoveFromShareOutList(const char *OldName);
  171.  
  172. extern char *MoveFromShareOutListFirst(void);
  173.  
  174.  
  175. extern void ClearListOutList(void);
  176.  
  177. extern void AddToListOutList(const char *NewName);
  178.  
  179. extern void RemoveFromListOutList(const char *OldName);
  180.  
  181. extern char *MoveFromListOutListFirst(void);
  182.  
  183.  
  184. extern void BookKeeping(void);
  185.  
  186.  
  187. extern long DTime(long t1, long t2);
  188.  
  189.  
  190. extern void InitPass(void);
  191. extern void AddInitPassProc(SimpProc NewProc);
  192.  
  193. extern void ClearUp(void);
  194. extern void AddClearUpProc(SimpProc NewProc);
  195.  
  196. extern void asmsub_init(void);
  197.  
  198. #include "asmerr.h"
  199.  
  200. #endif /* _ASMSUB_H */
  201.