Next: Writing new functions Up: Using Smac Previous: Color syntax highlighting

# Browser

Smac allows to customize the browser and to access its database. Here are some functions:

- void browser_set_pp(char * mode, char * exec)
- void browser_set_pp_options(char * mode, char *options)

Your .xcoralrc file is a good place to indicate where the pre-processors are (see §7.3.12 page ), and their options. browser_set_pp_options function (see §7.3.12 page ) forces browser toggle button to Prepr if its second argument is not 0, even if the pre-processor option list is empty (i.e. the second argument is the empty string "").

    	browser_set_pp("C-mode", "/lib/cpp"); /* default */
    	browser_set_pp("C++mode", "/lib/cpp"); /* default */

    	browser_set_pp_options("C-mode", "-DDEBUG");
    	browser_set_pp_options("C++mode", 0); /* no pre-processing in c++ */

- void browser_add(char * file_or_dir [, int rec])

  parses the given file or directory, forces the browser toggle button to Rec if the second argument is given and not equal to 0.

- int browser_dump(char * file)

  returns 1 if the dump can be realized, else 0 (file is write protected or other error).

- int browser_restore(char * file)

  returns 1 on success, else 0 (file doesn't not exist or other error).

- void browser_show_all()

  to see all browser information.

- char ** browser_functions(char * prefix)

  returns the functions list which name begins with prefix