Lines Matching refs:salt
642 XawTextSelectionSalt *salt = NULL;
684 for (salt = ctx->text.salt2; salt; salt = salt->next)
685 if (MatchSelection (*selection, &salt->s))
687 if (!salt)
689 s = &salt->s;
702 * If salt is True, the salt->contents stores CT string,
708 if (!salt) {
725 *value = XtMalloc((salt->length + 1) * sizeof(unsigned char));
726 strcpy (*value, salt->contents);
727 *length = salt->length;
788 if (!salt)
813 XawTextSelectionSalt *salt, *prevSalt, *nextSalt;
816 for (salt = ctx->text.salt2; salt; salt = nextSalt)
818 atomP = salt->s.selections;
819 nextSalt = salt->next;
820 for (i = 0 ; i < salt->s.atom_count; i++, atomP++)
824 while (salt->s.atom_count &&
825 salt->s.selections[salt->s.atom_count-1] == 0)
827 salt->s.atom_count--;
834 atomP = salt->s.selections;
835 for (i = 0 ; i < salt->s.atom_count; i++, atomP++)
838 *atomP = salt->s.selections[--salt->s.atom_count];
839 while (salt->s.atom_count &&
840 salt->s.selections[salt->s.atom_count-1] == 0)
841 salt->s.atom_count--;
843 if (salt->s.atom_count == 0)
845 XtFree ((char *) salt->s.selections);
849 XtFree (salt->contents);
854 XtFree ((char *) salt);
857 prevSalt = salt;
870 XawTextSelectionSalt *salt;
874 salt = (XawTextSelectionSalt *) XtMalloc (sizeof (XawTextSelectionSalt));
875 if (!salt)
877 salt->s.selections = (Atom *) XtMalloc (sizeof (Atom));
878 if (!salt->s.selections)
880 XtFree ((char *) salt);
883 salt->s.left = from;
884 salt->s.right = to;
885 salt->contents = (char *)_XawTextGetSTRING(ctx, from, to);
889 (wchar_t**)(&(salt->contents)), 1, XCompoundTextStyle,
891 XtFree(salt->contents);
892 salt->length = 0;
895 XtFree(salt->contents);
896 salt->contents = (char *)textprop.value;
897 salt->length = textprop.nitems;
899 salt->length = strlen (salt->contents);
900 salt->next = ctx->text.salt2;
901 ctx->text.salt2 = salt;
902 salt->s.selections[0] = selection;
905 salt->s.atom_count = 1;