~ubuntu-branches/ubuntu/karmic/brltty/karmic

« back to all changes in this revision

Viewing changes to Programs/config.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-05-28 09:56:12 UTC
  • mfrom: (1.1.7 upstream) (2.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20090528095612-yt0urjjk7mdghsro
Tags: 4.0-6ubuntu1
* Merge from debian unstable, remaining changes:
  - Conflicts: libbrlapi, libbrlapi-dev, libbrlapi1-dev.
  - Add brltty-setup, installed in both the udeb and the normal system.
  - Add initramfs integration to run brltty-setup if necessary before
    usplash starts.
  - Add ubiquity integration to propagate any brltty configuration to the
    target system.
  - Add udev rules and /lib/brltty/brltty.sh to the normal (non-udeb)
    package as well.
  - Enable brltty if /etc/default/brltty has RUN_BRLTTY=yes, which is set
    by the installer if brltty is configured; add a NEWS entry for
    upgraders.
  - Install udev rules with the same name (85-brltty.rules) in the udeb as
    in the deb.
  - Only copy the brltty config file from the initramfs if the md5sum differs.
  - Change maintainer to Ubuntu Accessibility Developers
    <ubuntu-accessibility-devel@lists.ubuntu.com>
  - Disable BrlTTY grabbing devices that use the FTDI USB to serial chip.
  - Remove the dh-lisp build-dependency, remove the cl-brlapi package, and
    adjust the brltty package description accordingly. dh-lisp is not
    in main.
  - Do not build the speechd package, speech-dispatcher is not in main.
  - Build for python 2.6.
  - Build against openjdk in Ubuntu.
  - Put udev rules file in /lib/udev/rules.d.
  - Enable brltty at startup on the target system if the alternate installer
    is used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
368
368
 
369
369
  { .letter = 'k',
370
370
    .word = "key-table",
371
 
    .flags = OPT_Hidden | OPT_Config | OPT_Environ,
 
371
    .flags = OPT_Config | OPT_Environ,
372
372
    .argument = strtext("file"),
373
373
    .setting.string = &opt_keyTable,
374
374
    .description = strtext("Path to key table file.")
802
802
}
803
803
 
804
804
static void
805
 
resetStatusFields (void) {
806
 
  const unsigned char *fields = braille->statusFields;
 
805
resetStatusFields (const unsigned char *fields) {
807
806
  unsigned int count = brl.statusColumns * brl.statusRows;
808
807
 
809
808
  prefs.statusPosition = spNone;
824
823
    }
825
824
  }
826
825
 
 
826
  if (!fields) fields = braille->statusFields;
827
827
  if (!fields && count) {
828
828
    static const unsigned char fields1[] = {
829
829
      sfWindowRow, sfEnd
855
855
      sfEnd
856
856
    };
857
857
 
858
 
    static const unsigned char *fieldsTable[] = {
 
858
    static const unsigned char *const fieldsTable[] = {
859
859
      fields1, fields2, fields3, fields4, fields5, fields6, fields7
860
860
    };
861
861
    static const unsigned char fieldsCount = ARRAY_COUNT(fieldsTable);
937
937
  prefs.statusPosition = DEFAULT_STATUS_POSITION;
938
938
  prefs.statusCount = DEFAULT_STATUS_COUNT;
939
939
  prefs.statusSeparator = DEFAULT_STATUS_SEPARATOR;
940
 
  resetStatusFields();
 
940
  resetStatusFields(NULL);
941
941
  applyPreferences();
942
942
}
943
943
 
1039
1039
      }
1040
1040
 
1041
1041
      if (length < 58) {
 
1042
        const unsigned char *fields = NULL;
 
1043
 
 
1044
        {
 
1045
          static const unsigned char styleNone[] = {
 
1046
            sfEnd
 
1047
          };
 
1048
 
 
1049
          static const unsigned char styleAlva[] = {
 
1050
            sfAlphabeticCursorCoordinates, sfAlphabeticWindowCoordinates, sfStateLetter, sfEnd
 
1051
          };
 
1052
 
 
1053
          static const unsigned char styleTieman[] = {
 
1054
            sfCursorAndWindowColumn, sfCursorAndWindowRow, sfStateDots, sfEnd
 
1055
          };
 
1056
 
 
1057
          static const unsigned char stylePB80[] = {
 
1058
            sfWindowRow, sfEnd
 
1059
          };
 
1060
 
 
1061
          static const unsigned char styleConfigurable[] = {
 
1062
            sfGeneric, sfEnd
 
1063
          };
 
1064
 
 
1065
          static const unsigned char styleMDV[] = {
 
1066
            sfWindowCoordinates, sfEnd
 
1067
          };
 
1068
 
 
1069
          static const unsigned char styleVoyager[] = {
 
1070
            sfWindowRow, sfCursorRow, sfCursorColumn, sfEnd
 
1071
          };
 
1072
 
 
1073
          static const unsigned char styleTime[] = {
 
1074
            sfTime, sfEnd
 
1075
          };
 
1076
 
 
1077
          static const unsigned char *const styleTable[] = {
 
1078
            styleNone, styleAlva, styleTieman, stylePB80,
 
1079
            styleConfigurable, styleMDV, styleVoyager, styleTime
 
1080
          };
 
1081
          static const unsigned char styleCount = ARRAY_COUNT(styleTable);
 
1082
 
 
1083
          unsigned char style = ((const unsigned char *)&prefs)[38];
 
1084
 
 
1085
          if (style < styleCount) {
 
1086
            fields = styleTable[style];
 
1087
            if (*fields == sfEnd) fields = NULL;
 
1088
          }
 
1089
        }
 
1090
 
1042
1091
        length = 58;
1043
 
        resetStatusFields();
 
1092
        resetStatusFields(fields);
1044
1093
      }
1045
1094
 
1046
1095
      applyPreferences();
2187
2236
 
2188
2237
      if (isSerialDevice(&dev)) {
2189
2238
        static const char *const serialDrivers[] = {
2190
 
          "md", "pm", "ts", "ht", "bn", "al", "bm",
 
2239
          "md", "pm", "ts", "ht", "bn", "al", "bm", "pg", "sk",
2191
2240
          NULL
2192
2241
        };
2193
2242
        autodetectableDrivers = serialDrivers;
2197
2246
#ifdef ENABLE_USB_SUPPORT
2198
2247
      if (isUsbDevice(&dev)) {
2199
2248
        static const char *const usbDrivers[] = {
2200
 
          "al", "bm", "bs", "fs", "ht", "pm", "vo",
 
2249
          "al", "bm", "eu", "fs", "ht", "hm", "pg", "pm", "sk", "vo",
2201
2250
          NULL
2202
2251
        };
2203
2252
        autodetectableDrivers = usbDrivers;
2282
2331
    playTune(&tune_braille_on);
2283
2332
 
2284
2333
    if (clearStatusCells(&brl)) {
2285
 
      int flags = MSG_SILENT;
2286
 
      char banner[0X100];
2287
 
 
2288
 
      if (opt_quiet) flags |= MSG_NODELAY;
2289
 
      makeProgramBanner(banner, sizeof(banner));
2290
 
 
2291
 
      if (message(NULL, banner, flags)) return 1;
 
2334
      if (opt_quiet) return 1;
 
2335
 
 
2336
      {
 
2337
        int flags = MSG_SILENT;
 
2338
        char banner[0X100];
 
2339
 
 
2340
        makeProgramBanner(banner, sizeof(banner));
 
2341
        if (message(NULL, banner, flags)) return 1;
 
2342
      }
2292
2343
    }
2293
2344
 
2294
2345
    deactivateBrailleDriver();