3 /* ddt_remote - Stuff needed to get datadescs about remote hosts */
5 /* Authors: Olivier Aumage, Martin Quinson */
6 /* Copyright (C) 2003, 2004 the GRAS posse. */
8 /* This program is free software; you can redistribute it and/or modify it
9 under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "DataDesc/datadesc_private.h"
15 *** Table of all known architectures.
18 const gras_arch_sizes_t gras_arch_sizes[gras_arch_count] = {
19 {"i386", 0, {1,2,4,4,8, 4,4, 4,8}}
25 * gime that memory back, dude. I mean it.
27 static void gras_free_ddt(void *ddt) {
28 gras_datadesc_type_t *type= (gras_datadesc_type_t *)ddt;
38 * Add a type to a type set
40 gras_error_t gras_ddt_register(gras_datadesc_type_t *type) {
41 return gras_set_add(gras_datadesc_set_local,
42 (gras_set_elm_t*)type,
48 * gras_ddt_get_by_name:
50 * Retrieve a type from its name
52 gras_error_t gras_ddt_get_by_name(const char *name,
53 gras_datadesc_type_t **type) {
54 return gras_set_get_by_name(gras_datadesc_set_local,name,(gras_set_elm_t**)type);
58 * gras_ddt_get_by_code:
60 * Retrieve a type from its name
62 gras_error_t gras_ddt_get_by_code(int code,
63 gras_datadesc_type_t **type) {
64 return gras_set_get_by_id(gras_datadesc_set_local,code,(gras_set_elm_t**)type);