[Cfengine-3] / trunk / src / conversion.c Repository:
ViewVC logotype

Annotation of /trunk/src/conversion.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download) (as text)

1 : mark 1 /*****************************************************************************/
2 :     /* */
3 :     /* File: conversion.c */
4 :     /* */
5 :     /* Created: Sun Sep 30 11:26:04 2007 */
6 :     /* */
7 :     /* Author: > */
8 :     /* */
9 :     /* Revision: $Id$ */
10 :     /* */
11 :     /* Description: */
12 :     /* */
13 :     /*****************************************************************************/
14 :    
15 :    
16 :     #include "cf3.defs.h"
17 :     #include "cf3.extern.h"
18 :    
19 :    
20 :     /****************************************************************************/
21 :    
22 :     enum cfdatatype Typename2Datatype(char *name)
23 :    
24 :     /* convert abstract data type names: int, ilist etc */
25 :    
26 :     { int i;
27 :    
28 :     Debug("typename2type(%s)\n",name);
29 :    
30 :     for (i = 0; i < (int)cf_notype; i++)
31 :     {
32 :     if (strcmp(CF_DATATYPES[i],name)==0)
33 :     {
34 :     break;
35 :     }
36 :     }
37 :    
38 :     return (enum cfdatatype)i;
39 :     }
40 :    
41 :    
42 :     /****************************************************************************/
43 :    
44 :     enum cfdatatype GetControlDatatype(char *varname,struct BodySyntax *bp)
45 :    
46 :     { int i = 0;
47 :    
48 :     for (i = 0; bp[i].range != NULL; i++)
49 :     {
50 :     if (strcmp(bp[i].lval,varname) == 0)
51 :     {
52 :     return bp[i].dtype;
53 :     }
54 :     }
55 :    
56 :     return cf_notype;
57 :     }

Administrator
ViewVC Help
Powered by ViewVC 1.0.3