1 /***************************************************************
2 **** Utils.h: Prototypes of useful functions ****
3 **** Free software under GNU license, started on 11/11/2000 ****
4 **** © T.Pierron, C.Guillaume. ****
5 ***************************************************************/
10 /*** Convert number to dec (left-aligned) ***/
11 WORD
AddNum(ULONG nb
, STRPTR buf
);
13 /*** Measure the maximal lenght of a NULL-terminated array of string ***/
14 WORD
meas_table(UBYTE
**strings
);
16 /*** Extract some information of a TextFont struct ***/
17 void font_info(UBYTE
*buf
, struct TextFont
*);
19 /*** Same job with a (struct Screen *) ***/
20 void scr_info(UBYTE
*buf
, WORD Width
, WORD Height
, WORD Depth
);
22 /*** Try to load an already loaded font ***/
23 struct TextFont
*get_old_font( STRPTR
/* name/size */ );
25 /*** Be sure a window fits in a screen ***/
26 void fit_in_screen(struct NewWindow
*, struct Screen
*);
28 /*** Performs some checks on what user has enterred ***/
29 void check_tab(struct Gadget
*);
31 /*** Set default preference ***/
34 /*** Save current configuration to restore it later if desired ***/
35 void save_config( char ConfigFile
);
37 /*** Restore config ***/
38 void restore_config( PREFS
* );
40 void load_pref(PREFS
*prefs
);
41 void save_pref_as(PREFS
*prefs
);
42 void default_prefs(PREFS
*prefs
);
50 #define ErrMsg(num) Errors[ num-ERR_BADOS ]
51 extern STRPTR Errors
[];