gattrib

s_attrib.c File Reference

Functions to operate on attributes in STRING_LISTs. More...

#include <config.h>
#include <stdio.h>
#include <math.h>
#include <libgeda/libgeda.h>
#include "../include/struct.h"
#include "../include/prototype.h"
#include "../include/globals.h"
Include dependency graph for s_attrib.c:

Go to the source code of this file.

Functions

int s_attrib_name_in_list (STRING_LIST *name_value_list, char *name)
 Detect "name" in STRING_LIST.
char * s_attrib_get_refdes (OBJECT *object)
 Locate the refdes associated with an object.

Detailed Description

Various functions to operate on attribute name=value pairs in supplied STRING_LIST structs.

Definition in file s_attrib.c.


Function Documentation

int s_attrib_name_in_list ( STRING_LIST name_value_list,
char *  name 
)

This function is passed a STRING_LIST of name=value pairs, and a name.

Parameters:
name_value_listpointer to STRING_LIST to search
namename string to search for
Returns:
1 (TRUE) if the name is in the STRING_LIST, otherwise it returns 0 (FALSE).

Definition at line 59 of file s_attrib.c.

char* s_attrib_get_refdes ( OBJECT *  object)

This fcn takes an object, finds its refdes and returns it.

Parameters:
objectPointer to the object to search for.
Returns:
For normal components, it returns a pointer to a string containing the refdes. If the component is slotted, it returns a refdes of the form refdes.slot. If no refdes is found, it returns NULL.

Definition at line 92 of file s_attrib.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines