---
name: "makefallb"
section: "1"
platform: "linux"
package: "libadabindx-dev"
version: "0.7.2-4"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/makefallb"
---

# 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 \<hfvogt@nexgo.de\> with contributions from Vadim Godunko \<vadik@zto.rost.ru\>.

This manual page was written by Ludovic Brenta \<ludovic.brenta@insalien.org\> for Debian GNU/Linux.

## SEE ALSO

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