Subversion Repositories pentevo

Rev

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

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