Example #1
0
void gg_container_append(gg_container_t *container, gg_widget_t *widget) {
	list_append_item(container->widget_list, widget);
	widget->parent = GG_WIDGET(container);

	if (widget->enabled && widget->input)
		container->enabled = 1;
}
Example #2
0
/**
 * Get the next token from the file, using the delimiters to separate
 * tokens.  Don't cross newline boundaries.  
 *
 * @return 0 if successfully got a token, else nonzero.
 */
static int
next_token (extstring_t* token, 
	    FILE* f, 
	    const char delimiters[], 
	    const int ndelimiters)
{
  int retval = 0;
  char c;

  if (feof (f))
    return -1;
  retval = bebop_pass_delimiters (f, delimiters, ndelimiters);
  
  


  while (tosplit[i] != '\0')
    {
      int len = 0;
      int start = i;

      /* Get past the current range of delimiters */
      while (tosplit[i] != '\0' && 
	     char_member (tosplit[i], delimiters, ndelimiters))
	i++;
      if (tosplit[i] == '\0')
	return spl;
      start = i;
      /* Now tosplit[start] is a non-delimiter character */

      /* Get to the end of the delimiter characters */
      while (tosplit[i] != '\0' &&
	     ! char_member (tosplit[i], delimiters, ndelimiters))
	i++;
      len = start + i; /* doesn't matter if tosplit[i] is '\0' */
      spl.tokens = list_append_item (spl.tokens, 
				     bebop_strdup_range (tosplit, start, len));
      spl.ntokens++;
    }
  return spl;

  ...
}
Example #3
0
struct list *list_append_data(struct list *list, void *data)
{
	return list_append_item(list, list_alloc_item(data));
}
Example #4
0
File: list.c Project: shouya/clisp
static void list_parse_commit(List* lst, const char* str) {
  if (strlen(str) == 0) return;
  list_append_item(lst, atom_parse_string(str));
}