1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: xdefaults.c |
2 | * File: xdefaults.c |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * $Id: xdefaults.C,v 1.7 2004/01/16 22:26:18 pcg Exp $ |
4 | * $Id: xdefaults.C,v 1.8 2004/01/31 00:20:21 pcg Exp $ |
5 | * |
5 | * |
6 | * All portions of code are copyright by their respective author/s. |
6 | * All portions of code are copyright by their respective author/s. |
7 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
7 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
8 | * - original version |
8 | * - original version |
9 | * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> |
9 | * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> |
… | |
… | |
354 | |
354 | |
355 | #define INDENT 18 |
355 | #define INDENT 18 |
356 | |
356 | |
357 | /*{{{ usage: */ |
357 | /*{{{ usage: */ |
358 | /*----------------------------------------------------------------------*/ |
358 | /*----------------------------------------------------------------------*/ |
359 | /* EXTPROTO */ |
359 | static void |
360 | void |
|
|
361 | rxvt_usage(int type) |
360 | rxvt_usage(int type) |
362 | { |
361 | { |
363 | unsigned int i, col; |
362 | unsigned int i, col; |
364 | |
363 | |
365 | write(STDERR_FILENO, releasestring, sizeof(releasestring) - 1); |
364 | write(STDERR_FILENO, releasestring, sizeof(releasestring) - 1); |
… | |
… | |
440 | } |
439 | } |
441 | |
440 | |
442 | /*}}} */ |
441 | /*}}} */ |
443 | |
442 | |
444 | /*{{{ get command-line options before getting resources */ |
443 | /*{{{ get command-line options before getting resources */ |
445 | /* EXTPROTO */ |
|
|
446 | void |
444 | void |
447 | rxvt_get_options(pR_ int argc, const char *const *argv) |
445 | rxvt_term::get_options (int argc, const char *const *argv) |
448 | { |
446 | { |
449 | int i, bad_option = 0; |
447 | int i, bad_option = 0; |
450 | static const char On[3] = "ON", Off[4] = "OFF"; |
448 | static const char On[3] = "ON", Off[4] = "OFF"; |
451 | |
449 | |
452 | for (i = 1; i < argc; i++) { |
450 | for (i = 1; i < argc; i++) { |
… | |
… | |
496 | #endif |
494 | #endif |
497 | if (flag == On && str && (optList[entry].doff != -1)) { |
495 | if (flag == On && str && (optList[entry].doff != -1)) { |
498 | #ifdef DEBUG_RESOURCES |
496 | #ifdef DEBUG_RESOURCES |
499 | fprintf(stderr, "\"%s\"\n", str); |
497 | fprintf(stderr, "\"%s\"\n", str); |
500 | #endif |
498 | #endif |
501 | R->rs[optList[entry].doff] = str; |
499 | rs[optList[entry].doff] = str; |
502 | /* |
500 | /* |
503 | * special cases are handled in main.c:main() to allow |
501 | * special cases are handled in main.c:main() to allow |
504 | * X resources to set these values before we settle for |
502 | * X resources to set these values before we settle for |
505 | * default values |
503 | * default values |
506 | */ |
504 | */ |
… | |
… | |
513 | #ifdef DEBUG_RESOURCES |
511 | #ifdef DEBUG_RESOURCES |
514 | fprintf(stderr, "boolean (%s,%s) = %s\n", |
512 | fprintf(stderr, "boolean (%s,%s) = %s\n", |
515 | optList[entry].opt, optList[entry].kw, flag); |
513 | optList[entry].opt, optList[entry].kw, flag); |
516 | #endif |
514 | #endif |
517 | if (flag == On) |
515 | if (flag == On) |
518 | R->Options |= (optList[entry].flag); |
516 | Options |= (optList[entry].flag); |
519 | else |
517 | else |
520 | R->Options &= ~(optList[entry].flag); |
518 | Options &= ~(optList[entry].flag); |
521 | |
519 | |
522 | if (optList[entry].doff != -1) |
520 | if (optList[entry].doff != -1) |
523 | R->rs[optList[entry].doff] = flag; |
521 | rs[optList[entry].doff] = flag; |
524 | } |
522 | } |
525 | } else |
523 | } else |
526 | #ifdef KEYSYM_RESOURCE |
524 | #ifdef KEYSYM_RESOURCE |
527 | /* if (!STRNCMP(opt, "keysym.", sizeof("keysym.") - 1)) */ |
525 | /* if (!STRNCMP(opt, "keysym.", sizeof("keysym.") - 1)) */ |
528 | if (rxvt_Str_match(opt, "keysym.")) { |
526 | if (rxvt_Str_match(opt, "keysym.")) { |
529 | const char *str = argv[++i]; |
527 | const char *str = argv[++i]; |
530 | |
528 | |
531 | if (str != NULL) |
529 | if (str != NULL) |
532 | rxvt_parse_keysym(aR_ opt + sizeof("keysym.") - 1, str); |
530 | parse_keysym (opt + sizeof("keysym.") - 1, str); |
533 | } else |
531 | } else |
534 | #endif |
532 | #endif |
535 | bad_option = 1; |
533 | bad_option = 1; |
536 | } |
534 | } |
537 | |
535 | |
… | |
… | |
550 | * quarks will be something like |
548 | * quarks will be something like |
551 | * "rxvt" "keysym" "0xFF01" |
549 | * "rxvt" "keysym" "0xFF01" |
552 | * value will be a string |
550 | * value will be a string |
553 | */ |
551 | */ |
554 | /* ARGSUSED */ |
552 | /* ARGSUSED */ |
555 | /* INTPROTO */ |
|
|
556 | Bool |
553 | bool |
557 | rxvt_define_key(XrmDatabase *database __attribute__((unused)), XrmBindingList bindings __attribute__((unused)), XrmQuarkList quarks, XrmRepresentation *type __attribute__((unused)), XrmValue *value, XPointer closure __attribute__((unused))) |
554 | rxvt_define_key(XrmDatabase *database __attribute__((unused)), XrmBindingList bindings __attribute__((unused)), XrmQuarkList quarks, XrmRepresentation *type __attribute__((unused)), XrmValue *value, XPointer closure __attribute__((unused))) |
558 | { |
555 | { |
559 | dR; |
|
|
560 | int last; |
556 | int last; |
561 | |
557 | |
562 | for (last = 0; quarks[last] != NULLQUARK; last++) /* look for last quark in list */ |
558 | for (last = 0; quarks[last] != NULLQUARK; last++) /* look for last quark in list */ |
563 | ; |
559 | ; |
564 | last--; |
560 | last--; |
565 | rxvt_parse_keysym(aR_ XrmQuarkToString(quarks[last]), (char *)value->addr); |
561 | GET_R->parse_keysym (XrmQuarkToString(quarks[last]), (char *)value->addr);//D//TODO |
566 | return False; |
562 | return False; |
567 | } |
563 | } |
568 | |
564 | |
569 | /* |
565 | /* |
570 | * look for something like this (XK_Delete) |
566 | * look for something like this (XK_Delete) |
… | |
… | |
573 | * arg will be |
569 | * arg will be |
574 | * NULL for ~/.Xdefaults and |
570 | * NULL for ~/.Xdefaults and |
575 | * non-NULL for command-line options (need to allocate) |
571 | * non-NULL for command-line options (need to allocate) |
576 | */ |
572 | */ |
577 | #define NEWARGLIM 500 /* `reasonable' size */ |
573 | #define NEWARGLIM 500 /* `reasonable' size */ |
578 | /* INTPROTO */ |
|
|
579 | int |
574 | int |
580 | rxvt_parse_keysym(pR_ const char *str, const char *arg) |
575 | rxvt_term::parse_keysym (const char *str, const char *arg) |
581 | { |
576 | { |
582 | int n, sym; |
577 | int n, sym; |
583 | char *key_string, *newarg = NULL; |
578 | char *key_string, *newarg = NULL; |
584 | char newargstr[NEWARGLIM]; |
579 | char newargstr[NEWARGLIM]; |
585 | |
580 | |
… | |
… | |
620 | } |
615 | } |
621 | |
616 | |
622 | if (sym < 0xFF00 || sym > 0xFFFF) /* we only do extended keys */ |
617 | if (sym < 0xFF00 || sym > 0xFFFF) /* we only do extended keys */ |
623 | return -1; |
618 | return -1; |
624 | sym &= 0xFF; |
619 | sym &= 0xFF; |
625 | if (R->Keysym_map[sym] != NULL) /* already set ? */ |
620 | if (Keysym_map[sym] != NULL) /* already set ? */ |
626 | return -1; |
621 | return -1; |
627 | |
622 | |
628 | if (newarg == NULL) { |
623 | if (newarg == NULL) { |
629 | STRNCPY(newargstr, arg, NEWARGLIM - 1); |
624 | STRNCPY(newargstr, arg, NEWARGLIM - 1); |
630 | newargstr[NEWARGLIM - 1] = '\0'; |
625 | newargstr[NEWARGLIM - 1] = '\0'; |
… | |
… | |
636 | MIN_IT(n, 255); |
631 | MIN_IT(n, 255); |
637 | key_string = (char *)rxvt_malloc((n + 1) * sizeof(char)); |
632 | key_string = (char *)rxvt_malloc((n + 1) * sizeof(char)); |
638 | |
633 | |
639 | key_string[0] = n; |
634 | key_string[0] = n; |
640 | STRNCPY(key_string + 1, newarg, n); |
635 | STRNCPY(key_string + 1, newarg, n); |
641 | R->Keysym_map[sym] = (unsigned char *)key_string; |
636 | Keysym_map[sym] = (unsigned char *)key_string; |
642 | |
637 | |
643 | return 1; |
638 | return 1; |
644 | } |
639 | } |
645 | |
640 | |
646 | # endif /* KEYSYM_RESOURCE */ |
641 | # endif /* KEYSYM_RESOURCE */ |
… | |
… | |
648 | # ifndef USE_XGETDEFAULT |
643 | # ifndef USE_XGETDEFAULT |
649 | /*{{{ rxvt_get_xdefaults() */ |
644 | /*{{{ rxvt_get_xdefaults() */ |
650 | /* |
645 | /* |
651 | * the matching algorithm used for memory-save fake resources |
646 | * the matching algorithm used for memory-save fake resources |
652 | */ |
647 | */ |
653 | /* INTPROTO */ |
|
|
654 | void |
648 | void |
655 | rxvt_get_xdefaults(pR_ FILE *stream, const char *name) |
649 | rxvt_term::get_xdefaults (FILE *stream, const char *name) |
656 | { |
650 | { |
657 | unsigned int len; |
651 | unsigned int len; |
658 | char *str, buffer[256]; |
652 | char *str, buffer[256]; |
659 | |
653 | |
660 | if (stream == NULL) |
654 | if (stream == NULL) |
… | |
… | |
670 | || (len && STRNCMP(str, name, len))) |
664 | || (len && STRNCMP(str, name, len))) |
671 | continue; |
665 | continue; |
672 | str += (len + 1); /* skip `name*' or `name.' */ |
666 | str += (len + 1); /* skip `name*' or `name.' */ |
673 | |
667 | |
674 | # ifdef KEYSYM_RESOURCE |
668 | # ifdef KEYSYM_RESOURCE |
675 | if (!rxvt_parse_keysym(aR_ str, NULL)) |
669 | if (!parse_keysym (str, NULL)) |
676 | # endif /* KEYSYM_RESOURCE */ |
670 | # endif /* KEYSYM_RESOURCE */ |
677 | for (entry = 0; entry < optList_size(); entry++) { |
671 | for (entry = 0; entry < optList_size(); entry++) { |
678 | const char *kw = optList[entry].kw; |
672 | const char *kw = optList[entry].kw; |
679 | |
673 | |
680 | if (kw == NULL) |
674 | if (kw == NULL) |
… | |
… | |
683 | if (str[n] == ':' && rxvt_Str_match(str, kw)) { |
677 | if (str[n] == ':' && rxvt_Str_match(str, kw)) { |
684 | /* skip `keyword:' */ |
678 | /* skip `keyword:' */ |
685 | str += (n + 1); |
679 | str += (n + 1); |
686 | rxvt_Str_trim(str); |
680 | rxvt_Str_trim(str); |
687 | n = STRLEN(str); |
681 | n = STRLEN(str); |
688 | if (n && R->rs[optList[entry].doff] == NULL) { |
682 | if (n && rs[optList[entry].doff] == NULL) { |
689 | /* not already set */ |
683 | /* not already set */ |
690 | int s; |
684 | int s; |
691 | char *p = (char *)rxvt_malloc((n + 1) * sizeof(char)); |
685 | char *p = (char *)rxvt_malloc((n + 1) * sizeof(char)); |
692 | |
686 | |
693 | STRCPY(p, str); |
687 | STRCPY(p, str); |
694 | R->rs[optList[entry].doff] = p; |
688 | rs[optList[entry].doff] = p; |
695 | if (optList_isBool(entry)) { |
689 | if (optList_isBool(entry)) { |
696 | s = STRCASECMP(str, "TRUE") == 0 |
690 | s = STRCASECMP(str, "TRUE") == 0 |
697 | || STRCASECMP(str, "YES") == 0 |
691 | || STRCASECMP(str, "YES") == 0 |
698 | || STRCASECMP(str, "ON") == 0 |
692 | || STRCASECMP(str, "ON") == 0 |
699 | || STRCASECMP(str, "1") == 0; |
693 | || STRCASECMP(str, "1") == 0; |
700 | if (optList_isReverse(entry)) |
694 | if (optList_isReverse(entry)) |
701 | s = !s; |
695 | s = !s; |
702 | if (s) |
696 | if (s) |
703 | R->Options |= (optList[entry].flag); |
697 | Options |= (optList[entry].flag); |
704 | else |
698 | else |
705 | R->Options &= ~(optList[entry].flag); |
699 | Options &= ~(optList[entry].flag); |
706 | } |
700 | } |
707 | } |
701 | } |
708 | break; |
702 | break; |
709 | } |
703 | } |
710 | } |
704 | } |
… | |
… | |
719 | /*{{{ read the resources files */ |
713 | /*{{{ read the resources files */ |
720 | /* |
714 | /* |
721 | * using XGetDefault() or the hand-rolled replacement |
715 | * using XGetDefault() or the hand-rolled replacement |
722 | */ |
716 | */ |
723 | /* ARGSUSED */ |
717 | /* ARGSUSED */ |
724 | /* EXTPROTO */ |
|
|
725 | void |
718 | void |
726 | rxvt_extract_resources(pR_ Display *display __attribute__((unused)), const char *name) |
719 | rxvt_term::extract_resources (Display *display __attribute__((unused)), const char *name) |
727 | { |
720 | { |
728 | #ifndef NO_RESOURCES |
721 | #ifndef NO_RESOURCES |
729 | |
722 | |
730 | # if defined XAPPLOADDIR |
723 | # if defined XAPPLOADDIR |
731 | # if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) |
724 | # if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) |
732 | /* Compute the path of the possibly available localized Rxvt file */ |
725 | /* Compute the path of the possibly available localized Rxvt file */ |
733 | char *localepath = NULL; |
726 | char *localepath = NULL; |
734 | |
727 | |
735 | if (R->locale != NULL) { /* XXX: must limit length of string */ |
728 | if (locale != NULL) { /* XXX: must limit length of string */ |
736 | localepath = (char *)rxvt_malloc(256); |
729 | localepath = (char *)rxvt_malloc(256); |
737 | sprintf(localepath, XAPPLOADDIRLOCALE "/" APL_SUBCLASS, |
730 | sprintf(localepath, XAPPLOADDIRLOCALE "/" APL_SUBCLASS, |
738 | (int)(258 - sizeof(XAPPLOADDIRLOCALE) - sizeof(APL_SUBCLASS)), |
731 | (int)(258 - sizeof(XAPPLOADDIRLOCALE) - sizeof(APL_SUBCLASS)), |
739 | R->locale); /* 258 = 255 + 4 (-.*s) - 1 (/) */ |
732 | locale); /* 258 = 255 + 4 (-.*s) - 1 (/) */ |
740 | } |
733 | } |
741 | |
734 | |
742 | { |
735 | { |
743 | # endif |
736 | # endif |
744 | # endif |
737 | # endif |
… | |
… | |
818 | for (entry = 0; entry < optList_size(); entry++) { |
811 | for (entry = 0; entry < optList_size(); entry++) { |
819 | int s; |
812 | int s; |
820 | char *p, *p0; |
813 | char *p, *p0; |
821 | const char *kw = optList[entry].kw; |
814 | const char *kw = optList[entry].kw; |
822 | |
815 | |
823 | if (kw == NULL || R->rs[optList[entry].doff] != NULL) |
816 | if (kw == NULL || rs[optList[entry].doff] != NULL) |
824 | continue; /* previously set */ |
817 | continue; /* previously set */ |
825 | |
818 | |
826 | p = XGetDefault(display, name, kw); |
819 | p = XGetDefault(display, name, kw); |
827 | p0 = XGetDefault(display, "!INVALIDPROGRAMMENAMEDONTMATCH!", kw); |
820 | p0 = XGetDefault(display, "!INVALIDPROGRAMMENAMEDONTMATCH!", kw); |
828 | if (p == NULL || (p0 && STRCMP(p, p0) == 0)) { |
821 | if (p == NULL || (p0 && STRCMP(p, p0) == 0)) { |
… | |
… | |
831 | p = XGetDefault(display, APL_CLASS, kw); |
824 | p = XGetDefault(display, APL_CLASS, kw); |
832 | } |
825 | } |
833 | if (p == NULL && p0) |
826 | if (p == NULL && p0) |
834 | p = p0; |
827 | p = p0; |
835 | if (p) { |
828 | if (p) { |
836 | R->rs[optList[entry].doff] = p; |
829 | rs[optList[entry].doff] = p; |
837 | |
830 | |
838 | if (optList_isBool(entry)) { |
831 | if (optList_isBool(entry)) { |
839 | s = STRCASECMP(p, "TRUE") == 0 |
832 | s = STRCASECMP(p, "TRUE") == 0 |
840 | || STRCASECMP(p, "YES") == 0 |
833 | || STRCASECMP(p, "YES") == 0 |
841 | || STRCASECMP(p, "ON") == 0 |
834 | || STRCASECMP(p, "ON") == 0 |
842 | || STRCASECMP(p, "1") == 0; |
835 | || STRCASECMP(p, "1") == 0; |
843 | if (optList_isReverse(entry)) |
836 | if (optList_isReverse(entry)) |
844 | s = !s; |
837 | s = !s; |
845 | if (s) |
838 | if (s) |
846 | R->Options |= (optList[entry].flag); |
839 | Options |= (optList[entry].flag); |
847 | else |
840 | else |
848 | R->Options &= ~(optList[entry].flag); |
841 | Options &= ~(optList[entry].flag); |
849 | } |
842 | } |
850 | } |
843 | } |
851 | } |
844 | } |
852 | |
845 | |
853 | /* |
846 | /* |
… | |
… | |
913 | * |
906 | * |
914 | * Also, use a special sub-class so that we can use either or both of |
907 | * Also, use a special sub-class so that we can use either or both of |
915 | * "XTerm" and "Rxvt" as class names. |
908 | * "XTerm" and "Rxvt" as class names. |
916 | */ |
909 | */ |
917 | |
910 | |
918 | rxvt_get_xdefaults(aR_ fd, name); |
911 | get_xdefaults (fd, name); |
919 | rxvt_get_xdefaults(aR_ fd, APL_SUBCLASS); |
912 | get_xdefaults (fd, APL_SUBCLASS); |
920 | |
913 | |
921 | # if defined(XAPPLOADDIR) && defined(USE_XAPPLOADDIR) |
914 | # if defined(XAPPLOADDIR) && defined(USE_XAPPLOADDIR) |
922 | { |
915 | { |
923 | FILE *ad = NULL; |
916 | FILE *ad = NULL; |
924 | |
917 | |
925 | # if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) |
918 | # if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) |
926 | if (localepath == NULL || (ad = fopen(localepath, "r")) == NULL) |
919 | if (localepath == NULL || (ad = fopen(localepath, "r")) == NULL) |
927 | # endif |
920 | # endif |
928 | ad = fopen(XAPPLOADDIR "/" APL_SUBCLASS, "r"); |
921 | ad = fopen(XAPPLOADDIR "/" APL_SUBCLASS, "r"); |
929 | if (ad != NULL) { |
922 | if (ad != NULL) { |
930 | rxvt_get_xdefaults(aR_ ad, APL_SUBCLASS); |
923 | get_xdefaults (ad, APL_SUBCLASS); |
931 | rxvt_get_xdefaults(aR_ ad, ""); |
924 | get_xdefaults (ad, ""); |
932 | fclose(ad); |
925 | fclose(ad); |
933 | } |
926 | } |
934 | } |
927 | } |
935 | # endif /* XAPPLOADDIR */ |
928 | # endif /* XAPPLOADDIR */ |
936 | |
929 | |
937 | rxvt_get_xdefaults(aR_ fd, APL_CLASS); |
930 | get_xdefaults (fd, APL_CLASS); |
938 | rxvt_get_xdefaults(aR_ fd, ""); /* partial match */ |
931 | get_xdefaults (fd, ""); /* partial match */ |
939 | if (fd != NULL) |
932 | if (fd != NULL) |
940 | fclose(fd); |
933 | fclose(fd); |
941 | # endif /* USE_XGETDEFAULT */ |
934 | # endif /* USE_XGETDEFAULT */ |
942 | |
935 | |
943 | # if defined XAPPLOADDIR |
936 | # if defined XAPPLOADDIR |
… | |
… | |
954 | /* |
947 | /* |
955 | * even without resources, at least do this setup for command-line |
948 | * even without resources, at least do this setup for command-line |
956 | * options and command-line long options |
949 | * options and command-line long options |
957 | */ |
950 | */ |
958 | #ifdef MULTICHAR_SET |
951 | #ifdef MULTICHAR_SET |
959 | rxvt_set_multichar_encoding(aR_ R->rs[Rs_multichar_encoding]); |
952 | set_multichar_encoding (rs[Rs_multichar_encoding]); |
960 | #endif |
953 | #endif |
961 | #ifdef GREEK_SUPPORT |
954 | #ifdef GREEK_SUPPORT |
962 | /* this could be a function in grkelot.c */ |
955 | /* this could be a function in grkelot.c */ |
963 | /* void set_greek_keyboard (const char * str); */ |
956 | /* void set_greek_keyboard (const char * str); */ |
964 | if (R->rs[Rs_greek_keyboard]) { |
957 | if (rs[Rs_greek_keyboard]) { |
965 | if (!STRCMP(R->rs[Rs_greek_keyboard], "iso")) |
958 | if (!STRCMP(rs[Rs_greek_keyboard], "iso")) |
966 | greek_setmode(GREEK_ELOT928); /* former -grk9 */ |
959 | greek_setmode(GREEK_ELOT928); /* former -grk9 */ |
967 | else if (!STRCMP(R->rs[Rs_greek_keyboard], "ibm")) |
960 | else if (!STRCMP(rs[Rs_greek_keyboard], "ibm")) |
968 | greek_setmode(GREEK_IBM437); /* former -grk4 */ |
961 | greek_setmode(GREEK_IBM437); /* former -grk4 */ |
969 | } |
962 | } |
970 | { |
963 | { |
971 | KeySym sym; |
964 | KeySym sym; |
972 | |
965 | |
973 | if (R->rs[Rs_greektoggle_key] |
966 | if (rs[Rs_greektoggle_key] |
974 | && ((sym = XStringToKeysym(R->rs[Rs_greektoggle_key])) != 0)) |
967 | && ((sym = XStringToKeysym(rs[Rs_greektoggle_key])) != 0)) |
975 | R->ks_greekmodeswith = sym; |
968 | ks_greekmodeswith = sym; |
976 | } |
969 | } |
977 | #endif /* GREEK_SUPPORT */ |
970 | #endif /* GREEK_SUPPORT */ |
978 | |
971 | |
979 | #if defined (HOTKEY_CTRL) || defined (HOTKEY_META) |
972 | #if defined (HOTKEY_CTRL) || defined (HOTKEY_META) |
980 | { |
973 | { |
981 | KeySym sym; |
974 | KeySym sym; |
982 | |
975 | |
983 | if (R->rs[Rs_bigfont_key] |
976 | if (rs[Rs_bigfont_key] |
984 | && ((sym = XStringToKeysym(R->rs[Rs_bigfont_key])) != 0)) |
977 | && ((sym = XStringToKeysym(rs[Rs_bigfont_key])) != 0)) |
985 | R->ks_bigfont = sym; |
978 | ks_bigfont = sym; |
986 | if (R->rs[Rs_smallfont_key] |
979 | if (rs[Rs_smallfont_key] |
987 | && ((sym = XStringToKeysym(R->rs[Rs_smallfont_key])) != 0)) |
980 | && ((sym = XStringToKeysym(rs[Rs_smallfont_key])) != 0)) |
988 | R->ks_smallfont = sym; |
981 | ks_smallfont = sym; |
989 | } |
982 | } |
990 | #endif |
983 | #endif |
991 | } |
984 | } |
992 | |
985 | |
993 | /*}}} */ |
986 | /*}}} */ |