Reference

makefallb(1)

Take an X resource file and write an Ada source file

NAME

makefallb - Take an X resource file and write an Ada source file

SYNOPSIS

makefallb resource_file > fallback.ads

DESCRIPTION

makefallb reads a text file containing X resources, and produces an Ada source file containing these resources as a hardcoded array of strings. You then pass this array to X_Toolkit.Xt_App_Initialize or X_Toolkit.Xt_Open_Application as the Fallback_Resources parameter. This way, you can provide hardcoded defaults in your application.

For a complete description of X resources and X resource files, see X(1) under RESOURCES.

The name of the Ada package is always Fallback; it contains a single public variable, the name of which is derived from the name of the resource_file by removing the extension from the file name and adding "_Fallback".

EXAMPLE

My ~/.Xresources file contains the following text:

Emacs.font: -*-fixed-*-*-*-*-13-*-*-*-*-*-*-*

$ makefallb ~/.Xresources > fallback.ads

MakeFallback V1.3 -- (c)1996-2001 Hans-Frieder Vogt
(c)2001 Vadim Godunko

rewrites resource file so that they can be included in an Ada program

$ cat fallback.ads with String_List; use String_List; package Fallback is

Xresources_Fallback : String_List.Element_Access_List :=
String_List.Null_Element_Access_List &

"Emacs.font: -*-fixed-*-*-*-*-13-*-*-*-*-*-*-*";

end Fallback;

Now it is possible to use these resources when initialising an application, like this:

with X_Toolkit, Fallback;

...
X_Toolkit.Xt_App_Initialize (
...
Fallback_Resources => Fallback.Xresouces_Fallback,
...);

BUGS

The name of the Ada package cannot be changed, except by editing the Ada source file.

AUTHOR

makefallb was written by Hans-Frieder Vogt <[email protected]> with contributions from Vadim Godunko <[email protected]>.

This manual page was written by Ludovic Brenta <[email protected]> for Debian GNU/Linux.

SEE ALSO

X(1), XtAppInitialize(3xt), XtOpenApplication(3xt)