Пример #1
0
def set_word_properties(name, properties):
    old_flags = natlink.getWordInfo(name, 0)
    if old_flags == None:
        raise natlink.UnknownName
    
    flags = apply_properties(properties, old_flags)
    if flags == old_flags:
        return

    print "changing properties of '%s' to 0x%x" % (name, flags)
    print "  from 0x%x" % old_flags
    natlink.setWordInfo(name, flags)

    if natlink.getWordInfo(name, 0) != flags:
        print "FAILED!  properties remain 0x%x" % natlink.getWordInfo(name, 0)
Пример #2
0
def set_word(name, properties):
    make_active_word(name, apply_properties(properties, 0))
    set_word_properties(name, properties)