From fdnh@troi.cc.rochester.edu Tue Dec 7 23:02:39 1993 Date: Tue, 7 Dec 93 21:13:05 EST From: Fergus Duniho To: intp@sefl.satelnet.org Subject: DDLI V. 2.04 Since not all of you get alt.psychology.personality, I'm posting the DDLI to this mailing list. Please note that this is an extraordinarily long file. It contains C source for a personality indicator called the DDLI, the questions file for the program, and the documentation. The files in order are "ReadMe.1st," "DDLI.DOC," "ddli.c," "fpdio.c," "qst.c," "strdup.c," and "DDLI.QST." Each file is separated by a hyphenated line with the title written in it. To make use of this post, save it, load it into a text editor (such as Emacs or VI), and save each file in it as a separate file with the name given in the hyphenated line that precedes it. Do not include the hyphenated line as part of any file. After you have the separate files, you can compile it, as per the instructions given in the documentation. If you're reading this on the Internet, you will probably have a C compiler available on the machine you have an account on. Two C compilers are available on the machine my account is on, and they may be available on yours as well. They are "cc" and "gcc." If your operating system is case-sensitive, be careful. The Amiga operating system, on which I wrote this, is not case-sensitive. Somebody asked me about being able to include the DDLI is an archive site for a.p.p. Yes, you may. You may include a complied version with it. Any of you should feel free to distribute this program far and wide. You can compile it for any computer and upload it anywhere. Just be sure to keep all the files I have included here with it when you distribute it. You do not have to distribute it in the single file format that I am using to distribute it to you. In fact, I would rather you didn't. Fergus Duniho, INTP, Enneagram 6 "When you have faults, fdnh@troi.cc.rochester.edu do not fear to abandon Philosophy Dept., University of Rochester them." -- Confucius --------------------ReadMe.1st------------------------------------------- Before you use the DDLI, it is very important that you read certain parts of the documentation. The most important of these is "How to Use the DDLI." This not only explains program usage; it explains what you should bear in mind when you are trying to answer the questions. You should also read "Understanding the Results of the DDLI." This will help you understand how to use the results of the program to figure out your type. It is important that you realize that the DDLI might not be terribly reliable, and that you can do your part to make it more reliable. To make it more reliable, I need to get FEEDBACK on how each of the 16 types tends to answer each question. Any feedback you give me will remain confidential, and I will put your name and type in the acknowledgements only if you give me explicit permission. Please note however that your feedback will be most valuable if you already know your type. If you have taken other Jungian-based type personality instruments, or you have determined your type by some other means, your feedback will be valuable. But if all you have to go on are the results of the DDLI, your feedback will not be as helpful. But if you can verify or disconfirm your results on the DDLI by reading descriptions of the types and figuring out which one best fits you, your feedback will be valuable. Finally, I can't stress enough how important your feedback will be to the development of the DDLI. Without feedback, I cannot hone the questions in the DDLI and so make it more reliable. For further details, read "How You Can Help" in the documentation. Fergus Duniho ------------DDLI.DOC---------------------------------------------------- Brief Description The Duniho and Duniho Life Pattern Indicator (DDLI) is a program that asks you questions in order to determine your Life Pattern. The Life Patterns utilize the same sixteen psychological types measured by Jungian type personality instruments, and are also represented by the same four-letter types. However, results may vary from instrument to instrument. By using knowledge that Terence Duniho has added to the study of Type, this program also checks itself by asking supplementary questions about other preferences that correlate with a person's type. Copyright The DDLI and this documentation are Copyright (C) 1992, 1993 by Fergus Duniho. Most of its questions are drawn from and based on those in two questionaires by Terence Duniho. These are his "Preference Patterns Questionaire" and "What is Your Personality Pattern?" from his book _Wholeness Lies Within: Sixteen Natural Paths Toward Sprituality_. "What is Your Personality Preference" is Copyright (C) 1985, 1991 by Terence L. Duniho. Fergus Duniho uses questions from these questionaires with the permission of Terence Duniho. Contents The following should be included: README.1ST - A file you should read before using the DDLI. DDLI.C - The main source code. FPDIO.C - A file containing the source code for some input/output functions I wrote. QST.C - A file containing the qst type and the functions that use it. STRDUP.C - A file containing the "strdup" command in case you don't have it. DDLI.DOC - This file, the documentation. DDLI.QST - The file of questions used by the DDLI. Distribution The latest version of the DDLI may be freely distributed as long as it is left unchanged, and it always distributed with its source code (DDLI.C, QST.C, FPDIO.C, STRDUP.C), this documentation file, and DDLI.QST, which contains the questions. It may be, but does not have to be, distributed with any executables. If you want to distribute it with commercial products, such as books on Type, you need the written permission of the author. Whenever I release a new version, please stop distributing older versions. Please remove older versions from software libraries, disk collections, and electronic bulletin boards. This is especially important when older versions had bugs. Compiling You may have to compile DDLI.C to run the DDLI on your computer. DDLI.C is a completely portable Standard ANSI/ISO C program. You should be able to compile it and run it on any computer that has a Standard C compiler. To compile it, first make sure that the source files are all in the same directory. Then type "cc DDLI.C -o DDLI". You may have to change "cc" to the name of the frontend for your compiler, such as "dcc", "bcc", or "gcc". If the program can't compile or doesn't work, read the comments at the beginning of DDLI.C and follow their instructions. If you use an IBM or compatible, you may have to add carriage returns (ASCII 13) to the end of each line (unless somebody has already done it for you). The Amiga, which I use, uses only the newline character to end each line, but the IBM uses both a newline and a carriage return. DISCLAIMER I offer no guarantee that this program will accurately measure your type. I am not a trained psychologist, and I have tested these questions on only a few people. I have mainly used my knowledge of type to put them together. Although most were written by Terence Duniho, whose life work is psychological type, I wrote some of them, particularly the supplementary questions. This program is experimental, and I hope to use the computer-user community as my testing ground. If you already know your type, I would greatly appreciate it if you would report on the accuracy of this program. Also, if this program somehow messes up your computer or your data, I, Fergus Duniho, am not to blame. You use this program at your own risk. Furthermore, I am not responsible for any use that anyone makes of this program or its results. If, for example, someone chooses to discriminate against you because of the type you scored as on the DDLI, you should sue the person who discriminated against you, not me. The Life Pattern Model The Life Pattern model is based on Carl Gustav Jung's four psychological functions. These are thinking, feeling, sensing, and intuition. The former two are judging functions, and the latter two are perceiving functions. The judging functions are those we use for making decisions. The perceiving functions are those we use for gathering information. According to Jung, the personality of each person is characterized by the dominance of one of these functions over the others. He also added that each person used his dominant function is either an extraverted way or an introverted way. Someone who used his dominant function in an extraverted way would rely on it when dealing with the external environment, such as in public settings, with people who aren't intimates, etc. Someone who used his dominant function in an introverted way would rely on it when alone or with intimates. Thus, Jung's personality theory had eight psychological types. These were Introverted Sensors, Introverted Intuitors, Introverted Thinkers, Introverted Feelers, Extraverted Sensors, Extraverted Intuitors, Extraverted Thinkers, and Extraverted Feelers. Jung also held that each type had an auxiliary function, as well as the dominant function. For the sake of balance, the auxiliary for a psychologically healthy individual was a perceiving function if the dominant was a judging function and a judging function if the dominant was a perceiving function. Furthermore, a person would use the auxiliary in the opposite way as the dominant function. Extraverts would rely on the auxiliary for introverting, and introverts would rely on it for extraverting. The introduction of the auxiliary split each of Jung's types into two, effectively giving us Myers-Briggs' sixteen psychological types. For example, Introverted Thinkers would be divided into Introverted Thinkers with Intuition as an auxiliary and Introverted Thinkers with Sensing as an auxiliary. The Myers-Briggs types are based on four sets of opposing preferences. These are extraversion vs. introversion (E vs. I), intuition vs. sensing (N vs. S), thinking vs. feeling (T vs. F), and perceiving vs. judging (P vs. J). The preference for extraversion or introversion indicates the way in which a person uses his dominant function. The preference for perceiving or judging indicates which function (the dominant or the auxiliary) the person relies on for extraverting. As I already indicated, the dominant and the auxiliary together include both a perceiving function and a judging function. P's rely on the perceiving function for extraverting, and J's rely on the judging function for extraverting. The preference for thinking or feeling indicates the preferred judging function, and the preference for sensing or intuition indicates the preferred perceiving function. Using this information, we can determine the Jungian type that corresponds to each Myers-Briggs type. Take, for instance, my type: INTP. The "I" indicates that I use my dominant function for introverting. The "P" indicates that I rely on my preferred perceiving function for extraverting. Since I am an introvert, this means that I rely on my preferred judging function for introverting. In other words, my dominant function is my preferred judging function. Since this is thinking, that means I am an Introverted Thinker. My auxiliary is my preferred perceiving function, and that is intuition. Therefore, an INTP is an Introverted Thinker with Intuition as an auxiliary. Each Myers-Briggs type can be translated into its corresponding Jungian type in like manner. Here is a table of what each type corresponds to: INTP: Introverted Thinker with auxiliary Intuition ISTP: Introverted Thinker with auxiliary Sensing INFP: Introverted Feeler with auxiliary Intuition ISFP: Introverted Feeler with auxiliary Sensing INTJ: Introverted Intuitor with auxiliary Thinking INFJ: Introverted Intuitor with auxiliary Feeling ISTJ: Introverted Sensor with auxiliary Thinking ISFJ: Introverted Sensor with auxiliary Feeling ENTJ: Extraverted Thinker with auxiliary Intuition ESTJ: Extraverted Thinker with auxiliary Sensing ENFJ: Extraverted Feeler with auxiliary Intuition ESFJ: Extraverted Feeler with auxiliary Sensing ENTP: Extraverted Intuitor with auxiliary Thinking ENFP: Extraverted Intuitor with auxiliary Feeling ESTP: Extraverted Sensor with auxiliary Thinking ESFP: Extraverted Sensor with auxiliary Feeling The Myers-Briggs model was extended into the Life Patterns model by Terence Duniho. According to Terence Duniho, each type also has a tertiary function and an inferior function. These balance the dominant and auxiliary functions. The tertiary function is used in the same way as the dominant function (extraverted or introverted), but it is not relied on to the same extent. Also, the tertiary function is always the opposite of the auxiliary function. If the auxiliary is a judging function, the tertiary is the other judging function; if the auxiliary is a perceiving function, the tertiary is the other perceiving function. The inferior function is always the opposite of the dominant function, and it is used in the same way as the auxiliary. Therefore, the introduction of the tertiary and inferior functions do not extend the number of psychological types. There are still sixteen. The advantage of the Life Pattern model is that it gives us more tools for understanding each type. Instead of telling us how each type uses two of Jung's functions, it tells us how each type uses all four of Jung's functions. In effect, it gives us a blueprint for understanding the core personality of each type. This blueprint describes the preferential hierarchy among Jung's four functions for each type, and it describes the way in which each type uses each of the four functions. First, there are eight different hierarchies among the sixteen types. Using a form of abbreviation in which the leftmost letter represents the dominant function, these are TNSF for INTPs and ENTJs, TSNF for ISTPs and ESTJs, FNST for INFPs and ENFJs, FSNT for ISFPs and ESFJs, NTFS for INTJs and ENTPs, NFTS for INFJs and ENFPs, STFN for ISTJs and ESTPs, and SFTN for ISFJs and ESFPs. Second, the Life Pattern model characterizes each type by how it uses the four functions. Extraverts use the dominant and tertiary functions for extraverting, and the other two functions for introverting. Introverts use the dominant and tertiary functions for introverting, and the other two for extraverting. Given the eight possible hierarchies of preference, this gives us four different ways in which the 16 types use the four functions. I call these four different ways directional patterns, for they indicate the direction (outward or inward) in which each function is used. Using a form of abbreviation in which "I" and "E" indicate the direction in which a function is used, these are IT-EF-IN-ES for ISTPs, ENFJs, INFJs, and ESTPs, ET-IF-IN-ES for INTJs, ESFPs, ISFPs, and ENTJs, IT-EF-EN-IS for INTPs, ESFJs, ISFJs, and ENTPs, and ET-IF-EN-IS for INFPs, ESTJs, ISTJs, and ENFPs. One interesting consequence of this model is that it gives us three different ways of understanding how someone's type can be the opposite of someone else's. I call these hierarchical, directional, and diametrical opposites. Hierarchical opposites have opposite hierarchies but the same diretional patterns. Hierarchical opposites never have any letters in common in their abbreviations. Directional opposites have the same directional patterns but opposite hierarchies. These always have the inner two letters the same and the outer two different. And diametrical opposites have both opposite hierarchies and opposite directional patterns. These have the outer two letters the same and the inner two different. Here is a chart that describes the directional hierarchy of each type. The functions appear left to right from dominant to inferior. "I" indicates that the function is used for introverting, and "E" indicates that the function is used for extraverting. INTP: IT-EN-IS-EF ISTP: IT-ES-IN-EF INFP: IF-EN-IS-ET ISFP: IF-ES-IN-ET INTJ: IN-ET-IF-ES INFJ: IN-EF-IT-ES ISTJ: IS-ET-IF-EN ISFJ: IS-EF-IT-EN ENTJ: ET-IN-ES-IF ESTJ: ET-IS-EN-IF ENFJ: EF-IN-ES-IT ESFJ: EF-IS-EN-IT ENTP: EN-IT-EF-IS ENFP: EN-IF-ET-IS ESTP: ES-IT-EF-IN ESFP: ES-IF-ET-IN For further information about Type, the Life Pattern model, and the sixteen different Life Patterns, consult Terence Duniho's book _Wholeness Lies Within_, or some other book about Type. _Wholeness Lies Within_ can be ordered from Type & Temperment, Inc., PO Box 200, Gladwyne, PA 19032 for $14.95 + $2.09 p/h. Terence Duniho also recommends _LifeTypes_ by Sandra Hirsh & Jean Kummerow (Warner Books) and _Gifts Differing_ by Isabel Briggs Myers (Consulting Psychologists Press). How to Use the DDLI The DDLI will first ask you how many columns you have on your screen. This is so it can wordwrap the text to fit on any screen size. It will then ask for your name. It expects that your name will be less than 80 characters long. Then it will ask for an integer to use as the seed value for the random number generator. This is so it can randomize the order of all the questions, as well as the order of the answers to each question. The DDLI will then ask you a series of questions. You can answer a question by typing the letter that precedes the answer you choose: an A or a B. You should follow your answer with a carriage return. If you want to go back to a question you previously answered and change your answer, you can go back to the previous question by typing "Prev" or just "P" followed by a carriage return. Keep doing this until you get back to the question you want to answer differently. After you have changed your answer, the DDLI will resume with the next question that you haven't answered. If you want to postpone answering a question until later, type "Skip" or just "S" followed by a carriage return. You will see this question again after you have gone through the remaining questions. If you want to quit the DDLI, type "Quit" or just "Q" followed by a carriage return. Whatever you type in while answering the questions, the DDLI will read only the first character. If it isn't an "A," "B," "P," "Q," or "S," the DDLI will tell you what sort of input it expects from you. When you answer each question, there are some things you should bear in mind. 1. Do not base your answer simply on the most recent event in your life that fits the question. Rather, base your answer on your general pattern of behavior, not your behavior on one occasion. 2. Do not answer the questions according to how you want to be when that differs from how you actually are. Base your answers on how you actually are. 3. Do not stretch your imagination by trying to imagine situations that are favorable for each answer. Rather, base your answers on how you are in the situations you normally find yourself in. Here are some other tips on answering the questions. If one answer immediately seems more you than the other, go with that answer. For questions where this doesn't work, ask yourself which answer would take less energy or be more natural. Finally, remember that this is not a test. Nobody has an answer key with the right answers in it. The right answers depend upon who you are. This program does not measure degrees of normality and abnormality. It merely measures differences that may exist between normal, psychologically healthy individuals. Understanding the Results of the DDLI After you have answered all the questions, the DDLI will display the results. Here is a sample display that I created by choosing 128 as a seed value and choosing "B" all the way through. I chose "No one" as the name. --------------------------cut here-------------------------------------- No one's scores on the main set of questions: Extraversion (E): 7 10 :(I) Introversion Sensing (S): 9 8 :(N) iNtuition Thinking (T): 12 7 :(F) Feeling Judging (J): 8 9 :(P) Preceiving No one scored as an ISTP. Assuming that you are an ISTP, Your DOMINANT function is Introverted Thinking. Your AUXILIARY function is Extraverted Sensing. Your TERTIARY function is Introverted Intuition. Your INFERIOR function is Extraverted Feeling. No one's scores on the supplementary questions: Extraverted Thinking / Introverted Feeling : 5 Extraverted Feeling / Introverted Thinking : 4 Extraverted Intuition / Introverted Sensing : 4 Extraverted Sensing / Introverted Intuition : 5 Rationality (Dominant Judging Function) : 3 A-rationality (Dominant Perceiving Function) : 2 According to these scores, No one could be a dominant judger who extraverts Thinking and Sensing, and who introverts Feeling and Intuition. Thus, No one might be an ENTJ or an ISFP. These results conflict with the evaluation of No one as an ISTP. -----------------------cut here------------------------------------------- This output displays the results to two different sets of questions. The first set of questions measures for extraversion vs. introversion, sensing vs. intuition, thinking vs. feeling, and judging vs. perceiving. These are the same four sets of preferences that the other Jungian-based type personality instruments measures for. It first presents your scores on these questions and tells you what type they indicate. It then presents the directional hierarchy of functions for that type. The second set of questions measures for preferences that the other Jungian-based type personality instruments do not measure for. These are extraverted thinking and introverted feeling vs. extraverted feeling and introverted thinking, extraverted intuition and introverted sensing vs. extraverted sensing and introverted intuition, and rationality vs. a-rationality. The pairs of opposites are Extraverted Thinking vs. Introverted Thinking Extraverted Feeling vs. Introverted Feeling Extraverted Sensing vs. Introverted Sensing Extraverted Intuition vs. Introverted Intuition Rationality vs. A-Rationality. The DDLI measures for the first two together because the types who extravert feeling and introvert thinking are the same, and the types who introvert feeling and extravert thinking are the same. And it measures for the second pair together because the types who extravert sensing and introvert intuition are the same, and the types who extravert intuition and introvert sensing are the same. The DDLI presents the scores on these questions and then indicates which types these scores suggest. These two types are always 4-letter opposites, which I referred to previously as hierarchical opposites. This is because these questions measure for directional preferences and for only one hierarchical preference. Hierarchical opposites, as you may recall, have the same directional patterns but opposite hierarchies. And any two types with opposite hierarchies have the same the same kind of dominant function: a judging function (thinking or feeling) or a perceiving function (sensing or intuition). Finally, the DDLI compares the type suggested by your answers to the first set of questions with the types suggested by your answers to the second set of questions. If it finds a match, it tells you that your results on the supplementary questions corroborate your results on the main set of questions. It otherwise tells you that your results on these two sets of questions conflict. If there is a conflict between your scores, there is no rule for determining which one is right. You should get ahold of a description of the types and read the descriptions for each of the types that the program suggests you are. And even if your scores don't conflict, you should read the descriptions of the type you scored as to really make sure you are that type. There is no guarantee that this program will accurately measure your type. I think that in most cases it will, but in your case it might not. If it doesn't, I hope you will offer your suggestions for making this program more accurate in the future. History V 1.00 (12/31/1992) - The first version Bug: It displays the functional hierarchy of an ENTP no matter what type you scored as. V 1.01 (01/03/1993) - Bug fix. A few changes and additions to QST. Bug: When it displays the functional hierarchy of the type you scored as, it assumes that you scored as an extravert, even in you scored as an introvert. V 1.10 (01/07/1993) - Bug Fix plus Feature Update. Can now send output to printer or file. Displays scores to supplementary questions. One grammatical correction in QST. One question in QST replaced with another. V 2.00 (01/31/1993) - Because I switched from the crippled freeware version of DICE to GNU C, I added some features that I couldn't previously put into the DDLI. Here are the new features: * Randomizes question order and answer order. * Allows you to skip questions until later. * Allows you to go back to questions and change your answers. * Displays output in a more understandable format. * QST renamed as "DDLI.QST" * Some major changes in DDLI.QST. * DDLI.QST now groups together questions that measure for the same preference. * Reads "DDLI.QST" all at once and closes it before asking any questions. This means you no longer have to keep the disk with the questions on it in your disk drive when you are running the DDLI. * Saves a file that contains a record of all your answers. Sending me this file will help me make the DDLI more reliable. V 2.01 (02/26/1993) - It turns out that I could incorporate the additions to V2.00 with DICE. This version has all the same features, and I have compiled the Amiga version with DICE so that it will not require ixemul.library to run. (If you have GNU C, you might want to recompile it, since the GNU C version takes up less space.) It's essentially the inside, rather than the outside, of the program that has changed with this version. The main difference is that this version stores the questions in a linked list instead of in an array. This is to prevent memory fragmentation errors that occur from asking for a large chunk of memory. V 2.02 (04/04/1993) The DDLI now puts a linefeed after the version string when it creates a record of your answers. ".raw" files renamed ".dar". Added Readme.1st. The wrapwrite function in fpdio.c now takes multiple arguments. V 2.03 (12/03/1993) Removed my GEnie address from the text printed at the beginning of the program, because I have quit GEnie. Changed my address in the documentation, because I moved over the summer. V 2.04 (12/04/1993) Bug fixes to make it work with less forgiving compilers than I have for my Amiga. Acknowledgements The individual acknowledgements are listed in historical order: My INFJ father, Terence Duniho, for providing the theoretical structure behind this program plus most of the questions. INTP Gerald Erichsen for compiling the IBM version, for a bug report on version 1.00, and for suggesting the printing feature. INFP Kirk Worcester for a bug report on version 1.01. ENFP Jayne Thrall for letting me test a bunch of questions on her. INTP Mark Lillibridge for most of the bug fixes made to V. 2.04. And those who have given me feedback on GEnie. How You Can Help The DDLI is in constant development, and your feedback can make it more reliable. The simplest thing you can do is tell me your type and send me a copy of the file that the DDLI creates when it is finished. The name for this file will contain the first 8 characters of your name plus ".dar", which stands for "DDLI Answer Record". This file contains a record of your answers. I intend to write a database program that will interpret these files and give me statistical data on them so that I can determine which questions work best. You can send it by email. My email addresses are below. If you want to do more, you can tell me your type along with why you answered the questions as you did. It will be particularly helpful if you tell me why you chose answers that conflicted with your type. About the Author I am Fergus Duniho, the 26 year old INTP son of INFJ Terence Duniho, the Executive Director of the newly formed Life Patterns Institute. Except for this filial relationship, I have no associations with the Life Patterns Institute, and I am completely unassociated with any other organization devoted to the study of psychological type. Although I am knowledgeable on the subject of psychological type, I'm probably not an expert on the subject. I am currently a Ph.D. candidate and a T.A. in the philosophy department at the University of Rochester. I plan to teach philosophy to undergraduates after I get my degree. My calling is to be a teacher. Besides this program, I have written other freeware for the Amiga. These include DMD, a set of macros for Matt Dillon's text editor, DME, and Silly Syllogisms, a syllogisms tutor in Amiga Basic. You can reach me by email or by post. You can reach me through the Internet at fdnh@troi.cc.rochester.edu. You can also send me email on the FileWorks BBS in Rochester, NY. You can reach me through regular mail at Fergus Duniho 1095 Genesee St. Rochester, NY 14611 If you want me to reply back to you, it is best to use email, since I don't keep a large supply of stamps. ---------ddli.c------------------------------------------------- /* * DDLI.c: The Duniho and Duniho Life Pattern Indicator V 2.04 * by Fergus Duniho * Copyright (c) 1992, 1993 Fergus Duniho */ /* * If your compiler does not have the command "strdup", * which is common in C compilers but not part of ANSI * C, uncomment the next #include statement. */ /* #include "strdup.c" */ #include "fpdio.c" #include "qst.c" #define XN E ? "Extraverted" : "Introverted" /* * If you don't use an Amiga, your printer device * might be called "PRN" instead of "PRT:". If it * is, change the next #define. */ #define prtdev "PRT:" #define QFILE "DDLI.QST" main () { int i, col, size, A, L, L1, L2, pr[14], E, I, S, N, T, F, J, P, ES, EN, ET, EF, R; char line[256], nline[512], *name, *fname, *Version, *LP[16] = {"INTP", "INTJ", "INFP", "INFJ", "ISTP", "ISTJ", "ISFP", "ISFJ", "ENTP", "ENTJ", "ENFP", "ENFJ", "ESTP", "ESTJ", "ESFP", "ESFJ"}, *PF[2] = {"Intuition", "Sensing"}, *JF[2] = {"Thinking", "Feeling"}, *text1 = "Your %s function is %s %s."; FILE *fptr; qst *Q; wrapwrite (stdout, 0, 0, 20, "How many columns does your screen have?", 0); col = fgetp(stdin); wrapwrite (stdout, 0, 0, col, "\n\"The Duniho and Duniho Life Pattern Indicator\"", "V2.04\nBy Fergus Duniho. Copyright (c) 1992, 1993", "Fergus Duniho.\n\nMost of the questions are drawn from", "and based on those in Terence Duniho's \"Preference", "Patterns Questionaire\" and his book _Wholeness Lies", "Within_. Fergus is responsible for the choice of questions.", "\n\nThis product is freeware. Send comments, bug reports,", "reports on accuracy, and suggestions for improvement to", "Fergus Duniho at fdnh@troi.cc.rochester.edu\n\n", 0); size = Linefeeds(QFILE) / 3; Q = new_qnode(0); Q->pv = Q->nx = Q; Version = Get_QList (QFILE, Q, size); wrapwrite (stdout, 0, 0, col, "What is your name?", 0); name = clone_line(stdin, 80); wrapwrite (stdout, 0, 0, col, "Enter an integer as a seed value for the random # generator", 0); srand (fgetp(stdin)); Q = RND_QList (Q, size); AskQuestions (Q, col); for (i = 0; i < 14; i++) /* Initializes Preference Scores to Zero */ pr[i] = 0; for (Q = Q->nx; Q->num > 0; Q = Q->nx) /* Calculates Scores */ pr[Q->ans]++; wrapwrite (stdout, 0, 0, col, "Send output to (1) Screen, (2) Printer, or (3) File?", 0); do { A = fgetp(stdin); if (A == 1) fptr = stdout; else if (A == 2) { WrOpen (fptr, prtdev); col = 75; } else if (A == 3) { wrapwrite (stdout, 0, 0, col, "Please enter a file name.", 0); fname = clone_line(stdin, 32); WrOpen (fptr, fname); } else wrapwrite (stdout, 0, 0, col, "Please enter a 1, a 2, or a 3.", 0); } while (A < 1 || A > 3); E = pr[1]; I = pr[2]; S = pr[3]; N = pr[4]; T = pr[5]; F = pr[6]; J = pr[7]; P = pr[8]; ES = pr[12]; EN = pr[13]; ET = pr[11]; EF = pr[10]; sprintf (nline, "%s's scores on the main set of questions:\n" "\n\nExtraversion (E): %2d %2d :(I) Introversion" "\nSensing (S): %2d %2d :(N) iNtuition" "\nThinking (T): %2d %2d :(F) Feeling" "\nJudging (J): %2d %2d :(P) Preceiving\n", name, E, I, S, N, T, F, J, P); wrapwrite (fptr, 0, 0, col, nline, 0); L = 8 * (E > I) + 4 * (S > N) + 2 * (F > T) + (J > P); R = (((L & 1) == 1) == ((L & 8) == 8)); E = (E > I); fprintf (fptr, "%s scored as an %s.\n", name, LP[L]); fprintf (fptr, "\nAssuming that you are an %s,\n", LP[L]); sprintf (line, text1, "DOMINANT", XN, R ? JF[(L & 2) == 2] : PF[(L & 4) == 4]); wrapwrite (fptr, 0, 5, col, line, 0); sprintf (line, text1, "AUXILIARY", !XN, R ? PF[(L & 4) == 4] : JF[(L & 2) == 2]); wrapwrite (fptr, 0, 5, col, line, 0); sprintf (line, text1, "TERTIARY", XN, R ? PF[(L & 4) != 4] : JF[(L & 2) != 2]); wrapwrite (fptr, 0, 5, col, line, 0); sprintf (line, text1, "INFERIOR", !XN, R ? JF[(L & 2) != 2] : PF[(L & 4) != 4]); wrapwrite (fptr, 0, 5, col, line, 0); if (A == 1) { wrapwrite (stdout, 0, 0, col, "Hit or to see", "your results on the supplementary questions.", 0); while (fgetc(stdin) != '\n'); } sprintf (nline, "\n%s's scores on the supplementary questions:\n\n" "Extraverted Thinking / Introverted Feeling : %d\n" "Extraverted Feeling / Introverted Thinking : %d\n\n" "Extraverted Intuition / Introverted Sensing : %d\n" "Extraverted Sensing / Introverted Intuition : %d\n\n" "Rationality (Dominant Judging Function) : %d\n" "A-rationality (Dominant Perceiving Function) : %d\n", name, ET, EF, EN, ES, pr[9], pr[0]); wrapwrite (fptr, 0, 0, col, nline, 0); if (R = (pr[9] > pr[0])) L1 = 9 + (EF > ET) * 2 + (EN > ES) * 4; else L1 = 8 + (EF < ET) * 2 + (EN < ES) * 4; L2 = L1 ^ 15; sprintf (line, "According to these scores, %s could be a dominant %s " "who extraverts %s and %s, and who introverts %s and %s. " "Thus, %s might be an %s or an %s.", name, R ? "judger" : "perceiver", JF[EF > ET], PF[ES > EN], JF[EF < ET], PF[ES < EN], name, LP[L1], LP[L2]); if ((L == L1) || (L == L2)) sprintf (nline, "%s These results corroborate your score as an %s.", line, LP[L]); else sprintf (nline, "%s These results conflict with the evaluation of %s as an %s.", line, name, LP[L]); wrapwrite (fptr, 0, 0, col, nline, 0); fclose (fptr); strncpy (line, name, 8); line[8] = 0; strcat (line, ".dar"); printf ("\nSending raw scores to %s.\n", line); WrOpen (fptr, line); fprintf (fptr, "%s\n", Version); for (Q = Q->nx; Q->num > 0; Q = Q->nx) fprintf (fptr, "%d %d\n", Q->num, Q->ans); fclose (fptr); } ------------fpdio.c------------------------------------------------ /* FPDIO.C Copyright (C) 1993 Fergus Patrick Duniho */ #ifndef _FPDIO_C #define _FPDIO_C #include #include #include #include #include #define RdOpen(X,Y) X=FDOpen(Y, "r") #define WrOpen(X,Y) X=FDOpen(Y, "w") #define ApOpen(X,Y) X=FDOpen(Y, "a") void wrapwrite (FILE *fptr, int ind, int lm, int rm, char *s, ...); int wrdlen(char *s); int fgetp (FILE *fptr); FILE *FDOpen (const char *fn, const char *mode); int Linefeeds (char *fname); char *clone_line (FILE *fptr, int max); void wrapwrite (FILE *fptr, int ind, int lm, int rm, char *s, ...) { va_list ap; int i, j, l; va_start(ap, s); for (j = ind; ; j = lm) { for (i = 0; i < j; i++) fputc (' ', fptr); for (i = j; i < rm; i++) switch (*s) { case 0: /* End of string reached */ if ((s = va_arg(ap, char *)) == 0) { fputc ('\n', fptr); va_end(ap); return; } if ((i + wrdlen(s)) >= rm) i = rm; else if (i > j) fputc (' ', fptr); break; case ' ': /* End of word reached */ if ((i + wrdlen(++s)) >= rm) i = rm; else if (i > j) fputc (' ', fptr); break; case '\n': /* End of line reached */ i = rm; s++; break; default: fputc (*s++, fptr); } fputc ('\n', fptr); if ((*s == '\0') && ((s = va_arg(ap, char *)) == 0)) { va_end(ap); return; } } } int wrdlen(char *s) { int r; for (r = 0; *s != ' ' && *s != '\n' && *s != '\0'; r++, s++); return r; } int fgetp (FILE *fptr) { int c, tot = 0; while (!isdigit(c = getc(fptr))) if (c == EOF) return EOF; do { tot *= 10; tot += (c - '0'); } while (isdigit(c = getc(fptr))); if (c != '\n') ungetc (c, fptr); return tot; } FILE *FDOpen (const char *fn, const char *mode) { FILE *fptr; if ((fptr = fopen(fn, mode)) == NULL) { fprintf (stderr, "Could not open %s.", fn); exit (2); } return fptr; } int Linefeeds (char *fname) { FILE *fptr; int c, cnt = 0; RdOpen (fptr, fname); while ((c = getc(fptr)) != EOF) if (c == '\n') cnt++; fclose (fptr); return cnt; } char *clone_line (FILE *fptr, int max) { char *s, *r, *t; int i; s = (char *)malloc(max + 1); t = s; for (i = 0; (i < max) && ((*s = fgetc(fptr)) != '\n'); i++, s++); if (*s != '\n') ungetc(*s, fptr); *s = '\0'; r = strdup(t); free (t); return r; } #endif /* _FPDIO_C */ ----------qst.c---------------------------------------------------- /* QST.C Copyright (C) 1993 Fergus Patrick Duniho */ #define MAXLINE 256 typedef struct qnode { int p[2]; int num, ans, first; char *Qtext, *Atext[2]; struct qnode *pv, *nx; } qst; qst *RND_QList (qst *Q, int size); char *Get_QList (char *fname, qst *Q, int size); void AskQuestions (qst *Q, int col); int AskQ (qst *Q, int col); char get_answer(int col); qst *new_qnode (int num); qst *new_qnode (int num) { qst *node; if ((node = (qst *)malloc(sizeof(qst))) == NULL) { perror ("Malloc can't allocate enough memory for a new qnode.\n"); exit (2); } node->ans = -1; node->num = num; return node; } /* Get_QList: Reads questions from a file into a linked list. Returns the version # string from the beginning of the questions file. */ char *Get_QList (char *fname, qst *Q, int size) { FILE *fptr; int i, j; char *V; qst *S; S = Q; RdOpen (fptr, fname); V = clone_line(fptr, MAXLINE); for (i = 1; i <= size; i++) { Q->nx = new_qnode(i); Q->nx->pv = Q; Q = Q->nx; Q->Qtext = clone_line(fptr, MAXLINE); for (j = 0; j < 2; j++) { Q->p[j] = fgetp(fptr); Q->Atext[j] = clone_line(fptr, MAXLINE); } } fclose (fptr); Q->nx = S; return V; } /* nth_qnode: Returns the nth member of a linked list of qst nodes. */ qst *nth_qnode (qst *Q, unsigned int n) { while (n--) Q = Q->nx; return Q; } /* RND_QList: Randomizes a linked list of questions. */ qst *RND_QList (qst *Q, int size) { qst *S, *L, *N, *SN; unsigned int i; SN = N = new_qnode(0); /* Randomizes Question Order */ S = Q; for (; size; size--) { i = (rand() % size) + 1; L = nth_qnode(S, i); L->nx->pv = L->pv; L->pv->nx = L->nx; N->nx = L; L->pv = N; N = L; N->first = rand() % 2; /* Randomizes Answer Order */ } free (S); N->nx = SN; SN->pv = N; return SN; } void AskQuestions (qst *Q, int col) { int more = 1, flag = 1, num; while (more) { for (Q = Q->nx, num = 1; Q->num > 0; Q = Q->nx, num++) { if ((Q->ans != -1) && flag) continue; flag = 1; printf ("\nQuestion #%d\n", num); if (AskQ(Q, col)) { Q = Q->pv->pv; flag = 0; num -= 2; if (num < 0) num = 0; } } more = 0; for (Q = Q->nx; Q->num > 0; Q = Q->nx) if (Q->ans == -1) more = 1; } } /* AskQ: Asks a single question. */ int AskQ (qst *Q, int col) { char A; wrapwrite (stdout, 0, 0, col, Q->Qtext, 0); wrapwrite (stdout, 0, 4, col, "(A)", Q->Atext[0], 0); puts (" ... Or"); wrapwrite (stdout, 0, 4, col, "(B)", Q->Atext[1], 0); if ((A = get_answer(col)) < 2) Q->ans = Q->p[A]; else if (A == 4) exit (2); return A == 3; } char get_answer(int col) { char c; for (;;) { c = fgetc(stdin); while (fgetc(stdin) != '\n'); if (islower(c)) c = toupper(c); if (c == 'A') return 0; if (c == 'B') return 1; if (c == 'S') return 2; if (c == 'P') return 3; if (c == 'Q') return 4; wrapwrite (stdout, 0, 0, col, "Answer with an A or a B.\n", "P = Go back to Previous question\n", "Q = Quit\n", "S = Skip until later.\n", 0); } } ---------------strdup.c---------------------------------------------- /* STRDUP.C by Fergus Patrick Duniho. Public Domain */ #ifndef _STRDUP_C #define _STRDUP_C #include #include char *strdup (char *s); char *strdup (char *s) { char *r; if ((r = (char *)malloc(strlen(s) + 1)) == NULL) { perror ("Malloc cannot allocate enough memory for a new string.\n"); exit (2); } strcpy (r, s); return r; } #endif /* _STRDUP_C */ --------------DDLI.QST---------------------------------------------- DDLI.QST V 1.01 Which better fits how you see yourself? 1Sociable 2Intimate Is it more accurate to describe the things you know as 1Miscellaneous 2Specialized If you had to choose, would you prefer to be skillful in games 1That call for team play 2Where you play singly and are solely responsible for results Which better fits how you see yourself? 1Lively 2Calm Do your core interests tend to be 1Varied (and changing) 2Few (and lasting) When working on a project: 1Are you just concerned that it gets done 2Do you prefer to have ownership from start to finish Do you do your most productive work: 1In working with others 2When working alone Do you generally: 1Have plenty of energy for anything that comes up 2Find it necessary to focus your energy Which comes closer to describing you: 1A "Jack of all trades" 2Expert in one or two areas Which do you prefer more: 1Figuring things out by doing 2Figuring things out before doing When looking up information on a particular topic, do you more often: 1Get sidetracked 2Find out what you need and get back to the project at hand Would you rather be recognized for 2Something you have done yourself 1Your part in a group undertaking Can you 2Find a lot to say only to certain people or on certain topics 1Talk easily with almost anyone on almost anything Which better fits how you see yourself? 2Watchful 1Trustful Which better fits how you see yourself? 2Reserved 1Outgoing At a social gathering, is it more important for you to: 2Spend more time with a few 1Spend some time with everybody When you need to re-energize, do you prefer to be 1In a group of people 2By yourself Which better fits how you see yourself? 3Matter-of-fact 4Imaginative Which do you focus on more? 3The way things are 4The way things could be Which do you do more often? 3Experience the present moment for what it offers 4Experience the present in terms of the future Do you think it more important to 3Be able to adjust to the facts as they are 4Be able to see the possibilities in a situation Do you prefer to be more 3Practical 4Ingenious Do you prefer dealing more with: 3"Visible" (concrete) information 4"Invisible" (abstract) information In doing something that many others do, does it appeal to you more to 3Do it the way you have been taught 4Figure out a way of your own Which work role would suit you better: 3Doing familiar things with some variety 4Doing things that are new and full of unknown possibilities Which do you prefer more: 3Using what you've learned 4Learning new things Are you inclined to: 3Fix things that are broken 4See ways to improve things that aren't broken When you need to solve a problem, are you more inclined to 3Go with a solution that your experience tells you will do the job 4Use your ingenuity to find a novel solution than is better than any you know from experience Which do you prefer: 3Focusing on what is happening right now 4Looking ahead to the future Do you more often: 3Accept things as they are 4Want to change things At home are you more apt to: 3Be more content with the way your furniture is arranged 4Want to rearrange the furniture occasionally Is it harder for you to adapt to 4Routine ("the beaten path") 3Constant change Which better fits how you see yourself? 4Emphasis on possibilities 3Emphasis on facts Which do you think you have more of: 4Vision 3Common sense Do you more often let 5Your head rule your heart 6Your heart rule your head Do you more readily: 5Objectively critique ideas and people 6Empathize with people and their ideas Are you more often: 5Truthful 6Tactful Which better fits how you see yourself? 5Thinking 6Feeling When you have spoken less than the whole truth to a friend, is your motivation more often: 5An intellectual awareness of likely consequences 6A concern to not give offense When looking at past events, are you more interested in: 5Understanding why the events happened the way they did 6Seeing how they affected those who were involved In working out decisions, do you prefer to: 5Make sure things fit together 6Go with what feels best When you are intertested in a new activity, are you more likely to approach it with: 5Calm, keeping your eyes open to see how things work 6Excitement and enthusiasm -- at least inwardly Which is more important to you in making decisions: 5Cause and effect (consequences) 6Good versus bad Which would you rather do: 5What you believe will work 6What you feel is right Is it more important for you to be appreciated: 5For something you have accomplished 6For the kind of person you are Which kind of decisions are more natural for you? 6Those that call on your feelings and personally involve you 5Those that call on your knowledge and don't personally involve you Which is more important to you: 6A world that recognizes the value of individuals 5A world run on logical principles Which better fits how you see yourself? 6Harmony 5Truth Which are you better at providing: 6Emotional support 5Objective criticism Do you believe it is a greater strength to 6Be aware of other's feelings 5Be clear about what is true In deciding something important, do you more often 6Go with your emotions about what is best to do 5Do the logical thing, no matter what your emotions say Which better fits how you see yourself? 6Mercy 5Justice Are you more likely to: 6Be aware of other people's feelings 5Hurt other people's feelings without realizing it After deciding on a course of action, is it more natural for you to: 7See it through to completion, even if a bit inconvenient 8Reconsider it if unforeseen circumstances become known to you Which do you more often do: 7Want others to adjust to your schedule 8Adjust to the schedule of others Which fits better with how others see you: 7Deliberate 8Spontaneous Which fits better with how others see you: 7Decisive 8Openminded When it is settled well in advance that you will do a certain thing at a certain time, do you find it 7Nice to be able to plan accordingly 8Unduly constraining to be tied down If it were completely up to you, would you more often 7Follow a schedule 8Go with the flow When you make decisions, are you more often: 7Concerned with having things wrapped up 8Interested in keeping your options open as long as you can At a meeting, would you more often prefer to: 7Make sure things are not left "up in the air" unnecessarily 8Make sure your questions have been answered before deciding things When others make plans will you more often: 7Expect them to be followed through on as agreed 8Expect them to be followed flexibly In your social life, do you prefer to: 7Schedule commitments 8Stay open to do whatever seems right in the moment When you are behind schedule: 7Is it essential to catch back up 8Do you accept it as part of the day When a new situation comes up that conflicts with your plans, do you 8Try first to change your plans to fit the situation 7Try first to change the situation to fit your plans When others force you to change your plans at the last minute, do you often: 8Adjust quickly 7Find it a bother to adjust Do you prefer to 8Be free to do whatever looks like fun when the time comes 7Arrange dates, parties, etc. in advance Which fits better with how others see you: 8Flexible 7Scheduled When dealing with others, more often than not, are you happier when 8You have enough information, though settling things may be delayed 7Things are settled Which do you keep more orderly? 8Your mind 7Your external environment Are you more likely to know something 0Quickly and immediately 9Only after you have checked it out Are you more likely to believe something because 0It seems right 9You believe you have sufficient evidence for it Is it more natural for you to see life in 9Black and white 0Shades of grey Do you more often 9Double check your perceptions 0Trust your perceptions Which do you tend to trust more? 0Your perceptions 9Your judgements Do you often feel that other people should value the same things you value? 10Yes 11No When something goes wrong, who do you usually blame first? 11Yourself 10Others Which are you better at putting in logical order? 11Things 10Ideas Do you think better: 11When you are speaking to other people 10When you are writing Is it easier for you to logically accept: 11The actions of others 10Your own actions Are you more interested in 11Learning new facts 10Fitting facts into a theory Which do you tend to focus on more? 11What you are feeling 10What you believe other people are feeling Are you more prone to be warm and friendly 10With people you have just met 11Only with people you have gotten to know somewhat When you first meet someone, do you more often 10Act friendly right away 11Keep the person at a distance until you know the person better Which do you tend to laugh at more? 12"Earthy" humor and stories with a surprise ending 13Absurd situations, sudden and unexpected occurances, and word plays Do you tend to: 12Have a fairly wide range of appreciation without very often feeling much intensity about what you like or don't like 13Instinctually know what you like or don't like (e.g., in food, art, music, clothing, etc.) As you are listening to someone speak, which do you focus on more: 12What the person is actually saying 13What you think the person means Are you better at seeing possible solutions to: 12Your own problems 13The problems of others Are you good at brainstorming with a group of people? 13Yes 12No When you focus on your environment, do you more often 12Notice whatever is before your eyes 13Notice only what has special signifigance to you Which sort of person would be more likely to get your full attention? 13Someone who interests you 12Someone who tries to grab your attention Is it easier for you to focus your attention when 12You are gathering information 13Something pleases your senses Are you generally good at coming up with images and examples that illustrate your ideas? 13Yes 12No