~ubuntu-branches/debian/squeeze/nas/squeeze

« back to all changes in this revision

Viewing changes to server/dda/hpux/config.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve McIntyre
  • Date: 2008-10-08 01:18:19 UTC
  • mfrom: (4.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081008011819-wmr4h2w0298k8t7z
Tags: 1.9.1-5
* Fix pending l10n issues. Debconf translations:
* Swedish. Closes: #491766 (thanks to brother@bsnet.se)
* Arabic. Closes: #500437 (thanks to Ossama Khayat)
* Basque. Closes: #500533 (thanks to Piarres Beobide)
* Brazilian Portuguese. Closes: #500973 (thanks to Felipe
  Augusto van de Wiel)
* Many thanks again to Christian Perrier for his i18n efforts,
  co-ordinating the above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* config.c - configuration setting and functions for this server 
2
2
 *
3
 
 * $Id: config.c,v 1.3 2002/07/12 04:44:15 jon Exp $
 
3
 * $Id: config.c 166 2006-07-26 23:56:34Z jon $
4
4
 *
5
5
 */
6
6
 
14
14
 
15
15
extern int OutputDevType;
16
16
 
17
 
void ddaSetConfig(int token, void *value)
 
17
void
 
18
ddaSetConfig(int token, void *value)
18
19
{
19
 
  int num;
20
 
  char *str;
21
 
 
22
 
  /* a switch statement based on the lex/yacc token (defined in 
23
 
     ../../dia/gram.h) is done here... Ignore any token not handled
24
 
     or understood by this server */
25
 
 
26
 
  switch(token)
27
 
    {
 
20
    int num;
 
21
    char *str;
 
22
 
 
23
    /* a switch statement based on the lex/yacc token (defined in 
 
24
       ../../dia/gram.h) is done here... Ignore any token not handled
 
25
       or understood by this server */
 
26
 
 
27
    switch (token) {
28
28
 
29
29
    case OUTDEVTYPE:
30
 
      str = (char *) value;
31
 
      if (!strcmp(str, "ext") ||
32
 
          !strcmp(str, "EXT"))
33
 
        {
34
 
          OutputDevType = AUDIO_OUT_EXTERNAL;
35
 
          if (NasConfig.DoDebug)
36
 
            osLogMsg("### Intializing to AUDIO_OUT_EXTERNAL\n");
37
 
        }
38
 
      else if (!strcmp(str, "int") ||
39
 
          !strcmp(str, "INT"))
40
 
        {
41
 
          OutputDevType = AUDIO_OUT_INTERNAL;
42
 
          if (NasConfig.DoDebug)
43
 
            osLogMsg("### Intializing to AUDIO_OUT_INTERNAL\n");
44
 
        }
45
 
      else                      /* default - external */
46
 
        {
47
 
          OutputDevType = AUDIO_OUT_EXTERNAL;
48
 
          osLogMsg("ddaSetConfig(): unknown OutDevType '%s'\n", str);
49
 
        }
50
 
 
51
 
      break;
52
 
 
53
 
    default:                    /* ignore any other tokens */
54
 
      if (NasConfig.DoDebug > 5)
55
 
        osLogMsg("ddaSetConfig(): WARNING: unknown token %d, ignored\n", token);
56
 
 
57
 
      break;
 
30
        str = (char *) value;
 
31
        if (!strcmp(str, "ext") || !strcmp(str, "EXT")) {
 
32
            OutputDevType = AUDIO_OUT_EXTERNAL;
 
33
            if (NasConfig.DoDebug)
 
34
                osLogMsg("### Intializing to AUDIO_OUT_EXTERNAL\n");
 
35
        } else if (!strcmp(str, "int") || !strcmp(str, "INT")) {
 
36
            OutputDevType = AUDIO_OUT_INTERNAL;
 
37
            if (NasConfig.DoDebug)
 
38
                osLogMsg("### Intializing to AUDIO_OUT_INTERNAL\n");
 
39
        } else {                /* default - external */
 
40
 
 
41
            OutputDevType = AUDIO_OUT_EXTERNAL;
 
42
            osLogMsg("ddaSetConfig(): unknown OutDevType '%s'\n", str);
 
43
        }
 
44
 
 
45
        break;
 
46
 
 
47
    default:                   /* ignore any other tokens */
 
48
        if (NasConfig.DoDebug > 5)
 
49
            osLogMsg("ddaSetConfig(): WARNING: unknown token %d, ignored\n", token);
 
50
 
 
51
        break;
58
52
    }
59
53
 
60
 
  return;                       /* that's it... */
61
 
}
62
 
      
63
 
int ddaProcessArg(int *index, int argc, char *argv[])
64
 
{
65
 
                                /* If you have an option that takes an
66
 
                                   arguement, be sure to increment
67
 
                                   index after processing the arg,
68
 
                                   otherwise, leave it alone. 
69
 
                                   DO NOT MODIFY argv! */
70
 
 
71
 
                                /* nothing here yet... */
72
 
 
73
 
                                /* always return 1 to indicate failure */
74
 
  return(1);
75
 
}
76
 
 
77
 
void ddaUseMsg(void)
78
 
{
79
 
                                /* print usage summary for this server,
80
 
                                   called from UseMsg() in utils.c */
81
 
  ErrorF("\nNo Server specific options supported.\n");
82
 
 
83
 
  return;
84
 
}
85
 
 
 
54
    return;                     /* that's it... */
 
55
}
 
56
 
 
57
int
 
58
ddaProcessArg(int *index, int argc, char *argv[])
 
59
{
 
60
    /* If you have an option that takes an
 
61
       arguement, be sure to increment
 
62
       index after processing the arg,
 
63
       otherwise, leave it alone. 
 
64
       DO NOT MODIFY argv! */
 
65
 
 
66
    /* nothing here yet... */
 
67
 
 
68
    /* always return 1 to indicate failure */
 
69
    return (1);
 
70
}
 
71
 
 
72
void
 
73
ddaUseMsg(void)
 
74
{
 
75
    /* print usage summary for this server,
 
76
       called from UseMsg() in utils.c */
 
77
    ErrorF("\nNo Server specific options supported.\n");
 
78
 
 
79
    return;
 
80
}