revert between 56095 -> 55830 in arch
[AROS.git] / workbench / tools / Edit / Utility.h
blobc8e0ea087f1e27fc00e4c053baa6300a12ffd87f
1 /**************************************************************
2 **** Utility.h: Prototypes of nice and helpful functions ****
3 **** Free software under GNU license, written in 9/6/2000 ****
4 **************************************************************/
6 #ifndef UTILITY_H
7 #define UTILITY_H
9 #ifndef INTUITION_INTUITION_H
10 struct Window;
11 #endif
13 /** End of line markers (0 = CR, 1 = LF, 2 = CRLF) **/
14 extern const UBYTE chEOL[];
15 extern const UBYTE szEOL[];
17 /** Very simple SPrintf-like function **/
18 STRPTR my_SPrintf(STRPTR fmt, RAWARG data);
20 typedef struct
22 ULONG sa_NbArgs; /* Nb. of WBArg */
23 APTR sa_ArgLst; /* WBArg * */
24 UBYTE sa_Free; /* Must FreeVec()'ed sa_ArgLst */
25 } StartUpArgs;
27 /** Converts command line arguments into WBArg **/
28 void ParseArgs(StartUpArgs *, int nb, char **);
30 #ifndef UTILITY_C
31 /** List manipulation **/
32 void InsertAfter( void *It,void *Src );
34 void Destroy( void *First, void *p );
35 #endif
37 /** Get include file name **/
38 STRPTR GetIncludeFile( Project, LINE * );
40 /** Like CopyMem but copy buf from end instead of beg. **/
41 void MemMove(UBYTE *Src, UWORD Offset, LONG sz);
43 #ifndef JANOPREF
44 /** Pre-computes the 256 first tabstop **/
45 void init_tabstop(UBYTE ts);
46 #endif
48 /** Returns increment to next tabstop **/
49 UBYTE tabstop(ULONG);
51 /** Shutdown events coming to the window and change pointer **/
52 void BusyWindow(struct Window *);
54 /** Enable receiving events and reset pointer **/
55 void WakeUp(struct Window *);
57 /** Simple strings manipulation **/
58 STRPTR CatPath ( STRPTR dir, STRPTR file );
60 /** Display an error in title bar & start a countdown **/
61 void ThrowError (struct Window *, STRPTR);
62 void ThrowDOSError (struct Window *, STRPTR);
64 /** Update window title **/
65 void UpdateTitle(struct Window *, Project);
67 /** Stop countdown msg. and restore original title */
68 void StopError(struct Window *);
70 /** Check if path already exists **/
71 char warn_overwrite( STRPTR path );
73 /** Write column/line in top of window **/
74 void draw_info(Project p);
76 /** Avert user that its file has been modified **/
77 char warn_modif(Project p);
79 void show_info(Project p);
81 /** Simple requester to ask user for a number **/
82 int get_number( Project p, CONST_STRPTR title, LONG * result );
84 /** About requester messages **/
85 extern STRPTR JanoMessages[];
86 #define MsgAbout (JanoMessages + (MSG_ABOUT - ERR_BADOS))
88 #endif