/**
 * anjuta_plugin_description_get_raw:
 * @df: an #AnjutaPluginDescription object.
 * @section_name: Name of the section.
 * @keyname: Name of the key.
 * @locale: The locale for which the value is to be retrieved.
 * @val: (out) (transfer full) (allow-none): Pointer to the variable to store the string value.
 *
 * Retrieves the value of a key (in the given section) for the given locale.
 * The value returned in @val must be freed after use.
 *
 * Return value: %TRUE if sucessful, otherwise %FALSE.
 */
gboolean
anjuta_plugin_description_get_raw (AnjutaPluginDescription *df,
			    const char    *section_name,
			    const char    *keyname,
			    const char    *locale,
			    char         **val)
{
  AnjutaPluginDescriptionSection *section;
  AnjutaPluginDescriptionLine *line;

  *val = NULL;

  section = lookup_section (df, section_name);
  if (!section)
    return FALSE;

  line = lookup_line (df,
		      section,
		      keyname,
		      locale);

  if (!line)
    return FALSE;
  
  *val = g_strdup (line->value);
  
  return TRUE;
}
dbus_bool_t
bus_desktop_file_get_raw (BusDesktopFile  *desktop_file,
			  const char      *section_name,
			  const char      *keyname,
			  const char     **val)
{
  BusDesktopFileSection *section;
  BusDesktopFileLine *line;

  *val = NULL;

  section = lookup_section (desktop_file, section_name);
  
  if (!section)
    return FALSE;

  line = lookup_line (desktop_file,
		      section,
		      keyname);

  if (!line)
    return FALSE;
  
  *val = line->value;
  
  return TRUE;
}
Exemplo n.º 3
0
 int  lookup_ip(int line) // override
 {
  LineInfo li;
  li.line = line;
  if (lookup_line(li,false)) return li.ip_offset;
  else return 0;
 }
Exemplo n.º 4
0
/**
 * gnome_theme_file_get_raw:
 * @df: A #GnomeThemeFile. 
 * @section: the string representing the section name
 * @keyname: the string representing the key name.
 * @locale: the string representing the locale. 
 * @val: a char**. 
 *
 * Searches section name and line in the #GnomeThemeFile data structure.
 * If found, sets the @val to value field in GnomeThemeFileLine and returns a boolean value.
 * 
 * Returns: TRUE if section and line were found in the #GnomeThemeFile, FALSE otherwise.
 * 
 * Since: 2.2
 **/ 
gboolean
gnome_theme_file_get_raw (GnomeThemeFile	*df,
			    const char		*section_name,
			    const char    	*keyname,
			    const char    	*locale,
			    char         	**val)
{
  GnomeThemeFileSection *section;
  GnomeThemeFileLine *line;

  *val = NULL;

  section = lookup_section (df, section_name);
  if (!section)
    return FALSE;

  line = lookup_line (df,
		      section,
		      keyname,
		      locale);

  if (!line)
    return FALSE;
  
  *val = g_strdup (line->value);
  
  return TRUE;
}
Exemplo n.º 5
0
	void CParser::parse(const std::string& command)
	{
		if(current_mode.top().super_mode == ESM_EDIT) lookup_line(command);
		for(std::string::const_iterator i = command.begin(); i != command.end(); ++i)
		{
			parse_char(*i);
		}
	}