home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / ftes46b5.zip / ftes46b5 / src / o_messages.h < prev    next >
C/C++ Source or Header  |  1997-05-30  |  2KB  |  88 lines

  1. /*    o_messages.h
  2.  *
  3.  *    Copyright (c) 1994-1996, Marko Macek
  4.  *
  5.  *    You may distribute under the terms of either the GNU General Public
  6.  *    License or the Artistic License, as specified in the README file.
  7.  *
  8.  */
  9.  
  10. #ifndef __MESSAGES_H__
  11. #define __MESSAGES_H__
  12.  
  13. #ifdef CONFIG_OBJ_MESSAGES
  14. typedef struct {
  15.     char *file;
  16.     int line;
  17.     char *msg;
  18.     char *text;
  19.     EBuffer *Buf;
  20. } Error;
  21.  
  22. struct aDir
  23. {
  24.     aDir*       next;
  25.     char*       name;
  26. };
  27.  
  28. class EMessages: public EList {
  29. public:
  30.     char *Command;
  31.     char *Directory;
  32.     
  33.     int ErrCount;
  34.     Error **ErrList;
  35.     int Running;
  36.  
  37.     int BufLen;
  38.     int BufPos;
  39.     int PipeId;
  40.     int ReturnCode;
  41.     int MatchCount;
  42.     char MsgBuf[4096];
  43.     aDir*   curr_dir;                       // top of dir stack.
  44.     
  45.     EMessages(int createFlags, EModel **ARoot, char *Dir, char *ACommand);
  46.     ~EMessages();
  47.     void freeDirStack();
  48.  
  49.     virtual void NotifyDelete(EModel *Deleting);
  50.     void FindErrorFiles();
  51.     void FindErrorFile(int err);
  52.     void AddFileError(EBuffer *B, int err);
  53.     void FindFileErrors(EBuffer *B);
  54.     
  55.     virtual int GetContext() { return CONTEXT_MESSAGES; }
  56.     virtual EEventMap *GetEventMap();
  57.     virtual int ExecCommand(int Command, ExState &State);
  58.  
  59.     void AddError(Error *p);
  60.     void AddError(char *file, int line, char *msg, char *text);
  61.     
  62.     void FreeErrors();
  63.     int GetLine(char *Line, int max);
  64.     void GetErrors();
  65.     int Compile(char *Command);
  66.     void ShowError(EView *V, int err);
  67.     void DrawLine(PCell B, int Line, int Col, ChColor color, int Width);
  68.     char* FormatLine(int Line);
  69.     void UpdateList();
  70.     int Activate(int No);
  71.     int CanActivate(int Line);
  72.     void NotifyPipe(int APipeId);
  73.     virtual void GetName(char *AName, int MaxLen);
  74.     virtual void GetInfo(char *AInfo, int MaxLen);
  75.     virtual void GetPath(char *APath, int MaxLen);
  76.     virtual void GetTitle(char *ATitle, int MaxLen, char *ASTitle, int SMaxLen);
  77.  
  78.     int RunPipe(char *Dir, char *Command);
  79.     
  80.     int CompilePrevError(EView *V);
  81.     int CompileNextError(EView *V);
  82. };
  83.  
  84. extern EMessages *CompilerMsgs;
  85. #endif
  86.  
  87. #endif
  88.