Unnamed: 0
int64
0
11.3k
label
stringclasses
20 values
content
stringlengths
6
66.5k
2,800
comp.sys.mac.hardware
re duo crashes aftersleep add me to the list of bugged owners i had a bunch of problems regarding sleep wakeup restart with the when i first got it both with and without the techworks ram finally it died wouldn t start until i opened the docking door which snaps open and the machine came up fine but with the clock a few decades off apple replaced the processor board now twice the machine has frozen no mouse action twice the machine has refused to wake up acutally the backlighting came on and the disk spins when the power adaptor is plugged in but not with a good battery the first time this happened removing both power adaptor and battery for minute brought the machine back the second time this happened the machine wouldn t wake up until powered down for about minutes the screen had what looked like red horizontal lines accross it both timse the file fax modem preferences has been corrupted according to disinfectent i have removed all the fax and modem software and the third party memory and am waiting to see if it happens again forrest forrest howard oracle corporation oracle parkway box redwood shores ca
2,801
comp.sys.mac.hardware
re mac portable vs powerbook answers can the internal hard drive of the macportable upgraded to larger capacity what is the specs a drive lps model is there any third party modem greater than bps with fax option p s i notice the macportable batteries are avalable thru the apple catalog eric choi internet eric choi p f n z fidonet org
2,802
comp.sys.mac.hardware
quickdraw gx was re when are the rest of the inside mac s due we ll be releasing a whole new suite of quickdraw gx related docs if you re going to be at the wwdc next month you ll get a preliminary version of most of this documentation on the cd we re talking multiple thousands of pages i m afraid gx comprising graphics layout and printing has lots of new api calls and other functionality all of which need documenting dave opstad gx line layout weenie does gx take the place of bit qd or add to it right now bit is kinda aesthetically a pain in a few places because of hacks upon hacks to maintain compatibility with original qd i think of things like where you have to cast cgrafports to grafports and such it would be a lot cleaner to ditch this entire mess and start over do we get that maynard
2,803
comp.sys.mac.hardware
pb to non apple printer is there a workaround which will enable me to print to a hplj from my powerbook actually i m going to a m which will have an ethernet card in the localtalk slot grrrrr is there some hardware which will enable me to this easily kind of plug and play thanks pam mullen this message was sent by a member of seattle mac dbug s exchange bbs po box seattle wa usa infoline
2,804
comp.windows.x
th international obfuscated c code contest opening of enclosed are the rules guidelines and related information for the th international obfuscated c code contest this is part of a part shar file enjoy chongo landon curt noll oo larry bassel bin sh this is a shell archive shar made utc by chongo toad com source directory tmp existing files will be overwritten this shar contains length mode name r r r rules r r r guidelines r r r mkentry c r r r obfuscate info rules echo x extracting rules text sed s x shar eof rules x th international obfuscated c code contest rules x xcopyright c landon curt noll larry bassel xall rights reserved permission for personal education or non profit use is xgranted provided this this copyright and notice are included in its entirety xand remains unaltered all other uses must receive prior permission in writing xfrom both landon curt noll and larry bassel x x obfuscate tr v cated cating cates a to render obscure x b to darken to confuse his emotions obfuscated his x judgment llat obfuscare to darken ob intensive x lat fuscare to darken fuscus dark obfuscation n x obfuscatory adj x x xgoals of the contest x x to write the most obscure obfuscated c program under the rules below x to show the importance of programming style in an ironic way x to stress c compilers with unusual code x to illustrate some of the subtleties of the c language x to provide a safe forum for poor c code x x xrules x x to help us with the volume of entries we ask that you follow these rules x x your entry must be a complete program x x your entry must be bytes in length the number of characters x excluding whitespace tab space newline and excluding any or x followed by either whitespace or end of file must be x x your entry must be submitted in the following format x x entry xrule xfix y or n n this is a new entry y this replaces an older entry xtitle title of entry see comments below xentry entry number from to inclusive your st entry should by xdate date time of submission in utc see comments below xhost machine s and os s under which your entry was tested x use tab indented lines if needed x remark x place remarks about this entry in this section it would be helpful if x you were to indent your remarks with spaces though it is not a x requirement also if possible try to avoid going beyond the th x column blank lines are permitted x author xname your name xorg school company organization xaddr postal address x use tab indented lines to continue x don t forget to include the country xemail email address from a well known site or registered domain x if you give several forms list them on separate tab indented lines xanon y or n y remain anonymous n ok to publish this info x info xif your program needs an info file place a uuencoded copy of it in xthis section in the case of multiple info files use multiple info xsections if your entry does not need a info file skip this section x build xplace a uuencoded copy of the command s used to compile build your program xin this section it must uudecode into a file named build the resulting xfile must be bytes or less x program xplace a uuencoded copy of your program in this section it must uudecode xinto a file named is prog c the resulting file must follow rule x end x x regarding the above format x x the title must match the expression a za z a za z x and must be to characters in length x x it is suggested but not required that the title should x incorporate your username in the case of multiple authors x consider using parts of the usernames of the authors x x the date in the entry section should be given with respect x to utc the format of the date should be as returned by asctime x using the c locale see guidelines for more info x x you may correct revise a previously submitted entry by sending x it to the contest email address be sure to set fix in the x entry section to n the corrected entry must use the same x title and entry number as submittion that is being corrected be x sure that you note the resubmittion in the remark as well x x with the exception of the header all text outside of the above x format may be ignored by the judges if you need tell the judges x something put it in the remark section or send a separate x email message to the judges x x information from the author section will be published unless x y was given to the respective author s anon line x x to credit multiple authors include an author section for x each author each should start with author line and x should be found between the entry and build sections x x the entry s remarks should include x what this program does x how to run the program sample args or input x special compile or execution instructions if any x special filename requirements see rule and x information about any data files x why you think the program is obfuscated x note if this entry is a re submission of a previous entry x any other remarks humorous or otherwise x x do not rot your entry s remarks you may suggest that certain x portions of your remarks be rot ed if your entry wins an award x x info files should be used only to supplement your entry they x should not be required to exist x x if your entry does not need an info file skip the info x section if your entry needs multiple info files use multiple x info sections one per info file you should describe x each info file in the remark section x x if your entry is selected as a winner it will be modified as follows x x build is incorporated into a makefile and build is removed x prog c is renamed to your entry s title followed by an optional x digit followed by c x your entry is compiled into a file with the name of your entry s x title possibly followed by a digit x x if your entry requires that a build file exist state so in your x entry s remark section the makefile will be arranged to execute a x build shell script containing the build information the name of x this build shell script will be your entry s title possibly followed x by a digit followed by sh x x if needed your entry s remarks should indicate how your entry must x be changed in order to deal with the new filenames x x the build file the source and the resulting executable should be x treated as read only files if your entry needs to modify these files x it should make and modify a copy of the appropriate file if this x occurs state so in your entry s remarks x x entries that cannot be compiled by an ansi c compiler will be rejected x use of common c k r extensions is permitted as long as it does not x cause compile errors for ansi c compilers x x the program must be of original work all programs must be in the x public domain all copyrighted programs will be rejected x x entries must be received prior to may utc utc is x essentially equivalent to greenwich mean time email your entries to x x apple pyramid sun uunet hoptoad obfuscate x obfuscate toad com x x we request that your message use the subject ioccc entry x x if possible we request that you hold off on emailing your entries x until mar utc early entries will be accepted however x we will attempt to email a confirmation to the the first author for x all entries received after mar utc x x each person may submit up to entries per contest year each entry x must be sent in a separate email letter x x entries requiring human interaction to be built are not allowed x compiling an entry produce a file or files which may be executed x x programs that require special privileges setuid setgid super user x special owner or group are not allowed x x xfor more information x x the judging will be done by landon noll and larry bassel please send x questions or comments but not entries about the contest to x x apple pyramid sun uunet hoptoad judges x judges toad com x x the rules and the guidelines may and often do change from year to x year you should be sure you have the current rules and guidelines x prior to submitting entries to obtain all of them send email x to the address above and use the subject send rules x x one may also obtain them via anonymous ftp from x x host ftp uu net x user anonymous x pass yourname yourhost x dir pub ioccc x x xchongo landon curt noll cc hoptoad chongo xlarry bassel uunet ucbvax cbosgd sun lab shar eof chmod rules echo restore of rules failed set wc c rules wc c if test wc c then echo original size current size wc c fi guidelines echo x extracting guidelines text sed s x shar eof guidelines x th international obfuscated c code contest guidelines hints and comments x xcopyright c landon curt noll larry bassel xall rights reserved permission for personal education or non profit use is xgranted provided this this copyright and notice are included in its entirety xand remains unaltered all other uses must receive prior permission in writing xfrom both landon curt noll and larry bassel x xabout this file x x this file is intended to help people who wish to submit entries to x the international obfuscated c code contest ioccc for short x x this is not the ioccc rules though it does contain comments about x them the guidelines should be viewed as hints and suggestions x entries that violate the guidelines but remain within the rules are x allowed even so you are safer if you remain within the guidelines x x you should read the current ioccc rules prior to submitting entries x the rules are typically sent out with these guidelines x x xwhat is new in x x the entry format is better for us anyway the program mkentry c x has been updated see entry format x x we will reject entries that cannot be compiled using an ansi c x compiler certain old obfuscation hacks that cause ansi c compilers x fits are no longer permitted some of the new issues deal with x non integral array types variable number of arguments c preprocessor x directives and the exit function see our likes and dislikes x x xhints and suggestions x x you are encouraged to examine the winners of previous contests see x for more information for details on how to get previous winners x x keep in mind that rules change from year to year so some winning entries x may not be valid entries this year what was unique and novel one year x might be old the next year x x an entry is usually examined in a number of ways we typically apply x a number of tests to an entry x x look at the original source x convert ansi tri graphs to ascii x c pre process the source ignoring include lines x c pre process the source ignoring define and include lines x run it through a c beautifier x examine the algorithm x lint it x compile it x execute it x x you should consider how your entry looks in each of the above tests x you should ask yourself if your entry remains obscure after it has been x cleaned up by the c pre processor and a c beautifier x x your entry need not do well under all or in most tests in certain x cases a test is not important entries that compete for the x strangest most creative source layout need not do as well as x others in terms of their algorithm on the other hand given x two such entries we are more inclined to pick the entry that x does something interesting when you run it x x we try to avoid limiting creativity in our rules as such we leave x the contest open for creative rule interpretation as in real life x programming interpreting a requirements document or a customer request x is important for this reason we often award worst abuse of the x rules to an entry that illustrates this point in an ironic way x x if you do plan to abuse the rules we suggest that you let us know x in the remarks section please note that an invitation to abuse x is not an invitation to break we are strict when it comes to the x byte size limit also abusing the entry format tends to x annoy more than amuse x x we do realize that there are holes in the rules and invite entries x to attempt to exploit them we will award worst abuse of the rules x and then plug the hole next year even so we will attempt to use x the smallest plug needed if not smaller x x check out your program and be sure that it works we sometimes make x the effort to debug an entry that has a slight problem particularly x in or near the final round on the other hand we have seen some x of the best entries fall down because they didn t work x x we tend to look down on a prime number printer that claims that x is a prime number if you do have a bug you are better off x documenting it noting this entry sometimes prints the th power x of a prime by mistake would save the above entry and sometimes x a strange bug feature can even help the entry of course a correctly x working entry is best x x xour likes and dislikes x x doing masses of defines to obscure the source has become old we x tend to see thru masses of defines due to our pre processor tests x that we apply simply abusing defines or dfoo bar won t go as far x as a program that is more well rounded in confusion x x many ansi c compilers dislike the following code and so do we x x define d define x d foo don t expect this to turn into define foo x x int i x j don t use such implicit type declaration x int k x x we suggest that you compile your entry with an ansi c compiler if you x must use non ansi c such as k r c you must avoid areas that result in x compile link errors for ansi c compilers x x unfortunately ansi c requires array indexes to be of integral type x thus the following classical obfuscation hacks are no longer allowed x x int i x char c x i c use c i instead x i string use string i instead x x if your entry uses functions that have a variable number of x arguments be careful systems implement va list as a wide variety x of ways because of this a number of operations using va list are x not portable and must not be used x x assigning a non va list variable to from a va list variable x casting a non va list variable into from a va list variable x passing a va list variable to a function expecting a non va list arg x passing a non va list variable to a function expecting a va list arg x performing arithmetic on va list variables x using va list as a structure or union x x in particular do not treat va list variables as if they were a char s x x avoid using varargs h use stdarg h instead x x if you use c preprocessor directives define if ifdef x the leading must be the first character on a line while some x c preprocessors allow whitespace the leading many do not x x because the exit function returns void on some systems entries x must not assume that it returns an int x x small programs are best when they are short obscure and concise x while such programs are not as complex as other winners they do x serve a useful purpose they are often the only program that people x attempt to completely understand for this reason we look for x programs that are compact and are instructional x x one line programs should be short one line programs say around x bytes long getting close to bytes is a bit too long in our opinion x x we tend to dislike programs that x x are very hardware specific x are very os or un x version specific x index strchr differences are ok but socket streams specific x code is likely not to be x dump core or have compiler warnings x it is ok only if you warn us in the remark header item x won t compile under both bsd or sys v un x x abusing the build file to get around the size limit x obfuscate by excessive use of ansi tri graphs x are longer than they need to be x are similar to previous winners x are identical to previous losers x x unless you are cramped for space or unless you are entering the x best one liner category we suggest that you format your program x in a more creative way than simply forming excessively long lines x x the build file should not be used to try and get around the size x limit it is one thing to make use of a several d s to help out x but it is quite another to use bytes of d s in order to x try and squeeze the source under the size limit you should feel x free to make use of the build file space but you are better off x if you show some amount of restraint x x we allowed whitespace and in certain cases or do not impact x your program size up to a certain point because we want to get x away from source that is simply a compact blob of characters x x given two versions of the same program one that is a compact blob x of code and the other that is formatted more like a typical c x program we tend to favor the second version of course a third x version of the same program that is formatted in an interesting x and or obfuscated way would definitely win over the first two x x we suggest that you avoid trying for the smallest self replicating x program we are amazed at the many different sizes that claim x to be the smallest there is nothing wrong with self replicating x programs in fact a number of winners have been self replicating x you might want to avoid the claim of smallest lest we or others x know of a smaller one x x x client entries should be as portable as possible entries that x adapt to a wide collection of environments will be favored don t x depend on a particular type of display for example don t depend x on color or a given size don t require backing store x x x client entries should avoid using x related libraries and x software that is not in wide spread use we ask that such x client x entries restrict themselves to only the low level xlib and the x athena widget set libx a libxaw a libxmu a and libxt a x don t use m tif xv ew or openl ok toolkits since not everyone x has them avoid depending on a particular window manager not x everyone has x r and some people are stuck back in x r or x earlier so try to target x r without requiring x r better x yet try to make your entry run on all version x window systems x x x client entries should not to depend on particular items on x xdefaults if you must do so be sure to note the required lines x in the remark section x x we like programs that x x are as concise and small as they need to be x do something at least quasi interesting x pass lint without complaint not a requirement but it is nice x are portable x are unique or novel in their obfuscation style x make use of a number of different types of obfuscation x make us laugh and or throw up x x some types of programs can t excel in some areas of course your x program doesn t have to excel in all areas but doing well in several x areas really does help x x we freely admit that interesting creative or humorous comments in x the remark section helps your chance of winning if you had to x read of many twisted entries you too would enjoy a good laugh or two x we think the readers of the contest winners do as well x x be creative x x xentry format x x in order to help us process the many entries we must request your x assistance by formatting your entries in a certain way this format x in addition allows us to quickly separate information about the x author from the program itself see judging process x x we have provided the program mkentry as an example of how to x format entries you should be aware of the following warning that x is found in mkentry c x x this program attempts to implement the ioccc rules every x attempt has been made to make sure that this program produces x an entry that conforms to the contest rules in all cases x where this program differs from the contest rules the x contest rules will be used be sure to check with the x contest rules before submitting an entry x x you are not required to use mkentry it is convenient however x as it attempts to uuencode the needed files and attempt to check x the entry against the size rules x x if you have any suggestions comments fixes or complaints about x the mkentry c program please send email to the judges see below x x the following is a sample entry x x entry xrule xfix n xtitle chonglab xentry xdate mon mar xhost un x v pdp x bsd pdp x remark x this is a non obfuscated obfuscated c program x x it is likely not to win a prize but what do you expect from x a short example x author xname landon curt noll xorg ioccc judging group xaddr toad hall x po box x san francisco california x x usa xemail chongo toad com xanon n x author xname larry bassel xorg ioccc judging group xaddr toad hall x po box x san francisco california x x usa xemail hoptoad sun lab x lab sun com xanon n x info x xend x build xbegin build x v o ryc uo r v x xend x program xend x end x x typically the build file should assume that the source is prog c x and will compile into prog if an entry wins we will rename x its source and binary to avoid filename collision by tradition x we use the name of the entry s title followed by an optional x digit in case of name conflicts x x if the above entry somehow won the least likely to win award x we would use chonglab c and chonglab x x if your entry depends on or requires that your build source x and or binary files be a particular name please say so in the x remark section if this case applies it would be be helpful x if you did one of the following x x tell us how to change the filename s in your entry x x have the build file make copies of the files for example x x cc prog c o special name need special binary x x or rm f special src c need special source x cp prog c special src c x cc special src c o special name x x or rm f special build need special build x tail build special build x sh special build x x assume that we will use the entry title send us a version of x your build program files that uses the name convention you x should uuencode these files in data sections x x if your entry needs to modify its source info or binary files x please say so in the remark section you should try to avoid x touching your original build source and binary files you should x arrange to make copies of the files you intend to modify this x will allow people to re generate your entry from scratch x x remember that your entry may be built without a build file we x typically incorporate the build lines into a makefile if the x build file must exist say so in the remark section x x if your entry needs special info files you should uuencode them x into info sections in the case of multiple info files x use multiple info sections if no info files are needed x then skip the info section x x info files are intended to be input or detailed information that x does not fit well into the remark section for example an x entry that implements a compiler might want to provide some sample x programs for the user to compile an entry might want to include a x lengthy design document that might not be appropriate for a x hints file x x info files should be used only to supplement your entry for x example info files may provide sample input or detailed x information about your entry because they are supplemental x the entry should not require them exist x x in some cases your info files might be renamed to avoid name x conflicts if info files should not be renamed for some reason x say so in the remark section x x info files must uudecode into the current directory if they x absolutely must be renamed or moved into a sub directory say x so in the remark section x x when submitting multiple entries be sure that each entry has x a unique entry number from to your first entry should x have entry number x x with the exception of the header all text outside of the entry x format may be ignored that is don t place text outside of the x entry and expect the judges to see it our decoding tools aren t x ai progs if you need tell the the something put it in the x remark section or send a email to the judges at x x apple pyramid sun uunet hoptoad judges not the address for x judges toad com submitting entries x x the date should be given with respect to utc some systems refer x to this as gmt or gmt the format of the date should be that as x returned by asctime in the c locale an example of such a string is x x thr apr x x this format is similar to the output of the date command the x string does not include the timezone name before the year on many x systems one of the following command will produce a similar string x x date u a h d t y x date u sed e s x sh c tz utc date sed e s x sh c tz gmt date sed e s x sh c tz gmt date sed e s x x you are allowed to update fix revise your entry to do so set x the fix line in the entry section to y instead of n x be sure that the resubmittion uses the same title and entry number x as well as these are used to determine which entry is to be x replaced x x xjudging process x x entries are judged by larry bassel and landon curt noll x x entries are unpacked into individual directories the email message x is unpacked into individual files each containing x x entry section x all author sections x all info sections x build section x program section x any other text including the email message headers x x prior to judging the any other text file is scanned to be sure x it does not contain useful information or in case the entry was x malformed and did not unpack correctly information from the x author sections are not read until the judging process is x complete and then only from entries that have won an award x x the above process helps keep us biased for against any one particular x individual we are usually kept in the dark as much as you are x until the final awards are given we like the surprise of finding x out in the end who won and where they were from x x we attempt to keep all entries anonymous unless they win an award x because the main prize of winning is being announced we make all x attempts to send non winners into oblivion we remove all non winning x files and shred all related paper by tradition we do not even x reveal the number of entries that we received for the curious x we do indicate the volume of paper consumed when presenting the ioccc x winners at talks x x after the usenix announcement we attempt to send email to the x authors of the winning entries one reason we do this is to give x the authors a chance to comment on the way we have presented their x entry they are given the chance to correct mistakes typos we x often accept their suggestions comments about our remarks as well x this is done prior to posting the winners to the wide world x x judging consists of a number of elimination rounds during a round x the collection of entries are divided into two roughly equal piles x the pile that advances on to the next round and the pile that does x not we also re examine the entries that were eliminated in the x previous round thus an entry gets at least two readings x x a reading consists of a number of actions x x reading the entry section x reading the uudecoded build section x reading the uudecoded program section x reading the uudecoded info section s if any x passing the source thru the c pre processor x shipping over any include files x performing a number of c beautify cleanup edits on the source x passing the beautified source thru the c pre processor x shipping over any include files x x in later rounds other actions are performed x x linting the source x compiling building the source x running the program x performing misc tests on the source and binary x x until we reduce the stack of entries down to about entries entries x are judged on an individual basis an entry is set aside because it x does not in our opinion meet the standard established by the round x when the number of entries thins to about entries we begin to form x award categories entries begin to compete with each other for awards x an entry often will compete in several categories x x the actual award category list will vary depending on the types of entries x we receive a typical category list might be x x best small one line program x best small program x strangest most creative source layout x most useful obfuscated program x best game that is obfuscated x most creatively obfuscated program x most deceptive c code x best x client see our likes and dislikes x best abuse of ansi c x worst abuse of the rules x anything else so strange that it deserves an award x x we do not limit ourselves to this list for example a few entries are so x good bad that they are declared winners at the start of the final round x we will invent awards categories for them if necessary x x in the final round process we perform the difficult tasks of x reducing the remaining entries typically about down to or x winners often we are confident that the entries that make it into x the final round are definitely better than the ones that do not x make it the selection of the winners out of the final round is x less clear cut x x sometimes a final round entry good enough to win but is beat out x by a similar but slightly better entry for this reason it is x sometimes worthwhile to re enter an improved version of an entry x that failed to win in a previous year this assumes of course x that the entry is worth improving in the first place x x more often that not we select a small entry usually one line a x strange creative layout entry and an entry that abuses the contest x rules in some way x x in the end we traditionally pick one entry as best sometimes such x an entry simply far exceeds any of the other entry more often the x best is picked because it does well in a number of categories x x xannouncement of winners x x the first announcement occurs at a summer usenix conference by tradition x this is done during the latter part of the uunet ioccc bof just prior to x the berkeley bsd and bsdi bof x x winning entries will be posted in late june to the following groups x x comp lang c comp unix wizards alt sources x x in addition pointers to these postings are posted to the following x x comp sources d alt sources d misc misc x comp sources misc comp windows x x x winning entries will be deposited into the uunet archives see x below for details x x often winning entries are published in selected magazines winners x have appeared in books the new hackers dictionary and on t shirts x x last but not least winners receive international fame and flames x x xfor more information x x you may contact the judges by sending email to the following address x x apple pyramid sun uunet hoptoad judges not the address for x judges toad com submitting entries x x questions and comments about the contest are welcome x x one may obtain a copy of the current rules guidelines or mkentry x program to obtain all of them send email to the address above x and use the subject send rules x x one may also obtain the above items we well as winners of previous x contests via anonymous ftp from x x host ftp uu net x user anonymous x pass yourname yourhost x dir pub ioccc x x often contest rules guidelines and winners are available from x archive sites check comp sources unix archives for example x you may also request previous winners by email using the judges x email address though we ask that you do this as a last resort x x xchongo landon curt noll cc hoptoad chongo xlarry bassel uunet ucbvax cbosgd sun lab shar eof chmod guidelines echo restore of guidelines failed set wc c guidelines wc c if test wc c then echo original size current size wc c fi echo end of part continue with part exit sunnyvale residents vote landon noll for sunnyvale city council seat
2,805
comp.windows.x
th international obfuscated c code contest opening part of enclosed are the rules guidelines and related information for the th international obfuscated c code contest this is part of a part shar file enjoy chongo landon curt noll oo larry bassel bin sh this is part of a multipart archive mkentry c echo x extracting mkentry c text sed s x shar eof mkentry c x mkentry c x x copyright c landon curt noll larry bassel x all rights reserved permission for personal education or non profit use x is granted provided this this copyright and notice are included in its x entirety and remains unaltered all other uses must receive prior x permission in writing from both landon curt noll and larry bassel x x x mkentry make an international obfuscated c code contest entry x x usage x mkentry r remarks b build p prog c o ioccc entry x x r remarks file with remarks about the entry x b build file containing how prog c should be built x p prog c the obfuscated program source file x o ioccc entry ioccc entry output file x x compile by x cc mkentry c o mkentry x x x placed in the public domain by landon curt noll x x this software is provided as is and without any express or implied x warranties including without limitation the implied warranties of x merchantability and fitness for a particular purpose x x x warning x x this program attempts to implement the ioccc rules every attempt x has been made to make sure that this program produces an entry that x conforms to the contest rules in all cases where this program x differs from the contest rules the contest rules will be used be x sure to check with the contest rules before submitting an entry x x send questions or comments but not entries about the contest to x x sun pacbell uunet pyramid hoptoad judges x judges toad com x the rules and the guidelines may and often do change from year to x year you should be sure you have the current rules and guidelines x prior to submitting entries to obtain all of them send email x to the address above and use the subject send rules x x because contest rules change from year to year one should only use this x program for the year that it was intended be sure that the rule year x define below matches this current year x x x include stdio h x include ctype h x include time h x include sys types h x include sys stat h x x logic x ifndef true x define true x endif true x ifndef false x define false x endif false x define eof ok true x define eof not ok false x x global limits x define rule year note should match the current year x define start date mar utc first confirmation received x define max col max column a line should hit x define max build size max how to build size x define max program size max program source size x define max program size max program source size not counting x whitespace and not followed by x whitespace or eof x define max title len max chars in the title x define max entry len max length in the entry input line x define max entry max number of entries per person per year x define max file len max filename length for a info file x x where to send entries x define entry addr apple pyramid sun uunet hoptoad obfuscate x define entry addr obfuscate toad com x x uuencode process assumes ascii x define uuencode c encode str int c xff x define uuencode len max uuencode chunk size x define uuinfo mode mode of an info file s uuencode file x define uubuild mode mode of the build file s uuencode file x define uubuild name build name for the build file s uuencode file x define uuprog mode mode of the program s uuencode file x define uuprog name prog c name for the program s uuencode file x x encode str char val is the uuencoded character of val xchar encode str abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz x x global declarations xchar program our name xlong start time the startup time x x forward declarations xvoid parse args xvoid usage xfile open remark xfile open build xfile open program xfile open output xvoid output entry xvoid output remark xvoid output author xvoid output info xvoid output build xvoid output program xvoid output end xint get line xvoid output till dot xint col len xvoid check io xvoid uuencode x xmain argc argv x int argc arg count x char argv the args x x file remark null open remarks stream x file build null open build file stream x file prog null open program stream x file output null open output stream x char rname null file with remarks about the entry x char bname null file containing how prog c should be built x char pname null the obfuscated program source file x char oname null ioccc entry output file x struct tm tm startup time structure x x x check on the year x x start time time long x tm gmtime start time x if tm tm year rule year x fprintf stderr x s warning this program applies to d which may differ from d n n x argv rule year tm tm year x x x x parse the command line args x x parse args argc argv rname bname pname oname x x x open check the input and output files x x we open and truncate the output file first in case it is the same x as one of the input files x x output open output oname x remark open remark rname x build open build bname x prog open program pname x if output null remark null build null prog null x exit x x x x output each section x x output entry output oname x output remark output oname remark rname x output author output oname x output info output oname x output build output oname build bname x output program output oname prog pname x output end output oname x x x flush the output x x if fflush output eof x fprintf stderr s flush error in s program oname x perror x exit x x x x final words x x printf nyour entry can be found in s you should check this file n x oname x printf correct any problems and verify that the uudecode utility will n x printf correctly decode your build file and program n n x printf this program has been provided as a guide for submitters in n x printf cases where it conflicts with the rules the rules shall apply n x printf it is your responsibility to ensure that your entry conforms to n x printf the current rules n n x printf email your entries to n x printf t s n entry addr x printf t s n n entry addr x printf please use the following subject when you email your entry n x printf tioccc entry n n x all done x exit x x x x parse args parse the command line args x x given the command line args this function parses them and sets the x required name flags this function will return only if the command x line syntax is correct x xvoid xparse args argc argv rname bname pname oname x int argc arg count x char argv the args x char rname file with remarks about the entry x char bname file containing how prog c should be built x char pname the obfuscated program source file x char oname ioccc entry output file x x char optarg flag option operand x int flagname the name of the flag x int i x x x not everyone has getopt so we must parse args by hand x x program argv x for i i argc i x x determine the flagname x if argv i x usage x notreached x x flagname int argv i x x determine the flag s operand x if flagname argv i x optarg argv i x else x if i argc x usage x notreached x else x optarg argv i x x x x save the flag s operand in the correct global variable x switch flagname x case r x rname optarg x break x case b x bname optarg x break x case p x pname optarg x break x case o x oname optarg x break x default x usage x notreached x x x x x verify that we have all of the required flags x x if rname null bname null pname null oname null x usage x notreached x x return x x x x usage print a usage message and exit x x this function does not return x xvoid xusage exitval x int exitval exit with this value x x fprintf stderr x usage s r remarks b build p prog c o ioccc entry n n program x fprintf stderr t r remarks tfile with remarks about the entry n x fprintf stderr t b build tfile containing how prog c should be built n x fprintf stderr t p prog c tthe obfuscated program source file n x fprintf stderr t o ioccc entry tioccc entry output file n x exit exitval x x x x open remark open check the remark file x x the remark file should be indented by spaces and should not extend x beyond column max col these are not requirements so we only warn x x this function returns null on i o or format error x xfile xopen remark filename x char filename x x file stream the opened file stream x char buf bufsiz input buffer x int toolong number of lines that are too long x int non indent number of lines not indented by spaces x x x open the remark input file x x stream fopen filename r x if stream null x fprintf stderr s cannot open remark file s x program filename x perror x return null x x x x look at each line x x while fgets buf bufsiz stream null x x count lines that do not start with spaces x if buf n strncmp buf x non indent x x x count long lines x if col len buf max col x found a line that is too long x toolong x x x x watch for i o errors x check io stream filename eof ok x x note long lines if needed x if toolong x fprintf stderr x s warning d line s from s extend beyond the th column n x program toolong filename x fprintf stderr x s this is ok but it would be nice to avoid n n x program x x x note non indented lines if needed x if non indent x fprintf stderr x s warning d line s from s are not indented by spaces n x program non indent filename x fprintf stderr x s this is ok but it would be nice to avoid n n x program x x x return the open file x rewind stream x return stream x x x x open build open check the build file x x the how to build file must not be longer than max build size bytes x x this function returns null on i o or size error x xfile xopen build filename x char filename x x file stream the opened file stream x struct stat statbuf the status of the open file x x x open the how to build input file x x stream fopen filename r x if stream null x fprintf stderr s cannot open how to build file s x program filename x perror x return null x x x x determine the size of the file x x if fstat fileno stream statbuf x fprintf stderr s cannot stat how to build file s x program filename x perror x return null x x if statbuf st size max build size x fprintf stderr x s fatal the how to build file s is d bytes long n x program filename statbuf st size x fprintf stderr x s it may not be longer than d bytes n x program max build size x return null x x x return the open file x return stream x x x x open program open check the program source file x x the program source file must be bytes the number of x non whitespace and chars not followed by whitespace must x be bytes x x this function returns null on i o or size error x xfile xopen program filename x char filename x x file stream the opened file stream x struct stat statbuf the status of the open file x int count special count size x int c the character read x x x open the program source input file x x stream fopen filename r x if stream null x fprintf stderr s cannot open program source file s x program filename x perror x exit x x x x determine the size of the file x x if fstat fileno stream statbuf x fprintf stderr s cannot stat program source file s x program filename x perror x return null x x if statbuf st size max program size x fprintf stderr x s fatal the program source file s is d bytes long n x program filename statbuf st size x fprintf stderr x s it may not be longer than d bytes n x program max program size x return null x x x x count the non whitespace non followed by whitespace chars x x count x c x while c fgetc stream eof x look at non whitespace x if isascii c isspace c x switch c x case count if not followed by eof or whitespace x case x case x peek at next char x c fgetc stream x if c eof isascii c isspace c x not followed by whitespace or eof count it x ungetc c stream x count x x break x default x count x break x x x x x watch for i o errors x check io stream filename eof ok x x look at the special size x if count max program size x fprintf stderr x s fatal the number of bytes that are non whitespace and n x program x fprintf stderr x s that are not followed by whitespace n x program x fprintf stderr x s or eof must be d bytes n x program max program size x fprintf stderr x s in s d bytes were found n x program filename count x return null x x x return the open file x rewind stream x return stream x x x x open output open check the entry output file x x this function returns null on open error x xfile xopen output filename x char filename x x file stream the opened file stream x x x open the ioccc entry output file x x stream fopen filename w x if stream null x fprintf stderr s cannot open ioccc entry file for output s x program filename x perror x exit x x x return the open file x return stream x x x x output entry output the entry section x x read the needed information form stdin and write the entry section x xvoid xoutput entry output oname x file output entry s output file stream x char oname name of the output file x x char title max title len the entry s title x char buf max col i o buffer x int entry entry number x int ret fields processed by fscanf x int ok line the line is not ok x char skip input to skip x file date pipe pipe to a date command x time t epoch sec seconds since the epoch x char p x x x write the start of the section x x fprintf output entry n x check io output oname eof not ok x x x write the rule year x x fprintf output rule t d n rule year x check io output oname eof not ok x x determine if this is a fix x printf is this a fix update or resubmittion to a x printf previous entry enter y or n x while get line buf buf y buf n x printf nplease answer y or n x x if buf y x fprintf output fix ty n x check io output oname eof not ok x printf nbe sure that the title and entry number that you give n x printf are the same of as the entry you are replacing n x else x fprintf output fix tn n x check io output oname eof not ok x x x x write the title x x printf nyour title must match expression be a a za z character n x printf followed by to d more a za z characters n n x max title len x printf it is suggested but not required that the title should n x printf incorporate your username in the n x printf case of multiple authors consider using parts of the usernames n x printf of the authors n n x printf enter your title x do x prompt and read a line x if ok line get line title max title len max col x printf ntitle is too long please re enter x continue x x x verify the pattern not everyone has regexp so do it by hand x if isascii int title x isalnum int title title title x printf ninvalid first character in the title n n x printf enter your title x ok line x else x for p title p p n p x if isascii int p x isalnum int p x p p p p x printf ninvalid character in the title n n x printf enter your title x ok line x x x x while ok line x fprintf output title t s title x check io output oname eof not ok x x x write the entry number x x printf neach person may submit up to d entries per year n n x max entry x printf enter an entry number from to d inclusive max entry x do x get a valid input line x fflush stdout x ret fscanf stdin d n entry x check io stdin stdin eof not ok x skip over input until newline is found x do x skip fgetc stdin x check io stdin stdin eof not ok x if skip n x bad text in input invalidate entry number x entry x x while skip n x x check if we have a number and if it is in range x if ret entry entry max entry x printf x nthe entry number must be between and d inclusive n n x max entry x printf enter the entry number x x while ret entry entry max entry x fprintf output entry t d n entry x check io output oname eof not ok x x x write the submission date x x returns a newline x epoch sec time null x fprintf output date t s asctime gmtime epoch sec x check io output oname eof not ok x x x write the os machine host information x x printf x nenter the machine s and os s under which your entry was tested n x output till dot output oname host x x x x output remark output the remark section x x read the needed information form stdin and write the entry section x xvoid xoutput remark output oname remark rname x file output entry s output file stream x char oname name of the output file x file remark stream to the file containing remark text x char rname name of the remark file x x char buf bufsiz input output buffer x x x write the start of the section x x fprintf output remark n x check io output oname eof not ok x x x copy the remark file to the section x x while fgets buf bufsiz remark null x fputs buf output x check io output oname eof not ok x x check io remark rname eof ok x x be sure that the remark section ends with a newline x if buf strlen buf n x fputc n output x check io output oname eof not ok x x x x x output author output the author section x x read the needed information from stdin and write the author section x if multiple authors exist multiple author sections will be written x xvoid xoutput author output oname x file output entry s output file stream x char oname name of the output file x x char buf max col i o buffer x int more auths true more authors to note x int auth cnt number of authors processed x x x prompt the user for the author section x x printf nenter information about each author if your entry is after n x printf s and before the contest deadline the judges n start date x printf will attempt to email back a confirmation to the first author n x x x place author information for each author in an individual section x x do x x write the start of the section x fprintf output author n x check io output oname eof not ok x x write the author x printf nauthor d name auth cnt x while get line buf max col max col x printf nname too long please re enter x x fprintf output name t s buf x check io output oname eof not ok x x write the organization x printf nenter the school company organization of author d n x auth cnt x printf nauthor d org auth cnt x while get line buf max col max col x printf nline too long please re enter x x fprintf output org t s buf x check io output oname eof not ok x x write the address x printf x nenter the postal address for author d be sure to include n x auth cnt x printf your country and do not include your name n x output till dot output oname addr x x write the email address x printf x nenter the email address for author d use an address from n x auth cnt x printf x a registered domain or well known site if you give several n x printf forms list them one per line n x output till dot output oname email x x write the anonymous status x printf nshould author d remain anonymous enter y or n x auth cnt x while get line buf buf y buf n x printf nplease answer y or n x x fprintf output anon t s buf x check io output oname eof not ok x x determine if there is another author x printf nis there another author enter y or n x while get line buf buf y buf n x printf nplease answer y or n x x if buf y x more auths true x else x more auths false x x while more auths true x return x x x x output info output the info section s x x read the needed information from stdin and write the info section x if multiple info files exist multiple info sections will be written x xvoid xoutput info output oname x file output entry s output file stream x char oname name of the output file x x char infoname max file len filename buffer x char yorn y or n answer x char uuname name to uuencode as x file infile info file stream x x x prompt the user for info information x x printf ninfo files should be used only to supplement your entry n x printf for example info files may provide sample input or detailed n x printf information about your entry because they are supplemental n x printf the entry should not require them to exist n n x x x while there is another info file to save uuencode it x x printf do you have a info file to include enter y or n x while get line yorn yorn y yorn n x printf nplease answer y or n x x while yorn y x x read the filename x printf nenter the info filename x while get line infoname max file len x printf ninfo filename too long please re enter x x x compute the basename of the info filename x remove the trailing newline x uuname infoname strlen infoname x uuname x avoid rindex shrrchr compat issues do it by hand x for uuname uuname infoname uuname x if uuname x uuname x break x x x x attempt to open the info file x infile fopen infoname r x if infile null x fprintf stderr n s cannot open info file s x program infoname x perror x continue x x x x write the start of the section x x fprintf output info n x check io output oname eof not ok x x uuencode the info file x uuencode output oname infile infoname uuinfo mode uuname x x printf ndo you have another info file to include enter y or n x while get line yorn yorn y yorn n x printf nplease answer y or n x x x return x x x x output build output the build section x x read the needed information from stdin and write the build section x xvoid xoutput build output oname build bname x file output entry s output file stream x char oname name of the output file x file build open build file stream x char bname name of the build file x x x write the start of the section x x fprintf output build n x check io output oname eof not ok x x x uuencode the program file x x uuencode output oname build bname uubuild mode uubuild name x return x x x x output program output the program section x x read the needed information form stdin and write the program section x xvoid xoutput program output oname prog pname x file output entry s output file stream x char oname name of the output file x file prog open program stream x char pname name of program file x x x write the start of the section x x fprintf output program n x check io output oname eof not ok x x x uuencode the program file x x uuencode output oname prog pname uuprog mode uuprog name x return x x x x output end output the end section x x read the needed information form stdin and write the end section x xvoid xoutput end output oname x file output entry s output file stream x char oname name of the output file x x x write the final section terminator x x fprintf output end n x check io output oname eof not ok x return x x x x get line get an answer from stdin x x this function will flush stdout in case a prompt is pending and x read in the answer x x this function returns if the line is too long of the length of the x line including the newline of the line was ok this function does x not return if error or eof x xint xget line buf siz maxcol x char buf input buffer x int siz length of input including the newline x int maxcol max col allowed disable check x x int length the length of the input line x x flush terminal output x fflush stdout x x read the line x if fgets buf siz stdin null x report the problem x check io stdin stdin eof not ok x x x look for the newline x length strlen buf x if buf length n x int eatchar the char being eaten x x no newline found line must be too long eat the rest of the line x do x eatchar fgetc stdin x while eatchar eof eatchar n x check io stdin stdin eof not ok x x report the situation x return x x x watch for long lines if needed x if maxcol length maxcol col len buf maxcol x report the situation x return x x x return length x return length x x x x output till dot output a set of lines until by itself is read x x this routine will read a set of lines until but not including x a single line with is read the format of the output is x x leader tfirst line x tnext line x tnext line x x x this routine will not return if i o error or eof x xvoid xoutput till dot output oname leader x file output entry s output file stream x char oname name of the output file x char leader the lead text for the first line x x char buf bufsiz input buffer x int count lines read x int done false true finished reading input x x instruct the user on how to input x printf nto end input enter a line with a single period n x x read lines until or eof x count x while done x issue the prompt x printf s t count leader x fflush stdout x x get the line x if get line buf bufsiz max col x printf nline too long please re enter n t x continue x x x note if was read x if strcmp buf n x done true x x x write line if we read something x if done x fprintf output s t s count leader buf x check io output oname eof not ok x x x x if no lines read at least output something x if count x fprintf output s t n leader x check io output oname eof not ok x x return x x x x col len determine the highest that a string would reach x x given a string this routine returns that a string would reach x if the string were printed at column tab stops are assumed x to start at x xint xcol len string x char string the string to examine x x int col current column x char p current char x x scan the string x for col p string p p n p x note the column shift x col p t col col x x if p n x col x x x return the highest column x return col x x x x check io check for eof or i o error on a stream x x does not return if eof or i o error x xvoid xcheck io stream name eof ok x file stream the stream to check x char name the name of this stream x int eof ok eof ok or eof not ok x x test for i o error x if ferror stream x fprintf stderr s error on s program name x perror x exit x x test for eof x else if eof ok eof not ok feof stream x fprintf stderr s eof on s n program name x exit x x return x x x x uuencode uuencode a file x x perform the uuencoding process identical to the process performed x by the uuencode utility x x this routine implements the algorithm described in the uuencode x bsd reno man page x xvoid xuuencode output oname infile iname umode uname x file output output file stream x char oname output filename x file infile input file stream x char iname input filename x int umode the mode to put on the uuencode file x char uname name to put on the uuencode file x x char buf uuencode len the uuencode buffer x int read len actual number of chars read x int val bit chunk from buf x char filler filler uuencode pad text x char p x x x output the initial uuencode header x x fprintf output begin o s n umode uname x check io output oname eof not ok x x x clear out the input buffer x x for p buf p buf sizeof buf sizeof buf p x p x x x x we will process uuencode len chars at a time forming x a single output line each time x x while read len fread buf sizeof buf uuencode len infile x x x the first character is the length character x x fputc uuencode read len output x check io output oname eof not ok x x x we will convert bits at a time thus we will convert x sets of bits into sets of uuencoded bits x x for p buf read len read len p x x bits to x val p x f x fputc uuencode val output x check io output oname eof not ok x x bits to x val p x p x f x fputc uuencode val output x check io output oname eof not ok x x bits to x val p x c p x x fputc uuencode val output x check io output oname eof not ok x x bits to x val p x f x fputc uuencode val output x check io output oname eof not ok x x x end of uuencode len line x fputc n output x check io output oname eof not ok x x x clear out the input buffer don t depend on bzero or memset x x for p buf p buf sizeof buf sizeof buf p x p x x x x check the last read on the input file x check io infile iname eof ok x x write end of uuencode file x fprintf output c nend n uuencode filler x check io output oname eof not ok x shar eof chmod mkentry c echo restore of mkentry c failed set wc c mkentry c wc c if test wc c then echo original size current size wc c fi obfuscate info echo x extracting obfuscate info text sed s x shar eof obfuscate info x obfuscated contest information x xcopyright c landon curt noll larry bassel xall rights reserved permission for personal education or non profit use is xgranted provided this this copyright and notice are included in its entirety xand remains unaltered all other uses must receive prior permission in writing xfrom both landon curt noll and larry bassel x xthe international obfuscated c code contest ioccc in the sprit of xco operation is willing mention other programming contents as space xpermits x xhow to have your contest included in this file x x if you wish the ioccc judges to include your contest in this file x send a request to x x judges toad com x x we request that contest descriptions be limited to lines and to x not exceed bytes we typically request that your contest x include a current description of the ioccc x x in order to be included in this file for given year we must x receive a current description no earlier than jan utc and x no later than feb utc agreement to publish your x contest must also be obtained prior to feb annual contests x that fail to submit a new entry will be dropped from this file x xofficial disclaimer pardon the officialese x x the contents noted below other than the ioccc are not affiliated x with the ioccc nor are they endorsed by the ioccc we reserve the x right to refuse to print information about a given contest x x the information below was provided by the particular contest x organizer s and printed by permission please contact the x contest organizer s directly regarding their contents x xwith that official notice given we present for your enjoyment the following xinformation about contents x x x x th international obfuscated c contest x x the original obfuscated contest x x obfuscate tr v cated cating cates a to render obscure x b to darken to confuse their emotions obfuscated x their judgment llat obfuscare to darken ob intensive x lat fuscare to darken fuscus dark obfuscation n x obfuscatory adj x x goals of the contest x x to write the most obscure obfuscated c program under the rules below x to show the importance of programming style in an ironic way x to stress c compilers with unusual code x to illustrate some of the subtleties of the c language x to provide a safe forum for poor c code x x the ioccc is the grandfather of usenet programming contests since x this contest demonstrated that a program that mearly works x correctly is not sufficient the ioccc has also done much to add x the arcane word obfuscated back into the english language x see the new hacker s dictionary by eric raymond x x you are strongly encouraged to read the new contest rules before x sending any entries the rules and sometimes the contest email x address itself change over time a valid entry one year may x be rejected in a later year due to changes in the rules the typical x start date for contests is in early march contest rules are normally not x finalized and posted until the beginning of the contest the typical x closing date for contests are in early may x x the contest rules are posted to comp unix wizards comp lang c x misc misc alt sources and comp sources d if you do not have access x to these groups or if you missed the early march posting you may x request a copy from the judges via email at x x judges toad com or sun uunet utzoo pyramid hoptoad judges x x previous contest winners are available via anonymous ftp from x ftp uu net under the directory pub ioccc x x x x th international obfuscated perl contest x by landon noll larry wall x x this content is being planned someday when landon larry are not too x busy they will actually get around to posting the first set of rules x x landon says yes i know that i said we would have a contest in x but other existing projects got in the way hopefully x something will be developed after nov x x x x nd international obfuscated postscript contest x jonathan monsarrat jgm cs brown edu x alena lacova alena nikhef nl x x a contest of programming skills and knowledge exclusively for the x postscript programming language its purpose x x to spread knowledge of postscript and its details x to applaud those with the best tricks x to prove that humans can beat those damnable machine generators at x their own game by writing the most obscure and mysterious postscript x programs ever x x winners will receive the fame and attention that goes with having their x program entry posted as a winner to programmers world wide x x the contest rules and results are available by ftp as x wilma cs brown edu pub postscript obfuscated shar or individually x in the obfuscated directory the judges will post the rules x in november to comp lang postscript on usenet and other places x send questions to jgm cs brown edu x x categories include best obfuscated postscript best artwork x most compact best interactive program most useful and x anything so unusual and creative that it deserves an award x x the judges will choose the winners of each category x x alena lacova is a system administrator at nikhef institute for high x energy and nuclear physics in the netherlands she is the author of x the postscript chaos programs which draw julia sets mandelbrot sets x and other kinds of fractal functions x x jonathan monsarrat is a graduate student from mit and brown university x in the u s a he is the faq maintainer for the usenet newsgroup x comp lang postscript and the author of the postscript zone and lametex x x shar eof chmod obfuscate info echo restore of obfuscate info failed set wc c obfuscate info wc c if test wc c then echo original size current size wc c fi exit sunnyvale residents vote landon noll for sunnyvale city council seat
2,806
comp.windows.x
x on intel based unix frequently asked questions faq archive name intel unix x faq last modified mar note this is a major re organization and replacement of my frequently asked questions about x faq list this article includes answers to i what options do i have for x software on my intel based unix system free options commercial options ii what is xfree and where do i get it what is xfree what oss are supported what video hardware is supported what about accelerated boards why doesn t xfree support color vga modes what other hardware or software requirements are there where can i get source for xfree where can i get binaries for xfree iv what general things should i know about running xfree installation directories configuration files determining vga dot clocks and monitor modes rebuilding reconfiguring the server from the link kit v what os specific things should i know about running xfree svr svr bsd linux mach vi what things should i know for building xfree from source vii is there anything special about building clients with xfree bsd compatibility library ansiccoptions this article does not include answers to general x questions since these are already covered by the x faq that is regularly posted by david b lewis faq craft uunet uu net if you have anything to add or change on the faq just let me know especially if you had a problem that someone else was able to help you with send changes to steve ecf toronto edu please put faq somewhere in the subject line so that my mail filter will put it in the correct mail folder please do not ask me questions that are not answered in the faq i do not have time to respond to these individually instead post your question to the net and send me the question and answer together when you get it frequently asked questions about x on intel based unix with answers i what options do i have for x software on my intel based unix system free options the best option is xfree which is an enhanced version of x any other version of x will have slower performance and will be more difficult to compile information on how to obtain xfree is listed below x is the port of the x server to system v that was done by thomas roell roell sgcs com it supports a wide variety of svga boards there are major free versions x is based on x r x is included in mit s x r distribution ie you don t need to patch it into the mit source any more x is the current commercial offering from sgcs see below commercial options metro link w mcnab road pompano beach fl fax email sales metrolink com summary os qnx svr svr sco unixware lynxos desqview x venix isc solaris pyramid sunos hw ega vga svga tiga targa a mach s wd fujistu matrox microfield graphics r other motif openlook xview xie imaging extension xv video extension audio drivers multi media sgcs snitily graphics consulting services brookgrove lane cupertino ca fax email info sgcs com or mips zok info summary os svr svr hw a ati ultra s diamond stealth svga other motif dual headed server consensys corporation pat booker rd universal city tx phone fax email info consensys com summary os consensys v consensys version of unix system v release hw x r server support for vga svga other moolit motif x r clients the santa cruz operation inc p o box santa cruz california sco unix fax email info sco com summary os odt odt sco unix v hw x r server support for svga a s tms x wd c xga assorted local bus see sco hardware compatabilty guide for actual card vendors other motif answer software consulting p o box columbus ohio xlab email sales x coher com summary os coherent r or greater hw works with any vesa compliant video note other commercial vendors including os vendors describing bundled software are welcome to submit summary information summary information such as the above ii what is xfree and where do i get it what is xfree xfree is an enhanced version of x which was distributed with x r this release consists of many bug fixes speed improvements and other enhancements here are the highlights of the enhancements the speedup package from glenn lai is an integral part of xfree selectable at run time via the xconfig file some speedups require an et based svga and others require a virtual screen width of the speedups suitable to the configuration are selected by default with a high quality et board vram this can yield up to improvement of the xstones benchmark over x the fx packages from jim tsillas are included as the default operating mode if speedup is not selected this mode is now equivalent in performance to x b x r and approximately faster than x support for localconn compile time selectable for server clients or both this support is for both svr and svr for svr with the advanced compatibility package local connections from sco xsight odt clients are supported drivers for ati and trident tvga c and tvga svga chipsets refer to the files readme ati and readme trident for details about the ati and trident drivers support for compressed bitmap fonts has been added thomas eberhardt s code from the contrib directory on export lcs mit edu type font code from mit contrib tape has been included and is compile time selectable there are contributed type fonts in the contrib directory on export lcs mit edu new configuration method which allows the server s drivers and font renderers to be reconfigured from both source and binary distributions integrated support for bsd mach and linux a monochrome version of the server which will run on generic vga cards is now included the following key features were added with the release of xfree they were not in xfree the monochrome server has been enhanced to do bank switching of available svga memory to allow virtual screens up to x see the x manual page for more information support for the hercules mono card has been added to the monochrome server and with it the ability to support a two headed server one vga and one hercules so far this has only been tested on svr it is also reported to work under linux svr shared libraries tested under isc svr and support for svr there are some special considerations to consider due to new usl bugs see the readme svr file for more information support for ps mice and logitech mouseman trackman some versions of these devices were not previously compatible a new tutorial on how to develop correct video card and monitor timing data written by eric raymond derived from previous documentation and a lot of experimentation greatly improved support for international keyboards including implementation of the compose key functionality found on many vendor servers see the x keybd manual page for more information the accuracy with which the server detects svga pixel clocks has been improved and the timings are now stored at accuracies of mhz users may want to consider removing an existing clocks line from their xconfig file and re probing using the new server many enhancements in error handling and parsing of the xconfig configuration file error messages are much more informative and intuitive and more validation is done there are many new options that can be enabled in the xconfig file see the x manual page for more information on the format of this file plus a number of other small things refer to the changelog file in the source distribution for full details also included are a tutorial on monitor timing by eric raymond and the current x mode database and a sample xdm configuration by david wexelblat what oss are supported xfree supports svr consensys v svr microport dell esix isc at t mst consensys uhc svr isc at t linux mach bsd bsd is not supported but it should work the most active bsd person is greg lehey grog lemis de note that esix d and sco are not supported yet but anyone should feel free to submit patches if you are interested in tackling this send mail to xfree physics su oz au what video hardware is supported at this time xfree supports the following svga chipsets tseng et tseng et paradise pvga western digital wd c wd c wd c these are supersets of the pvga and use its driver genoa gvga trident tvga c tvga ati all of the above are supported in both color and monochrome modes with the exception of the ati chipsets which are only supported in color mode the monochrome server also supports generic vga cards using k of video memory in a single bank and the hercules card on the et only k of video memory is supported for the monochrome server and the gvga has not been tested with more than k it appears that some of the svga card manufacturers are going to non traditional mechanisms for selecting pixel clock frequencies to avoid having to modify the server to accommodate these schemes xfree adds support for using an external program to select the pixel clock this allows programs to be written as new mechanisms are discovered refer to the readme clkprog file for information on how these programs work if you need to write one if you do develop such a program the xfree team would be interested in including it with future xfree releases if you are purchasing new hardware for the purpose of using xfree it is suggested that you purchase an et based board such as the orchid prodesigner iis avoid recent diamond boards xfree will not work with them because diamond won t provide programming details in fact the xfree project is actively not supporting new diamond products as long as such policies remain in effect contributions of code will not be accepted because of the potential liabilities if you would like to see this change tell diamond about it some people have asked if xfree would work with local bus or eisa video cards theoretically the means of communication between the cpu and the video card is irrelevant to xfree compatibility it could be isa eisa or local bus what should matter is the chipset on the video card unfortunately the developers don t have a lot of access to eisa or vlb machines so this is largely an untested theory however we have yet to see any reports of things not working on one of these buses and we have several reports of xfree working fine on them what about accelerated boards at this time there is no support in xfree for accelerated boards like the s ati ultra a tiga etc this support is available in commercial products from sgcs and metrolink for svr and svr an s server is available for bsd and linux contact hasty netcom com for bsd or jon robots ox ac uk for linux a beta a server is available for linux contact martin cs unc edu or jon robots ox ac uk note these servers are not part of xfree why doesn t xfree support color vga modes the reason that this is not supported is the way vga implements the color modes in color modes each byte of frame buffer memory contains pixel but the color modes are implemented as bit planes each byte of frame buffer memory contains bit from each of each of pixels and there are four such planes the mit frame buffer code is not designed to deal with this if vga handled color modes by packing bit pixels into each byte the mit code could be modified to support this or it already may i m not sure but for the vga way of doing things a complete new frame buffer implementation is required some beta testers are looking into this but nothing is yet available from the project what other hardware or software requirements are there obviously a supported svga board and os are required to run x efficiently mb of memory should be considered a minimum the various binary releases take mb of disk space depending on the os e g whether or not it supports shared libraries to build from sources at least mb of free disk space will be required although mb should be considered a comfortable lower bound where can i get source for xfree source patches for the current version based on x r pl from mit are available via anonymous ftp from export lcs mit edu under contrib xfree ftp physics su oz au under xfree ftp win tue nl under pub xfree for the rest of this faq these location will be called ftp refer to the readme file under the specified directory for information on which files you need to get to build your distribution where can i get binaries for xfree binaries are available via anonymous ftp from ftp physics su oz au svr binaries under xfree svr ftp win tue nl svr binaries under pub xfree svr ferkel ucsb edu svr binaries under pub svr xfree stasi bradley edu svr binaries under pub xfree svr blancmange ma utexas edu svr isc binaries under pub isc ftp prz tu berlin de svr isc binaries under pub pc isc xfree tsx mit edu linux binaries under pub linux packages x agate berkeley edu bsd binaries under pub bsd ports xfree ftp cs uwm edu mach binaries under i ensure that you are getting xfree some of these sites may archive older releases as well each binary distribution will contain a readme file that describes what files you need to take from the archive and which compile time option selections were made when building the distribution iv what general things should i know about running xfree installation directories the top level installation directory is specified by the projectroot usr x by default variable in config site def binaries include files and libraries are installed in projectroot bin include lib this can be changed when rebuilding from sources and can be modified via symbolic links for those oss that support them this directory is nonstandard and was chosen this way to allow xfree to be installed alongside a commercial vendor supplied x implementation configuration files the xfree server reads a configuration file xconfig on startup the search path contents and syntax for this file are documented in the server manpage which should be consulted before asking questions determining vga dot clocks and monitor modes david e wexelblat dwex mtgzfs att com maintains a database of known clock settings for vga cards and monitor settings the database is installed in usr x lib x etc modedb txt and is in the source tree under mit server ddx x etc this database is also available from him for the latest copy and is kept on export lcs mit edu in contrib x modedb z which is updated occasionally obtain a copy of this database it just might have the settings you need if you create new settings please send them to david for inclusion in the database if this doesn t help you the videomodes doc by eric raymond file with xfree contains tutorials on how to come up with these timings it may be helpful to start with settings that almost work and use this description to get them right when you do send the information to david wexelblat for inclusion in the database note the old clock exe program is not supported any more and is completely unnecessary if you need to determine dot clock values for a new board remove the clocks line from your xconfig file if present and start the server the server will probe for clocks itself and print them out you can use these values to put a clocks line into your xconfig file which is not necessary but will speed up starting the server in the future rebuilding reconfiguring the server from the link kit if you have installed the server binary link kit it is possible to reconfigure the drivers and font renderers in the server this is fully explained in the readme file that is available with the link kit v what os specific things should i know about running xfree first of all the server must be installed suid root mode svr why won t my xterm run properly if your kernel is not built with the consem module you should define consem no in you environment otherwise xterm won t run csh users should use setenv consem no the esix console driver patch is known to cause keymapping problems with xfree it recommended that this patch not be installed alternatively they keymap can be fixed with xmodmap svr make sure you look at ftp readme isc if that s what you are running bsd make sure you look at ftp readme bsd also a separate bsd faq is maintained by richard murphey rich rice edu the latest version should be available in the file xfree bsd faq at the following ftp sites agate berkeley edu pub bsd ports xfree wuarchive wustl edu mirrors bsd ports xfree grasp univ lyon fr pub bsd ports xfree linux you must be running linux pl or greater and have the gcc jump libraries installed make sure the binaries x x mono xload and xterm are setuid root if your kernel doesn t have tcp support compiled in you ll have to run the server as x pn the default startup configuration assumes that tcp is not available if it is change the two files usr x bin startx and usr x lib x xdm xservers removing the pn argument to x make sure dev console is either a link to dev tty or has the major number minor number also note that if dev console is not owned by the user running x then xconsole and xterm will not permit console output redirection xdm will properly change the owner but startx won t when running xdm from rc local you will need to provide it with a tty for example xdm dev console for more detailed information please read the file readme present with the distribution on tsx mit edu mach make sure you look at ftp readme mach vi what things should i know for building xfree from source this section has been removed from the faq since it is fully explained in ftp readme and the os specific readmes please look at those files for information on building xfree vii is there anything special about building clients with xfree bsd compatibility library a lot of clients make use of bsd functions like bcopy etc the default configuration files are set up to link with libxbsd a which contains emulation for bcopy bzero bcmp ffs random seed a better way of providing the b functions is to include x xfuncs h in source files that call them xfuncs h provides macro definitions for these in terms of the sysv mem functions if you are linking with a vendor supplied library which calls some of these functions then you should link with libxbsd a ansiccoptions this is something that was added to allow a developer to get rid of the ansi ness defined in the default ccoptions without having to rewrite the entire ccoptions line for example with stock mit you d see something like ccoptions ansi o fwritable strings and to get rid of the ansi ness the developer would have to put ccoptions o fwritable strings in his imakefile with this change you would see a default of ansiccoptions ansi ccoptions o fwritable strings and all the developer would have to put in the imakefile is ansiccoptions to get rid of the ansi ness many x clients will die a horrible death with ansi the effect is even more dramatic in practice because ccoptions is actually quite complex the other issue is that one must add ansiccoptions ansiccoptions to a passcdebugflags definition xfree contact information ongoing development planning and support is coordinated by the xfree core team at this time the core team consists of the original gang of four david dawes dawes physics su oz au glenn lai glenn cs utexas edu jim tsillas jtsilla damon ccs northeastern edu david wexelblat dwex mtgzfs att com those supporting non sysv operating systems robert baron robert baron ernst mach cs cmu edu mach rich murphey rich rice edu bsd orest zborowski obz kodak com linux e mail sent to xfree physics su oz au will reach all of the core team thanks to all the people who already sent me corrections or additions especially david wexelblat one of the major contributors of updates steve kotsopoulos p eng mail steve ecf toronto edu systems analyst bitnet steve ecf utoronto bitnet engineering computing facility uucp uunet utai ecf steve university of toronto phone
2,807
comp.windows.x
comp windows x intrinsics frequently asked questions faq archive name xt faq version id faq xt v ware exp the x toolkit intrinsics f a q a monthly posting this article contains the answers to some frequently asked questions faq from comp windows x about the x toolkit intrinsics to submit questions preferably with an answer send email to ware cis ohio state edu many faqs including this one are available on the archive site rtfm mit edu in the directory pub usenet news answers the name under which a faq is archived appears in the archive name line at the top of the article this faq is archived as xt faq all code fragments are public domain contents xt glossary software versions related faq s why does my application core dump when i use signals alarms cthreads how do i use a different visual than the default which visual should an application use why do only shell widgets have a visual which visual depth and colormap do shells inherit i ve done all the above and i still get a badmatch error why why doesn t my widget get destroyed when i call xtdestroywidget how do i exit but still execute the destroycallbacks how do i resize a shell widget why can t xtappaddinput handle files what good books and magazines are there on xt what widgets are available what alternatives to the intrinsics are there how do i pass a float value to xtsetvalues how do i write a resource converter how do i open multiple displays what changed from r to r to r where are the resources loaded from what order are callbacks executed in how do i know if a widget is visible how do i reparent a widget in xt i e xtreparentwidget why use xtmalloc xtfree etc how to debug an xt application why don t xtaddinput xtaddtimeout and xtaddworkproc work what is and how can i implement drag and drop xt glossary o the xt intrinsics implement an object oriented interface to c code to allow useful graphical components to be created included with this are classes that provide the base functionality object rectobj core composite constraint shell overrideshell wmshell etc the terms xt and intrinsics are used interchangeably however they are used very precisely to mean a specific library of the x window system in particular it does not include the athena motif olit or any other widget set without further widgets the intrinsics are not especially useful o a widget refers to a user interface abstraction created via xt the precise use is any object that is a subclass of the core class it is used loosely to refer to anything that is a subclass of the object class although these are more accurately called windowless widgets or gadgets o xlib is the c interface to the x protocol it is one layer below the xt intrinsics typically a widget uses relatively few xlib functions because xt provides most such services although an understanding of xlib helps with problems software versions the following are the latest versions of xt based software software version released next expected x r patch none x r patch athena widgets see x r motif olit xtra xw x r none xcu x r none fwf related faq s david b lewis uunet craft faq maintains the faq on x it is posted monthly on comp windows x and located on export in contrib faq liam r e quin lee sq sq com posts an faq list on open look to comp windows x jan newmarch jan pandonia canberra edu au posts an faq list on motif to comp windows x motif peter ware ware cis ohio state edu posts an faq list for comp windows x intrinsics it is on export in contrib faq xt why does my application core dump when i use signals alarms cthreads in brief xlib xt and most widget sets have no mutual exclusion for critical sections any interrupt handler is likely to leave one of the above libraries in an inconsistent state such as all the appropriate flags not yet set dangling pointers in the middle of a list traversal etc note that the ansi c standard points out that behavior of a signal handler is undefined if the signal handler calls any function other than signal itself so this is not a problem specific to xlib and xt the posix specification mentions other functions which may be called safely but it may not be assumed that these functions are called by xlib or xt functions the only safe way to deal with signals is to set a flag in the interrupt handler this flag later needs to be checked either by a work procedure or a timeout callback it is incorrect to add either of these in the interrupt handler as another note it is dangerous to add a work procedure that never finishes this effectively preempts any work procedures previously added and so they will never be called another option is to open a pipe tell the event loop about the read end using xtappaddinput and then the signal handler can write a byte to the write end of the pipe for each signal however this could deadlock your process if the pipe fills up why don t the intrinsics deal with this problem primarily because it is supposed to be a portable layer to any hardware and operating system is that a good enough reason i don t think so note the article in the x journal and the example in o reilly volume are in error how do i use a different visual than the default this requires a more complicated answer than it should a window has three things that are visual specific the visual colormap and border pixmap all widgets have their own colormap and borderpixmap resource only shell widgets have visual resources another questions deals with why shells have a visual the default value of these resources is copyfromparent which does exactly what it says in the shell widget copyfromparent gets evalulated as defaultvisualofscreen and defaultcolormapofscreen when any one of the three resources is not properly set a badmatch error occurs when the window is created they are not properly set because each of the values depends on the visual being used how to get this to work there are two parts to the answer the first is if you want an application to start with a particular visual and the second is if you want a particular shell within an application to start with a different visual the second is actually easier because the basic information you need is available the first is a little harder because you ll need to initialize much of the toolkit yourself in order to determine the needed information some sample code to start up an application using something other than the default visual to compile cc g visual c o visual lxaw lxmu lxt lxext lx lm to run visual geometry x depth visual staticcolor fg blue bg yellow you need to move the mouse to get the particular visuals colormap to install include x intrinsic h include x stringdefs h include x shell h typedef struct visual visual int depth optionsrec optionsrec options xtresource resources visual visual xtrvisual sizeof visual xtoffsetof optionsrec visual xtrimmediate null depth depth xtrint sizeof int xtoffsetof optionsrec depth xtrimmediate null xrmoptiondescrec desc visual visual xrmoptionseparg null depth depth xrmoptionseparg null int main argc argv int argc char argv xtappcontext app the application context widget top toplevel widget display dpy display char xargv saved argument vector int xargc saved argument count colormap colormap created colormap xvisualinfo vinfo template for find visual xvisualinfo vinfo list returned list of visuals int count number of matchs only arg args cardinal cnt char name test char class test save the command line arguments xargc argc xargv char xtmalloc argc sizeof char bcopy char argv char xargv argc sizeof char the following creates a dummy toplevel widget so we can retrieve the appropriate visual resource cnt top xtappinitialize app class desc xtnumber desc argc argv string null args cnt dpy xtdisplay top cnt xtgetapplicationresources top options resources xtnumber resources args cnt cnt if options visual options visual defaultvisualofscreen xtscreen top xtsetarg args cnt xtnvisual options visual cnt now we create an appropriate colormap we could use a default colormap based on the class of the visual we could examine some property on the rootwindow to find the right colormap we could do all sorts of things colormap xcreatecolormap dpy rootwindowofscreen xtscreen top options visual allocnone xtsetarg args cnt xtncolormap colormap cnt now find some information about the visual vinfo visualid xvisualidfromvisual options visual vinfo list xgetvisualinfo dpy visualidmask vinfo count if vinfo list count xtsetarg args cnt xtndepth vinfo list depth cnt xfree xpointer vinfo list xtdestroywidget top now create the real toplevel widget xtsetarg args cnt xtnargv xargv cnt xtsetarg args cnt xtnargc xargc cnt top xtappcreateshell char null class applicationshellwidgetclass dpy args cnt display the application and loop handling all events xtrealizewidget top xtappmainloop app return which visual should an application use this is a point that can be argued about but one opinion is there is no way for an application to know the appropriate visual it has to be specified by the user if you disagree with this then your application probably falls into the category of always using the default visual or it is hardware specific and expects some particular visual such as bit truecolor with an overlayplane extension or some such why no application runs in isolation depending on the way a server allocates resources i may not always want your application to run in truecolor mode if it is going to mess up my other applications i may be very upset if it chooses to run in greyscale instead of psuedocolor or just monochrome as an example on a low end color sun server there are many different possible visuals monochrome entry colormap static gray static color and a truecolor the sgi iris s offer all the above plus bit truecolor bit truecolor an overlay plane why do only shell widgets have a visual this is strictly by convention it makes it possible for an arbitrary widget to know that the visual it uses can be found by looking for the shell widget that is its ancestor and obtaining the visual of that shell a widget can have its own visual resource if it does it must have its own realize method to use the visual when it calls xcreatewindow you should also make this a resource that can be obtained with xtgetvalues so other widgets can find it a reasonable value is probably xtnvisual which visual depth and colormap do shells inherit the default value for these resources are set to copyfromparent this is interpreted as the defaultcolormapofscreen defaultdepthofscreen and the default visual of the screen if the widget has no parent i e it is an applicationshellwidgetclass and the root of your widget tree if the parent of the widget is not null then the shell copies colormap and depth from its parent and uses copyfromparent as the visual i ve done all the above and i still get a badmatch error why some resource converters improperly cache references this was especially true of x r and earlier versions of motif why doesn t my widget get destroyed when i call xtdestroywidget see section of the xt specification it eventually does get destroyed just not immediately the intrinsics destroy a widget in a two phase process first it and all of its children have a flag set that indicate it is being destroyed it is then put on a list of widgets to be destroyed this way any pending x events or further references to that widget can be cleaned up before the memory is actually freed the second phase is then performed after all callbacks event handlers and actions have completed before checking for the next x event at this point the list is traversed and each widget s memory is actually free d among other things as some further caveats trivia the widgets may be destroyed if the intrinsics determine that they have no further references to the widgets on the list if so then the phase destruction occurs immediately also if nested event loops are used widgets placed on the destroy list before entering the inner event loop are not destroyed until returning to the outer event loop how do i exit but still execute the destroycallbacks the problem is if a simple and entirely reasonable approach to exiting an application is used such as calling exit directly then a widget may not have a chance to clean up any external state such as open sockets temporary files allocated x resources etc this code for simplicity reasons assumes only a single toplevel widget widget toplevelget gw widget gw widget to find toplevel widget top for top gw xtparent top top xtparent top empty return top void exitcallback gw closure call data widget gw widget xtpointer closure data the app specified xtpointer call data widget specific data widget toplevel toplevel toplevelget gw xtunmapwidget toplevel make it disappear quickly xtdestroywidget toplevel exit one can see that the above code exit s immediately after destroying the toplevel widget the trouble is the phase destruction may never occur this works for most widgets and most applications but will not work for those widgets that have any external state you might think that since it works now it will always work but remember that part of the reason an object oriented approach is used is so one can be ignorant of the implementation details for each widget which means that the widget may change and someday require that some external state is cleaned up by the destroy callbacks one alternative is to modify exitcallback to set a global flag and then test for that flag in a private event loop however private event loops are frowned upon because it tends to encourage sloppy and difficult to maintain practices try the following code instead include x intrinsic h extern widget toplevelget if needfunctionprototypes widget gw endif extern boolean exitworkproc if needfunctionprototypes xtpointer closure endif extern void exitcallback if needfunctionprototypes widget gw xtpointer closure xtpointer call data endif widget toplevelget gw widget gw widget to find toplevel widget top for top gw xtparent top top xtparent top empty return top void exitcallback gw closure call data widget gw widget xtpointer closure data the app specified xtpointer call data widget specific data widget toplevel toplevel toplevelget gw xtunmapwidget toplevel make it disappear quickly xtdestroywidget toplevel xtappaddworkproc xtwidgettoapplicationcontext gw exitworkproc xtpointer null boolean exitworkproc closure xtpointer closure exit notreached exitcallback adds a work procedure that will get called when the application is next idle which happens after all the events are processed and the destroy callbacks are executed how do i resize a shell widget after it is realized one doesn t resize a shell widget the proper thing is to resize the currently managed child of the shell widget using xtsetvalues the geometry change is then propagated to the shell which asks the window manager which may or may not allow the request however the shell must have the resource xtnallowshellresize set to true otherwise it will not even ask the window manager to grant the request and the shell will not resize to change the position of a shell use xtsetvalues on the shell not the child and within the limits of the window manager it should be granted why can t xtappaddinput handle files it does however unix semantics for when i o is ready for a file does not fit most peoples intuitive model in unix terms a file descriptor is ready for reading whenever the read call would not block ignoring the setting of optional flags that indicate not to block this works as expected for terminals sockets and pipes for a file the read will always return but the return indicates an eof i e no more data the result is the code in the intrinsics always calls the input handler because it always thinks something is about to be read the culprit is the select system call or on sysv based os s it is the poll system call how to get around this on a unix system the best approach is to use another process to check for available input on the file use a pipe to connect the application with this other process and pass the file descriptor from the pipe to xtappaddinput a suitable program on bsd systems is tail f filename it s rumored that select on some systems is not completely reliable in particular ibm aix this is one where it would work for a while several thousand times and then stop until some other event woke it up this seemed to be the result of a race condition in the kernel ibm claims to have a fix for this pyramid doesn t work at all ultrix and possibly others where pipes are implemented as sockets wasn t completely broken but although the writing side wrote in byte blocks the reading side received it all broken up as if it was being put into the pipe a byte at a time you can waste a lot of time by reading small blocks get raound it by detecting the situation and having select ignore the pipe for mseconds by then it had been given the whole block note that all the above descriptions used unix terminology such as read file descriptor pipes etc this is an os dependent area and may not be identical on all systems however the intrinsic designers felt it was a common enough operation that it should be included with part of the toolkit why they didn t also deal with signals at this point i don t know what good books and magazines are there on xt i have a favorite that is the definitive reference to my perspective it offers a reasonable introduction but also goes into the full details of the intrinsics when i started using it i was already familiar with xt and the concepts behind it so newcomers may or may not find it useful i ve always found it accurate and complete which means its a pages asente paul j and swick ralph r x window system toolkit the complete programmer s guide and specification digital press isbn order number ey e e dp and by prentice hall isbn also available through dec direct at digital the other book i commonly recomend to novices is young doug the x window system applications and programming with xt motif version prentice hall isbn isbn and of course o reilly has an entire series of manuals on x and xt o reilly ordering is in particular volume is an xt reference done in manual page style the rd edition is extensively overhauled and goes far beyond the mit manual pages i m finding it very useful in particular the permutted index and references to other manual pages help a great deal in chasing down related information i read two periodicals the x resource and the the x journal these are the only two dealing specifically with x the x resource is published quarterly by o reilly with one of the issues being the mit x consortium technical conference proceedings there is no advertising i ve found it informative with pretty good depth for orders call or email cathyr ora com for editorial matters email adrian ora com table of contents are posted at math utah edu in ftp pub tex bib in tex form and on ftp uu net in ftp published oreilly xresource in ascii form the x journal is a bimonthly trade rag with lots of advertising the articles are informative and oriented toward a less technical audience i read it more to see what s going on then with an expectation of learning a great deal but remember i represent a fairly small percentage of people also they have a pretty good collection of people on the advisory board and as columnists call what widgets are available there are three popular widget sets athena the set provided with x this is sufficient for most purposes but is on the ugly side recently a d look is available for ftp on export lcs mit edu contrib xaw d tar z motif from osf available for a license fee and commonly shipped on many workstation vendors platforms almost everyone but sun it looks good and works well but personally i think it is poorly implemented olit the open look intrinsics toolkit is a set of widgets implementing sun s open look specification developed by at t i ve never used it so can t comment on its quality i ve heard rumours that it is a pain to actually get in addition the following collection of widgets are also available xtra a library of widgets for sale from graphical software technology it includes bar graph stacked bar graph line graph pie chart xy plot hypertext help spreadsheet and data entry form widgets i ve never seen them so i can t comment fwf the free widget foundation is attempting to collect a set of freely available widgets included are a pixmap editor filedialog and a few others the current set of widgets can be obtained via anonymous ftp from the machine a cs uiuc edu in the file pub fwf shar z xcu the cornell university widgets from gene dykes one of the early widget sets released provides a nice appearance for buttons and has a mini command language probably not so widely used xs the sony widget set this was around during r days but seemed to disappear it looked like it had promise xw the hp widgets the precursor to motif originally written for r there exists diffs to get it to work under r r again a pretty good widget set but has more or less died the precursor to this was the xray toolkit which was originally implemented for x r and apparently provided much experience for the designers of xt xo a widget set i m working on it s still primitive but you can give it a try in archive cis ohio state edu pub xo the following specialized widgets are also available tbl implements a tabular layout of widgets supports motif widgets as children part of wcl plots the athena plotting widgets not the athena widgets contact gnb bby oz au or joe athena mit edu what alternatives to the intrinsics are there name language vendor xview c sun oi c parcplace interviews c stanford tcl tk c sprite berkeley edu however much i like c and admire the skill in both designing and implementing the intrinsics hopefully some alternative will develop in the next years that uses an object oriented language keep your eyes open and expect some change about the same time a language other than c starts gaining acceptance how do i pass a float value to xtsetvalues first what is going wrong is the structure for an arg is essentially typdef struct string name long value arg and the code arg arg xtsetarg arg name expands to arg arg arg name name arg value you can see that with normal c type conversions the arg value gets the integer instead of the floating point value when the value is copied into the widget resource the bit pattern is wildly different than that required for a floating point value so how to get around this the following macro is from the athena widgets document and i am now recomending it over the previous suggestions define xtsetfloatarg arg n d if sizeof float sizeof xtargval xtsetarg arg n d else xtargval ld xtargval d xtsetarg arg n ld how do i write a resource converter courtesy of rich thomson rthomson dsd es com the following discussion of resource converters assumes r or r intrinsics resource converters changed between r and r to allow for destructors and caching of converted values there are several main types of resource converters string to data type data type to string data type to data type i string to data type usually a string to data type converter has a fixed set of strings that will be converted to data type values this is most often used to map enumerated names to enumerated values name value true false in this case the string to data type converter needs to compare the resource value to the list of fixed strings this is most readily accomplished by the use of the quark mechanism of the resource manager the resource value is turned into a quark which is a unique representation of the string that fits into a single word then the resource quark is compared against the quarks for the fixed strings representing the enumerated values if there are many enumerated strings in the converter or many converters each with a small number of enumeration strings then a global initialization routine might be used to turn all the resource strings into quarks that way the first time one of these converters is used the strings will be turned into quarks and held in static variables for use in the next invocation of one of the converters ii data type to string this type of converter is slightly easier than the string to data type converters since the use of quarks isn t necessary instead the data type value is simply converted to a string value probably by the use of sprintf data type to string converters are useful for applications that wish to convert an internal data type value into a string so that they can write out a valid resource specification to a file this mechanism can be used to provide a snapshot of application state into a file this snapshot can be used to restore the program to a known state via the usual x resource database mechanisms if you are taking the trouble to write a string to data type converter it isn t much extra effort to write the data type to string converter writing both at the same time helps to ensure that they are consistent iii data type to data type this type of converter is used to convert an existing data type value to another data type for instance an x pixel value can be converted to an rgb data type that contains separate fields for red green and blue the type signature for a resource converter is as follows typedef boolean xttypeconverter display xrmvalueptr cardinal xrmvalueptr xrmvalueptr xtpointer display dpy xrmvalueptr args cardinal num args xrmvalueptr fromval xrmvalueptr toval xtpointer converter data when the converter is invoked the fromval argument points to the source x resource manager value and the toval argument points to the destination x resource manager value the converter data argument is an opaque pointer to some converter specific data that is specified when the converter is registered the args and num args arguments allow extra information to be passed to the converter when it is invoked for instance the pixel to rgb structure converter discussed above would need colormap and visual arguments in which to lookup the pixel to obtain the rgb values corresponding to that pixel care must be taken with the toval argument an xrmvalue has the following type definition and specifies a size and location for a converted value typedef struct unsigned int size caddr t addr xrmvalue xrmvalueptr when the converter is invoked the address may point to a location of the given size for the converted value or the location can be null in the former case the converter should ensure that the size of the destination area is large enough to handle the converted value if the destination area is not large enough then the converter should set the size to the amount of space needed and return false the caller can then ensure that enough space is allocated and reinvoke the converter if the size is large enough then the converter can simply copy the converted value into the space given and return true if the location is null then the converter can assign the location to the address of a static variable containing the converted value and return true when writing a group of converters this code is often repeated and it becomes convenient to define a macro define done var type if toval addr if toval size sizeof type toval size sizeof type return false else type toval addr var else toval addr caddr t var toval size sizeof type return true define donestr str if toval addr toval size sizeof string toval size sizeof string return false else toval addr caddr t str toval size sizeof string return true inside the converter it is a good idea to perform a little safety checking on the num args and args arguments to ensure that your converter is being called properly once you have written your converter you need to register it with the intrinsics the intrinsics invokes resource converters when creating widgets and fetching their resource values from the resource database to register a converter with a single application context use xtappsettypeconverter void xtappsettypeconverter context from to converter args num args cache destructor xtappcontext context string from string to xttypeconverter converter xtconvertarglist args cardinal num args xtcachetype cache xtdestructor destructor to register a converter with all application contexts use xtsettypeconverter void xtsettypeconverter from to converter args num args cache destructor string from string to xttypeconverter converter xtconvertarglist args cardinal num args xtcachetype cache xtdestructor destructor in the r intrinsics there were the routines xtappaddconverter and xtaddconverter these have been superseded by xtappsettypeconverter and xtsettypeconverter whenever possible the newer routines should be used when a converter is registered with the intrinsics a cache argument specifies how converted resource values are to be cached xtcachenone don t cache any converted values xtcacheall cache all converted values xtcachebydisplay cache converted values on a per display basis caching converted values that require a round trip to the server is a good idea for instance string to pixel conversions the destructor argument is a routine that is invoked then the resource is destroyed either because its cached reference count has been decremented to zero or because the widget owning the value is being destroyed xtdestructor has the following type definition typedef void xtdestructor xtappcontext xrmvalueptr xtpointer xrmvalueptr cardinal xtappcontext context xrmvalueptr to xtpointer converter data xrmvalueptr args cardinal num args the destructor is invoked to free any auxiliary storage associated with the to argument but does not actually free the storage pointed to by the to argument itself to addr the destructor is passed the extra arguments that were passed to the converter when the conversion was performed for instance colormap and visual arguments for the string to pixel converter since the destructor would need to free the allocated pixel from the colormap as well as the private data passed in when the converter was registered sample converter code can be found in the following files in the mit r distribution mit lib xt converters c contrib lib pext converters c contrib lib pext converters h how do i open multiple displays see multi user application software using xt the x resource issue summer by oliver jones for a complete coverage of the issues involved most of this answer is based on that article in a nutshell one uses xtopendisplay to add each display to a single application context and then xtclosedisplay to shutdown each display and remove it from the application context the real problems occur when trying to close down a display this can happen ways user selects a quit button on one of the displays user has window manager send a wm delete window message server disconnect possibly from a killclient message server shutdown crash or network failure i ll assume you can deal gracefully with since it is merely a problem of translating a widget to a display and removing that display if not then read the oliver jones article the third one is difficult to handle the following is based on the oliver jones article and i include it here because it is a difficult problem the difficulty arises because the xlib design presumed that an i o error is always unrecoverable and so fatal this is essentially true for a single display x based application but not true for a multiple display program or an application that does things other than display information on an x server when an x i o error occurs the i o error handler is called and if it returns then an exit happens the only way around this is to use setjmp longjmp to avoid returning to the i o error handler the following code fragment demonstrates this include setjmp h jmp buf xiorecover void xiohandler dpy display dpy destroydisplay dpy longjmp xiorecover main if setjmp xiorecover xsetioerrorhandler xiohandler xtappmainloop app context the destroydisplay is something that given a display pointer can go back to the application specific data and perform any necessary cleanup it should also call xtclosedisplay for those of you unfamiliar with setjmp longjmp when setjmp is first called it returns a and save s enough information in the jmp buf that a latter execution of longjmp can return the program to the same state as if the setjmp was just executed the return value of this second setjmp is the value of the second argument to longjmp there are several caveats about using these but for this purpose it is adequate some other problems you might run into are resource converters that improperly cache resources the most likely symptoms are xlib errors such as badcolor badatom or badfont there may be problems with the total number of displays you can open since typically only a limited number of file descriptors are available with being a typical value you may also run into authorization problems when trying to connect to a display there was much discussion in comp windows x about this topic in november of robert scheifler posted an article which basically said this is the way it will be and xlib will not change what changed from r to r to r this addresses only changes in the intrinsics first the general changes for each release are described then a certainly incomplete list of new functions added and others that are now deprecated are listed brevity is a primary goal much of the following information is retrieved from chapter of the mit xt intrinsics manual and from o reilly volume rd edition from r to r addition of gadgets windowless widgets new resource type converter interface to handle cacheing and additional data variable argument list interface define xtspecificationrelease added with this release wmshellpart toplevelshellpart transientshellpart changed incompatibly core initialize core set values added arglist and count parameters event handlers had continue to dispatch parameter added core set values almost specification changed core compress exposure changed to an enumerated data type from boolean core class inited changed to enumerated data type from boolean constraint get values hook added to extension record core initialize hook obsolete as info is passed to core initialize shell root geometry manager added to extension record core set values hook obsolete as info is passed to core set values calling xtquerygeometry must store complete geometry added unrealizecallback xttranslatecoords actually works under r from r to r psuedo resource basetranslation added searching for app default and other files made more flexible customization resource added per screen resource database support permanently allocated strings permanetly allocated strings required for several class fields the args argument to xtappinitialize xtvaappinitialize xtopendisplay xtdisplayinitialize and xtinitialize were changed from cardinal to int many performance improvements this is summarized from the article xt performance improvements in release by gabe beged dov in the x resource issue xrmstringtoquark augmented with xrmpermstringtoquark to avoid string copies several fields in the class record are indicated as needing permanent strings using an array of strings for resources callback lists redesigned to use less memory translation manager redesigned and rewritten so it takes less memory translation tables merges are faster cache of action bindings keycode to keysyms are cached better sharing of gc s with modifiable fields window to widget translation uses less space and faster does not malloc space for widget name since quark is available widget space is allocated to include the constraints over several example programs about a reduction in memory usage functions new with r xtallocategc sharable gc with modifiable fields xtgetactionlist get the action table of a class xtscreendatabase return resource database for a screen xtsetlanguageproc register language procedure called to set locale functions new with r xtappaddactionhook procedure to call before every action xtappinitialize lots of initialization work xtappreleasecacherefs decrement cache reference count for converter xtappsetfallbackresources specify default resources xtappsettypeconverter register a new style converter xtcallcallbacklist directly execute a callback list xtcallconverter invoke a new style converter xtcallbackreleasecacheref release a cached resource value xtcallbackreleasecachereflist release a list of cached resource values xtconvertandstore find and call a resource converter xtdirectconvert invoke old style converter xtdisplayofobject return the display xtdisplaystringconversionwarning issue a warning about conversion xtfindfile find a file xtgetactionkeysym retrieve keysym modifies for this action xtgetapplicationnameandclass return name and class xtgetconstraintresourcelist get constraints for a widget xtgetkeysymtable return keycode to keysym mapping table xtgetmulticlicktime read the multi click time xtgetselectionrequest retrieve the selectionrequest event xtgetselectionvalueincremental obtain the selection value incrementally xtgetselectionvaluesincremental obtain the selection value incrementally xtinitializewidgetclass initialize a widget class manually xtinserteventhanlder register event handler before after others xtinsertraweventhandler register event handler without modify input mask xtisobject test if subclass of object xtisrectobj test if subclass of rectobj xtkeysymtokeycodelist return list of keycodes xtlasttimestampprocessed retrieve most recent event time xtmenupopdown action for popping down a widget xtmenupopup action for popping up a widget xtoffsetof macro for structure offsets xtownselectionincremental make selection data availabe incrementally xtpoupspringloaded map a spring loaded popup xtregistergrabaction indicate action procedure needs a passive grab xtremoveactiohhook remove function called after every action xtresolvepathname find a file xtscreenofobject return screen of object xtsetmulticlicktime set the multi click time xtsetwmcolormapwindows set wm colormap windows for custom colormaps xtungrabbutton cancel a passive button grab xtungrabkey cancel a passive key grab xtungrabkeybard release an active keyboard grab xtungrabpointer release an active pointer grab xtva varags interfaces to a bunch of functions xtwindowofobject return window of nearest widget ancestor deprecated replacement when xtaddactions xtappaddactions r xtaddconverter xtappaddconverter r xtaddinput xtappaddinput r xtaddtimeout xtappaddtimeout r xtaddworkproc xtappaddworkproc r xtconvert xtconvertandstore r xtcreateapplicationshell xtappcreateshell r xtdestroygc xtreleasegc r xterror xtapperror r xtgeterrordatabase xtappgeterrordatabase r xtgeterrordatabasetext xtappgeterrordatabasetext r xtgetselectiontimeout xtappgetselectiontimeout r xtinitialize xtappinitialize r xtmainloop xtappmainloop r menupopdown action xtmenupopdown action r menupopup action xtmenupopup action r xtnextevent xtappnextevent r xtpeekevent xtapppeekevent r xtpending xtapppending r xtseterrorhandler xtappseterrorhandler r xtseterrormsghandler xtappseterrormsghandler r xtsetselectiontimeout xtappsetselectiontimeout r xtsetwarninghandler xtappsetwarninghandler r xtsetwarningmsghandler xtappsetwarningmsghandler r xtwarning xtappwarning r xtwarningmsg xtappwarningmsg r where are the resources loaded from the resources of a widget are filled in from the following places from highest priority to lowest priority args passed at creation time command line arguments user s per host defaults file user s defaults file user s per application default file system wide per application default file note that are read only once on application startup the result of steps is a single resource database used for further queries the per host defaults file contains customizations for all applications executing on a specific computer this file is either specified with the xenvironment environment variable or if that is not set then the file home xdefaults host is used the user defaults file is either obtained from the resource manager property on the root window of the display or if that is not set then the file home xdefaults is used typically the program xrdb is used to set the resource manager property please note that this should be kept relatively small as each client that connects to the display must transfer the property a size of around kbyte is reasonable some toolkits may track changes to the resource manager but most do not a user may have many per application default files containing customizations specific to each application the intrinsics are quite flexible on how this file is found read the next part that describes the various environment variables and how they effect where this file is found the system wide per application default files are typically found in usr lib x app defaults if such a file is not found then the fallback resources are used the intrinsics are quite flexible on how this file is found read the next part that describes the various environment variables and how they effect where this file is found thanks to oliver jones oj pictel com for the following you can use several environment variables to control how resources are loaded for your xt based programs xfilesearchpath xuserfilesearchpath and xapplresdir these environment variables control where xt looks for application defaults files as an application is initializing xt loads at most one app defaults file from the path defined in xfilesearchpath and another from the path defined in xuserfilesearchpath set xfilesearchpath if software is installed on your system in such a way that app defaults files appear in several different directory hierarchies suppose for example that you are running sun s open windows and you also have some r x applications installed in usr lib x app defaults you could set a value like this for xfilesearchpath and it would cause xt to look up app defaults files in both usr lib x and usr openwin lib or wherever your openwinhome is located setenv xfilesearchpath usr lib x t n openwinhome lib t n the value of this environment variable is a colon separated list of pathnames the pathnames contain replacement characters as follows see xtresolvepathname n the value of the filename parameter or the application s class name t the value of the file type in this case the literal string app defaults c customization resource r only s suffix none for app defaults l language locale and codeset e g ja jp euc l language part of l e g ja t the territory part of the display s language string c the codeset part of the display s language string let s take apart the example suppose the application s class name is myterm also suppose open windows is installed in usr openwin notice the example omits locale specific lookup usr lib x t n means usr lib x app defaults myterm openwinhome lib t n means usr openwin lib app defaults myterm as the application initializes xt tries to open both of the above app defaults files in the order shown as soon as it finds one it reads it and uses it and stops looking for others the effect of this path is to search first in usr lib x then in usr openwin let s consider another example this time let s set xuserfilesearchpath so it looks for the file myterm ad in the current working directory then for myterm in the directory app defaults setenv xuserfilesearchpath n ad home app defaults n the first path in the list expands to myterm ad the second expands to home app defaults myterm this is a convenient setting for debugging because it follows the imake convention of naming the app defaults file myterm ad in the application s source directory so you can run the application from the directory in which you are working and still have the resources loaded properly note when looking for app default files with xuserfilesearchpath for some bizarre reason neither the type nor file suffix is defined so t and s are useless with r there s another twist you may specify a customization resource value for example you might run the myterm application like this myterm xrm customization color if one of your pathname specifications had the value usr lib x app defaults n c then the expanded pathname would be usr lib x app defaults myterm color because the c substitution character takes on the value of the customization resource the default xfilesearchpath compiled into xt is usr lib x l t n c r usr lib x l t n c r usr lib x t n c r usr lib x l t n usr lib x l t n usr lib x t n note some sites replace usr lib x with a projectroot in this batch of default settings the default xuserfilesearchpath also compiled into xt is root l n c r root l n c r root n c r root l n root l n root n root is either the value of xapplresdir or the user s home directory if xapplresdir is not set if you set xuserfilesearchpath to some value other than the default xt ignores xapplresdir altogether notice that the quick and dirty way of making your application find your app defaults file in your current working directory is to set xapplresdir to a single dot in r all this machinery worked differently for r compatibilty many people set their xapplresdir value to a dot followed by a slash what order are callbacks executed in courtesy of donna converse converse expo lcs mit edu the intrinsics library do not guarantee an order this is because both the widget writer and the application writer have the ability to modify the entire contents of the callback list neither one currently knows what the other is doing and so the intrinsics cannot guarantee the order of execution the application programmer cannot rely on the widget writer the widget writer is not required to document when the widget will add and remove callbacks from the list or what effect this will have therefore the functionality contained in a callback should be independent of the functionality contained in other callbacks on the list even though the xt standard in the definition of xtaddcallback says callback name specifies the callback list to which the procedure is to be appended you may not infer from the word appended that the callback routines are called in the same order as they have been added to the callback list how do i know if a widget is visible courtesy of donna converse converse expo lcs mit edu i am building a widget needs to know if it is visible i set the visible interest field in core and if my window is completely obscured the core visible flag goes false however if my window is iconified the flag stays set to true right everything is implemented correctly this demonstrates a deficiency in the x protocol and the core widget is reflecting the capabilities of the protocol the deficiency is that the information is available in one way in this case an inconvenient way the xt specification is accurate in the second and third paragraphs of section so read this section carefully the visible field will not change in response to iconification a visibilitynotify event will not be received when the window goes from viewable to unviewable that is when the widget or an ancestor is unmapped that is when iconification occurs this is the protocol deficiency visibility state and viewable state have specific meanings in the x protocol see the glossary in your xlib and x protocol reference manual is this a problem with mwm or is there something else which needs to be done you ll see this with any window manager with no window manager if the problem is mwm what is the fastest way to determine if a window is iconified as an application writer keep track with a global boolean in an action routine with translations for mapnotify and unmapnotify on the shell widget which contains your custom widget as the custom widget writer see the map state field returned by a call to xgetwindowattributes these are suggestions how do i reparent a widget in xt i e xtreparentwidget you can t why use xtmalloc xtfree etc unfortunately most code that calls malloc realloc or calloc tends to ignore the possibility of returning null at best it is handled something like ptr type malloc sizeof type if ptr perror malloc in xyzzy exit to handle this common case the intrinsics define the functions xtmalloc xtcalloc xtnew xtnewstring and xtrealloc which all use the standard c language functions malloc calloc and realloc but execute xterrormsg if a null value is returned xt error handlers are not supposed to return so this effectively exits in addition if xtrealloc is called with a null pointer it uses xtmalloc to get the initial space this allows code like if ptr ptr type malloc sizeof type else ptr type realloc ptr sizeof type count count to be written as ptr xtrealloc ptr sizeof ptr count also xtfree accepts a null pointer as an argument generally i ve found the xt functions conveniant to use however anytime i m allocating anything potentially large i use the standard functions so i can fully recover from not enough memory errors xtnew and xtnewstring are conveniant macros for allocating a structure or copying a string struct abc xyzzy char ptr char str abcdef xyzzy xtnew struct abc takes care of type casting ptr xtnewstring str a strict interpretation of the intrinsics reference manual allow an implementation to provide functions that are not exchangable with malloc and free i e code such as char ptr ptr xtmalloc free ptr may not work personally i d call any implementation that did this broken and complain to the vendor a common error for motif programmers is to use xtfree on a string when they should really be using xmstringfree how to debug an xt application first i d recomend getting purify from pure software this is a great package for tracing memory problems on sun s it s a bit pricey at but i d still recomend it excuse the marketing blurb contact support pure com for more info purify inserts additional checking instructions directly into the object code produced by existing compilers these instructions check every memory read and write performed by the program under test and detect several types of access errors such as reading unitialized memory writing past malloc d bounds or writing to freed memory purify inserts checking logic into all of the code in a program including third party and vendor object code libraries and verifies system call interfaces in addition purify tracks memory usage and identifies individual memory leaks using a novel adaption of garbage collection techniques purify s nearly comprehensive memory access checking slows the target program down typically by a factor of two to five an alternative package that isn t as pricey for a sun runs on many unix s and has pretty similar features is the sentinel debugging environment this replaces malloc and several other c library functions to add additional checks contact cpcahil virtech vti com for more info next if you are getting any sort of xlib error you ll need to run in synchronous mode easily accomplished with the sync command line argument or by setting the variable xdebug to with your debugger then set a break point in exit this will let you trace back to the original xlib function being called if you don t run in synchronous mode then the actual error may have occured any number of calls to xlib previously since the xlib calls are buffered and replies from the server are asynchronous next if you are having trouble with window layout you can use the undocumented resource xtidentifywindows or the class resource xtdebug to cause the widget name to be identified with each window for example example xload xrm xtdebug true example xwininfo tree click in new xload window will give the normal information but the widget name and class of each window is included this can help for checking the location and size of errant widgets next if you are having trouble with geometry managers or you want to test the way a widget manages it s children you can try export lcs mit edu contrib libxtgeo tar z this acts as a filter between any children and a geometry manager and checks the behaviour of both it s a very clever idea the most unfortunate problem is debugging a callback while the application is executing a grab of the keyboard or mouse such as from a pulldown menu the server effectively locks up and you ll need to go to another machine and kill the debugger manually the server locks up because the application being debugged has said no one else can have access to the keyboard but the application is not stopped waiting because the debugger is waiting for your commands unfortunately you can t give them because all the input is going to your application which is stopped the best way to debug this kind of problem is with two machines on your desk running the program under a debugger or other environment on one machine and running the application on the other possibly using a command sequence like this othermachine xhost thismachine thismachine setenv display othermachine thismachine gdb application your favorite debugger or this othermachine xhost thismachine thismachine gdb application gdb set environment display othermachine gdb run i believe codecenter a c interpreter graphical debugger has a method of dealing with this by explicitely calling the xlib functions to release any grabs during breakpoints debugging widget problems requires pretty good debugging skills and knowledge of how widgets work you can go a long way without knowing the internals of a particular widget but not very far without understanding how a widget works judicious use of conditional breakpoints and adding print statements with the debugger help a great deal why don t xtaddinput xtaddtimeout and xtaddworkproc work i have got a delicate problem with the three routines xtaddinput xtaddtimeout and xtaddworkproc the problem i have is that when i use them in my application they seem not to be registred properly i have made a handy little testprogram where everything works perfect but in my real application nothing happens the introduction in r of the xtapp functions obsoleted those routines see q for other changes in r r and r what happens is they use a default application context different then the one you may have created since events and timeouts are distributed on a per application context basis and you are using two application contexts you won t get those events for example cnt toplevel xtappinitialize app class desc xtnumber desc argc argv fallback args cnt xtaddtimeout xtaddworkproc xtappmainloop app would never invoke the timeout what is and how can i implement drag and drop courtesy of roger reynolds rogerr netcom com feb drag n drop is a buzzword for moving data between clients in an intuitive fashion motif version supports drag n drop capabilities openlook has supported d n d all along the two protocols are not compatable with each other and so far as i know they are not published i wrote a package called rdd which is designed to be a flexible public protocol for doing drag n drop operations between clients my intention was to provide a tool which would make it easy for people to support a standard drag n drop protocol in the programs they develop and contribute or sell regardless of what widget set is used as long as it is based on xt the implementation is based upon my understanding of the icccm conventions for more details read the code i have heard from dozens of people using rdd who like it and feel that it works a whole lot better than motif stuff also there seem to be many who think that it is neat but are constrained to use motif anyway the latest rdd and some other stuff is available for ftp from netcom com in pub rogerr a possibly older version is also available on export lcs mit edu in contrib pete ware ware cis ohio state edu cis dept ohio state university w bolz hall neil ave h columbus oh
2,808
comp.windows.x
re teleuse uim x and c in article apr ctp com hubec ctp com hubert chou writes does anyone have any good ideas on how to integrate c code elegantly with teleuse uim x interface architect generated code source would be great but any suggestions are welcome hubie chou hubec ctp com i don t know a great deal about the support for c in uim x but i can tell you that there is good support for it in teleuse in teleuse you can call any c method from a d module what you can do then is to use the d language for most of your interface code and then use c for you application code i should tell you that there is some real neat stuff coming out of teleuse soon in regard to c but i can t give you many details you should talk to your local sales rep and get the lowdown on what they will be doing in the near furture if you want example code of how c integrates with teleuse you should look at teleuse examples thermometer steve vranyes voice e mail stevevr ecs comm mot com u s post motorola inc e algonquin rd schaumburg il
2,809
comp.windows.x
xv root with vue was re xloadimage onroot on a related note how can i use xv to display colored gifs on my root display with hp vue all i can do with vue is display xbm s through their backdrop style manager xv does not seem to be able to override whatever vue puts there thanks jan jan vandenbrande jan ug eds com new address jan lipari usc edu school address forwards uucp uunet uupsi ug jan
2,810
comp.windows.x
strange exposure problem hi i m trying to write a motif program on an interactive unix machine and i m observing very strange behavior when my program attempts to expose a drawingarea namely some xlib operations work and some do not in particular the expose consist of two xfillrectangle calls followed by some xdrawpoint calls and for reasons unknown to me the point calls are failing whenever a pulldown or popup up menu is clicked on and moved in the rightward direction over the drawing area but after the move is still on some part of the drawing area this also happens less consistently when the pulldown popup is moved in the leftward direction assuming that my code is not doing anything incredibly odd is this a server bug thanks zack t smith
2,811
comp.windows.x
x for pc i have heard of two packages for the pc that support x win the first is linux which is a free unix package the second is x appeal which sounds pretty good it can be found at garbo uwusa fi in the ftp pc demo dir the files are xap exe zip xap fon zip drivers zip this should get you started josh joshua weage u s snail spring rd baroda mi e mail cs freenet in a cwru edu ai yfn ysu edu fidonet joshua weage all ideas are my own and no one elses
2,812
comp.windows.x
q how to avoid xopendisplay hang i m writing xwall a simple x version of wall and i want it to put a message up on each of a default list of displays the problem is that xopendisplay hangs if one of the displays is currently controlled by xdm login screen i ve been through the manuals and faq and don t see a simple way to see if a display is openable ahead of time or to get xopendisplay to fail after a short period of time any hints suggestions clues or pointers to info thanks andy moore andy ice stx com you could say i ve lost faith in the politicians they all seem like game show hosts to me sting
2,813
comp.windows.x
widget source code needed i m considering writing my own widgets but i like to have some sample widget source code to look over first where could i find something like this are there any archives accessible by anonymous ftp that contain such information thanks edward
2,814
comp.windows.x
converting color gif to x pixmap i have looked through the faq sections and have not seen a answer for this i have an x motif application that i have written i have a couple of gif files or pict that i have scanned in with a color scanner now i would like to be able to convert the gif files into a format that could be read into my application and displayed on the background of its main window preferably with pixmaps or perhaps as an ximage i have found functions in the pbmplus program suite to convert gif to xbm but that is monochrome and i really do need color i have looked at xv which reads in gif and writes out several formats but have not found a way to write out a file which can be read in as a pixmap is there an easy way to do this email responses preferred thanks mark ahlenius rtsg mot com regards mark mark ahlenius voice email ahlenius marble rtsg mot com motorola inc fax arlington hts il usa
2,815
comp.windows.x
re honors degrees do they mean anything what has this got to do with comp windows x o o oo oo justin kibell systems programmer xmelba project team c a t t collaborative information technology research institute melbourne vic internet jck jaguar catt citri edu au phone australia
2,816
comp.windows.x
help building x r with gcc can people please send me any hints on building x r with gcc is there any pitfalls to be avoided any hints i would appreciate hearing other peoples stories on this tim tim liddelow for fork systems programmer centre of advanced technology in telecommunications my brain on a bad day citri melbourne australia internet tim kimba catt citri edu au phone fax
2,817
comp.windows.x
reposting th international obfuscated c code contest rules of we have received a number of requests for a reposting of the international obfuscated c code contest rules and guidelines also some people requested that these rules be posted to a wider set of groups sorry for the cross posting some technical clarifications were made to the rules and guidelines see the diff marks at the right hand edge the rules and guidelines for this year remain the same so people who have already or are in the process of submitting entries for the ioccc need not worry about these changes chongo landon curt noll cc chongo toad com larry bassel lab sun com bin sh this is a shell archive shar made utc by chongo toad com source directory tmp existing files will be overwritten this shar contains length mode name r r r rules r r r guidelines r r r mkentry c r r r obfuscate info rules echo x extracting rules text sed s x shar eof rules x th international obfuscated c code contest rules x xcopyright c landon curt noll larry bassel xall rights reserved permission for personal education or non profit use is xgranted provided this this copyright and notice are included in its entirety xand remains unaltered all other uses must receive prior permission in writing xfrom both landon curt noll and larry bassel x x obfuscate tr v cated cating cates a to render obscure x b to darken to confuse his emotions obfuscated his x judgment llat obfuscare to darken ob intensive x lat fuscare to darken fuscus dark obfuscation n x obfuscatory adj x x xgoals of the contest x x to write the most obscure obfuscated c program under the rules below x to show the importance of programming style in an ironic way x to stress c compilers with unusual code x to illustrate some of the subtleties of the c language x to provide a safe forum for poor c code x x xnote changes from the draft are noted by change bars x x xrules x x to help us with the volume of entries we ask that you follow these rules x x your entry must be a complete program x x your entry must be bytes in length the number of characters x excluding whitespace tab space newline and excluding any or x followed by either whitespace or end of file must be x x your entry must be submitted in the following format x x entry xrule xfix y or n n this is a new entry y this replaces an older entry xtitle title of entry see comments below xentry entry number from to inclusive your st entry should by xdate date time of submission in utc see comments below xhost machine s and os s under which your entry was tested x use tab indented lines if needed x remark x place remarks about this entry in this section it would be helpful if x you were to indent your remarks with spaces though it is not a x requirement also if possible try to avoid going beyond the th x column blank lines are permitted x author xname your name xorg school company organization xaddr postal address x use tab indented lines to continue x don t forget to include the country xemail email address from a well known site or registered domain x if you give several forms list them on separate tab indented lines xanon y or n y remain anonymous n ok to publish this info x info xif your program needs an info file place a uuencoded copy of it in xthis section in the case of multiple info files use multiple info xsections if your entry does not need a info file skip this section x build xplace a uuencoded copy of the command s used to compile build your program xin this section it must uudecode into a file named build the resulting xfile must be bytes or less x program xplace a uuencoded copy of your program in this section it must uudecode xinto a file named is prog c the resulting file must follow rule x end x x regarding the above format x x the title must match the expression a za z a za z x and must be to characters in length x x it is suggested but not required that the title should x incorporate your username in the case of multiple authors x consider using parts of the usernames of the authors x x the date in the entry section should be given with respect x to utc the format of the date should be as returned by asctime x using the c locale see guidelines for more info x x you may correct revise a previously submitted entry by sending x it to the contest email address be sure to set fix in the x entry section to n the corrected entry must use the same x title and entry number as submittion that is being corrected be x sure that you note the resubmittion in the remark as well x x with the exception of the header all text outside of the above x format may be ignored by the judges if you need tell the judges x something put it in the remark section or send a separate x email message to the judges x x information from the author section will be published unless x y was given to the respective author s anon line x x to credit multiple authors include an author section for x each author each should start with author line and x should be found between the entry and build sections x x the entry s remarks should include x what this program does x how to run the program sample args or input x special compile or execution instructions if any x special filename requirements see rule and x information about any data files x why you think the program is obfuscated x note if this entry is a re submission of a previous entry x any other remarks humorous or otherwise x x do not rot your entry s remarks you may suggest that certain x portions of your remarks be rot ed if your entry wins an award x x info files should be used only to supplement your entry they x should not be required to exist x x if your entry does not need an info file skip the info x section if your entry needs multiple info files use multiple x info sections one per info file you should describe x each info file in the remark section x x if your entry is selected as a winner it will be modified as follows x x build is incorporated into a makefile and build is removed x prog c is renamed to your entry s title followed by an optional x digit followed by c x your entry is compiled into a file with the name of your entry s x title possibly followed by a digit x x if your entry requires that a build file exist state so in your x entry s remark section the makefile will be arranged to execute a x build shell script containing the build information the name of x this build shell script will be your entry s title possibly followed x by a digit followed by sh x x if needed your entry s remarks should indicate how your entry must x be changed in order to deal with the new filenames x x the build file the source and the resulting executable should be x treated as read only files if your entry needs to modify these files x it should make and modify a copy of the appropriate file if this x occurs state so in your entry s remarks x x entries that cannot be compiled by an ansi c compiler will be rejected x use of common c k r extensions is permitted as long as it does not x cause compile errors for ansi c compilers x x the program must be of original work all programs must be in the x public domain all copyrighted programs will be rejected x x entries must be received prior to may utc utc is x essentially equivalent to greenwich mean time email your entries to x x apple pyramid sun uunet hoptoad obfuscate x obfuscate toad com x x we request that your message use the subject ioccc entry x x if possible we request that you hold off on emailing your entries x until mar utc early entries will be accepted however x we will attempt to email a confirmation to the the first author for x all entries received after mar utc x x each person may submit up to entries per contest year each entry x must be sent in a separate email letter x x entries requiring human interaction to be built are not allowed x compiling an entry produce a file or files which may be executed x x programs that require special privileges setuid setgid super user x special owner or group are not allowed x x xfor more information x x the judging will be done by landon noll and larry bassel please send x questions or comments about the contest to x x apple pyramid sun uunet hoptoad judges not the address for x judges toad com submitting entries x x the rules and the guidelines may and often do change from year to x year you should be sure you have the current rules and guidelines x prior to submitting entries to obtain them send email to the address x above and use the subject send rules x x one may obtain winners of previous contests to date via ftp from x x host ftp uu net x user anonymous x pass yourname yourhost x dir pub ioccc x x as a last resort previous winners may be obtained by sending email x to the above address please use the subject send year winners x where year is a single digit year a year range or all x x xchongo landon curt noll cc chongo toad com xlarry bassel lab sun com shar eof chmod rules echo restore of rules failed set wc c rules wc c if test wc c then echo original size current size wc c fi guidelines echo x extracting guidelines text sed s x shar eof guidelines x th international obfuscated c code contest guidelines hints and comments x xcopyright c landon curt noll larry bassel xall rights reserved permission for personal education or non profit use is xgranted provided this this copyright and notice are included in its entirety xand remains unaltered all other uses must receive prior permission in writing xfrom both landon curt noll and larry bassel x xabout this file x x this file is intended to help people who wish to submit entries to x the international obfuscated c code contest ioccc for short x x this is not the ioccc rules though it does contain comments about x them the guidelines should be viewed as hints and suggestions x entries that violate the guidelines but remain within the rules are x allowed even so you are safer if you remain within the guidelines x x you should read the current ioccc rules prior to submitting entries x the rules are typically sent out with these guidelines x x changes from the draft are noted by change bars x x xwhat is new in x x the entry format is better for us anyway the program mkentry c x has been updated see entry format x x we will reject entries that cannot be compiled using an ansi c x compiler certain old obfuscation hacks that cause ansi c compilers x fits are no longer permitted some of the new issues deal with x non integral array types variable number of arguments c preprocessor x directives and the exit function see our likes and dislikes x x xhints and suggestions x x you are encouraged to examine the winners of previous contests see x for more information for details on how to get previous winners x x keep in mind that rules change from year to year so some winning entries x may not be valid entries this year what was unique and novel one year x might be old the next year x x an entry is usually examined in a number of ways we typically apply x a number of tests to an entry x x look at the original source x convert ansi tri graphs to ascii x c pre process the source ignoring include lines x c pre process the source ignoring define and include lines x run it through a c beautifier x examine the algorithm x lint it x compile it x execute it x x you should consider how your entry looks in each of the above tests x you should ask yourself if your entry remains obscure after it has been x cleaned up by the c pre processor and a c beautifier x x your entry need not do well under all or in most tests in certain x cases a test is not important entries that compete for the x strangest most creative source layout need not do as well as x others in terms of their algorithm on the other hand given x two such entries we are more inclined to pick the entry that x does something interesting when you run it x x we try to avoid limiting creativity in our rules as such we leave x the contest open for creative rule interpretation as in real life x programming interpreting a requirements document or a customer request x is important for this reason we often award worst abuse of the x rules to an entry that illustrates this point in an ironic way x x if you do plan to abuse the rules we suggest that you let us know x in the remarks section please note that an invitation to abuse x is not an invitation to break we are strict when it comes to the x byte size limit also abusing the entry format tends to x annoy more than amuse x x we do realize that there are holes in the rules and invite entries x to attempt to exploit them we will award worst abuse of the rules x and then plug the hole next year even so we will attempt to use x the smallest plug needed if not smaller x x check out your program and be sure that it works we sometimes make x the effort to debug an entry that has a slight problem particularly x in or near the final round on the other hand we have seen some x of the best entries fall down because they didn t work x x we tend to look down on a prime number printer that claims that x is a prime number if you do have a bug you are better off x documenting it noting this entry sometimes prints the th power x of a prime by mistake would save the above entry and sometimes x a strange bug feature can even help the entry of course a correctly x working entry is best x x xour likes and dislikes x x doing masses of defines to obscure the source has become old we x tend to see thru masses of defines due to our pre processor tests x that we apply simply abusing defines or dfoo bar won t go as far x as a program that is more well rounded in confusion x x many ansi c compilers dislike the following code and so do we x x define d define x d foo don t expect this to turn into define foo x x int i x j don t use such implicit type declaration x int k x x we suggest that you compile your entry with an ansi c compiler if you x must use non ansi c such as k r c you must avoid areas that result in x compile link errors for ansi c compilers x x unfortunately some ansi c compilers require array indexes to be of x integral type thus the following classical obfuscation hacks should x not be used in this rule may be relaxed in future contests x x int i x char c x i c use c i instead x i string use string i instead x x if your entry uses functions that have a variable number of x arguments be careful systems implement va list as a wide variety x of ways because of this a number of operations using va list are x not portable and must not be used x x assigning a non va list variable to from a va list variable x casting a non va list variable into from a va list variable x passing a va list variable to a function expecting a non va list arg x passing a non va list variable to a function expecting a va list arg x performing arithmetic on va list variables x using va list as a structure or union x x in particular do not treat va list variables as if they were a char s x x avoid using varargs h use stdarg h instead x x if you use c preprocessor directives define if ifdef x the leading must be the first character on a line while some x c preprocessors allow whitespace the leading many do not x x because the exit function returns void on some systems entries x must not assume that it returns an int x x small programs are best when they are short obscure and concise x while such programs are not as complex as other winners they do x serve a useful purpose they are often the only program that people x attempt to completely understand for this reason we look for x programs that are compact and are instructional x x one line programs should be short one line programs say around x bytes long getting close to bytes is a bit too long in our opinion x x we tend to dislike programs that x x are very hardware specific x are very os or un x version specific x index strchr differences are ok but socket streams specific x code is likely not to be x dump core or have compiler warnings x it is ok only if you warn us in the remark header item x won t compile under both bsd or sys v un x x abusing the build file to get around the size limit x obfuscate by excessive use of ansi tri graphs x are longer than they need to be x are similar to previous winners x are identical to previous losers x x unless you are cramped for space or unless you are entering the x best one liner category we suggest that you format your program x in a more creative way than simply forming excessively long lines x x the build file should not be used to try and get around the size x limit it is one thing to make use of a several d s to help out x but it is quite another to use bytes of d s in order to x try and squeeze the source under the size limit you should feel x free to make use of the build file space but you are better off x if you show some amount of restraint x x we allowed whitespace and in certain cases or do not impact x your program size up to a certain point because we want to get x away from source that is simply a compact blob of characters x x given two versions of the same program one that is a compact blob x of code and the other that is formatted more like a typical c x program we tend to favor the second version of course a third x version of the same program that is formatted in an interesting x and or obfuscated way would definitely win over the first two x x we suggest that you avoid trying for the smallest self replicating x program we are amazed at the many different sizes that claim x to be the smallest there is nothing wrong with self replicating x programs in fact a number of winners have been self replicating x you might want to avoid the claim of smallest lest we or others x know of a smaller one x x x client entries should be as portable as possible entries that x adapt to a wide collection of environments will be favored don t x depend on a particular type of display for example don t depend x on color or a given size don t require backing store x x x client entries should avoid using x related libraries and x software that is not in wide spread use we ask that such x client x entries restrict themselves to only the low level xlib and the x athena widget set libx a libxaw a libxmu a and libxt a x don t use m tif xv ew or openl ok toolkits since not everyone x has them avoid depending on a particular window manager not x everyone has x r and some people are stuck back in x r or x earlier so try to target x r without requiring x r better x yet try to make your entry run on all version x window systems x x x client entries should not to depend on particular items on x xdefaults if you must do so be sure to note the required lines x in the remark section x x we like programs that x x are as concise and small as they need to be x do something at least quasi interesting x pass lint without complaint not a requirement but it is nice x are portable x are unique or novel in their obfuscation style x make use of a number of different types of obfuscation x make us laugh and or throw up x x some types of programs can t excel in some areas of course your x program doesn t have to excel in all areas but doing well in several x areas really does help x x we freely admit that interesting creative or humorous comments in x the remark section helps your chance of winning if you had to x read of many twisted entries you too would enjoy a good laugh or two x we think the readers of the contest winners do as well x x be creative x x xentry format x x in order to help us process the many entries we must request your x assistance by formatting your entries in a certain way this format x in addition allows us to quickly separate information about the x author from the program itself see judging process x x we have provided the program mkentry as an example of how to x format entries you should be aware of the following warning that x is found in mkentry c x x this program attempts to implement the ioccc rules every x attempt has been made to make sure that this program produces x an entry that conforms to the contest rules in all cases x where this program differs from the contest rules the x contest rules will be used be sure to check with the x contest rules before submitting an entry x x you are not required to use mkentry it is convenient however x as it attempts to uuencode the needed files and attempt to check x the entry against the size rules x x if you have any suggestions comments fixes or complaints about x the mkentry c program please send email to the judges see below x x the following is a sample entry x x entry xrule xfix n xtitle chonglab xentry xdate mon mar xhost un x v pdp x bsd pdp x remark x this is a non obfuscated obfuscated c program x x it is likely not to win a prize but what do you expect from x a short example x author xname landon curt noll xorg ioccc judging group xaddr toad hall x po box x san francisco california x x usa xemail chongo toad com xanon n x author xname larry bassel xorg ioccc judging group xaddr toad hall x po box x san francisco california x x usa xemail hoptoad sun lab x lab sun com xanon n x info x end x x typically the build file should assume that the source is prog c x and will compile into prog if an entry wins we will rename x its source and binary to avoid filename collision by tradition x we use the name of the entry s title followed by an optional x digit in case of name conflicts x x if the above entry somehow won the least likely to win award x we would use chonglab c and chonglab x x if your entry depends on or requires that your build source x and or binary files be a particular name please say so in the x remark section if this case applies it would be be helpful x if you did one of the following x x tell us how to change the filename s in your entry x x have the build file make copies of the files for example x x cc prog c o special name need special binary x x or rm f special src c need special source x cp prog c special src c x cc special src c o special name x x or rm f special build need special build x tail build special build x sh special build x x assume that we will use the entry title send us a version of x your build program files that uses the name convention you x should uuencode these files in data sections x x if your entry needs to modify its source info or binary files x please say so in the remark section you should try to avoid x touching your original build source and binary files you should x arrange to make copies of the files you intend to modify this x will allow people to re generate your entry from scratch x x remember that your entry may be built without a build file we x typically incorporate the build lines into a makefile if the x build file must exist say so in the remark section x x if your entry needs special info files you should uuencode them x into info sections in the case of multiple info files x use multiple info sections if no info files are needed x then skip the info section x x info files are intended to be input or detailed information that x does not fit well into the remark section for example an x entry that implements a compiler might want to provide some sample x programs for the user to compile an entry might want to include a x lengthy design document that might not be appropriate for a x hints file x x info files should be used only to supplement your entry for x example info files may provide sample input or detailed x information about your entry because they are supplemental x the entry should not require them exist x x in some cases your info files might be renamed to avoid name x conflicts if info files should not be renamed for some reason x say so in the remark section x x info files must uudecode into the current directory if they x absolutely must be renamed or moved into a sub directory say x so in the remark section x x when submitting multiple entries be sure that each entry has x a unique entry number from to your first entry should x have entry number x x with the exception of the header all text outside of the entry x format may be ignored that is don t place text outside of the x entry and expect the judges to see it our decoding tools aren t x ai progs if you need tell the the something put it in the x remark section or send a email to the judges at x x apple pyramid sun uunet hoptoad judges not the address for x judges toad com submitting entries x x the date should be given with respect to utc some systems refer x to this as gmt or gmt the format of the date should be that as x returned by asctime in the c locale an example of such a string is x x thr apr x x this format is similar to the output of the date command the x string does not include the timezone name before the year on many x systems one of the following command will produce a similar string x x date u a h d t y x date u sed e s x sh c tz utc date sed e s x sh c tz gmt date sed e s x sh c tz gmt date sed e s x x you are allowed to update fix revise your entry to do so set x the fix line in the entry section to y instead of n x be sure that the resubmittion uses the same title and entry number x as well as these are used to determine which entry is to be x replaced x x xjudging process x x entries are judged by larry bassel and landon curt noll x x entries are unpacked into individual directories the email message x is unpacked into individual files each containing x x entry section x all author sections x all info sections x build section x program section x any other text including the email message headers x x prior to judging the any other text file is scanned to be sure x it does not contain useful information or in case the entry was x malformed and did not unpack correctly information from the x author sections are not read until the judging process is x complete and then only from entries that have won an award x x the above process helps keep us biased for against any one particular x individual we are usually kept in the dark as much as you are x until the final awards are given we like the surprise of finding x out in the end who won and where they were from x x we attempt to keep all entries anonymous unless they win an award x because the main prize of winning is being announced we make all x attempts to send non winners into oblivion we remove all non winning x files and shred all related paper by tradition we do not even x reveal the number of entries that we received for the curious x we do indicate the volume of paper consumed when presenting the ioccc x winners at talks x x after the usenix announcement we attempt to send email to the x authors of the winning entries one reason we do this is to give x the authors a chance to comment on the way we have presented their x entry they are given the chance to correct mistakes typos we x often accept their suggestions comments about our remarks as well x this is done prior to posting the winners to the wide world x x judging consists of a number of elimination rounds during a round x the collection of entries are divided into two roughly equal piles x the pile that advances on to the next round and the pile that does x not we also re examine the entries that were eliminated in the x previous round thus an entry gets at least two readings x x a reading consists of a number of actions x x reading the entry section x reading the uudecoded build section x reading the uudecoded program section x reading the uudecoded info section s if any x passing the source thru the c pre processor x shipping over any include files x performing a number of c beautify cleanup edits on the source x passing the beautified source thru the c pre processor x shipping over any include files x x in later rounds other actions are performed x x linting the source x compiling building the source x running the program x performing misc tests on the source and binary x x until we reduce the stack of entries down to about entries entries x are judged on an individual basis an entry is set aside because it x does not in our opinion meet the standard established by the round x when the number of entries thins to about entries we begin to form x award categories entries begin to compete with each other for awards x an entry often will compete in several categories x x the actual award category list will vary depending on the types of entries x we receive a typical category list might be x x best small one line program x best small program x strangest most creative source layout x most useful obfuscated program x best game that is obfuscated x most creatively obfuscated program x most deceptive c code x best x client see our likes and dislikes x best abuse of ansi c x worst abuse of the rules x anything else so strange that it deserves an award x x we do not limit ourselves to this list for example a few entries are so x good bad that they are declared winners at the start of the final round x we will invent awards categories for them if necessary x x in the final round process we perform the difficult tasks of x reducing the remaining entries typically about down to or x winners often we are confident that the entries that make it into x the final round are definitely better than the ones that do not x make it the selection of the winners out of the final round is x less clear cut x x sometimes a final round entry good enough to win but is beat out x by a similar but slightly better entry for this reason it is x sometimes worthwhile to re enter an improved version of an entry x that failed to win in a previous year this assumes of course x that the entry is worth improving in the first place x x more often that not we select a small entry usually one line a x strange creative layout entry and an entry that abuses the contest x rules in some way x x in the end we traditionally pick one entry as best sometimes such x an entry simply far exceeds any of the other entry more often the x best is picked because it does well in a number of categories x x xannouncement of winners x x the first announcement occurs at a summer usenix conference by tradition x this is done during the latter part of the uunet ioccc bof just prior to x the berkeley bsd and bsdi bof x x winning entries will be posted in late june to the following groups x x comp lang c comp unix wizards alt sources x x in addition pointers to these postings are posted to the following x x comp sources d alt sources d misc misc x comp sources misc comp windows x x x winning entries will be deposited into the uunet archives see x below for details x x often winning entries are published in selected magazines winners x have appeared in books the new hackers dictionary and on t shirts x x last but not least winners receive international fame and flames x x xfor more information x x you may contact the judges by sending email to the following address x x apple pyramid sun uunet hoptoad judges not the address for x judges toad com submitting entries x x questions and comments about the contest are welcome x x the rules and the guidelines may and often do change from year to x year you should be sure you have the current rules and guidelines x prior to submitting entries to obtain them send email to the address x above and use the subject send rules x x one may obtain winners of previous contests to date via ftp from x x host ftp uu net x user anonymous x pass yourname yourhost x dir pub ioccc x x as a last resort previous winners may be obtained by sending email x to the above address please use the subject send year winners x where year is a single digit year a year range or all x x xchongo landon curt noll cc chongo toad com xlarry bassel lab sun com shar eof chmod guidelines echo restore of guidelines failed set wc c guidelines wc c if test wc c then echo original size current size wc c fi echo end of part continue with part exit sunnyvale residents vote landon noll for sunnyvale city council seat
2,818
comp.windows.x
reposting th international obfuscated c code contest rules of we have received a number of requests for a reposting of the international obfuscated c code contest rules and guidelines also some people requested that these rules be posted to a wider set of groups sorry for the cross posting some technical clarifications were made to the rules and guidelines see the diff marks at the right hand edge the rules and guidelines for this year remain the same so people who have already or are in the process of submitting entries for the ioccc need not worry about these changes chongo landon curt noll cc chongo toad com larry bassel lab sun com bin sh this is part of a multipart archive mkentry c echo x extracting mkentry c text sed s x shar eof mkentry c x mkentry c x x copyright c landon curt noll larry bassel x all rights reserved permission for personal education or non profit use x is granted provided this this copyright and notice are included in its x entirety and remains unaltered all other uses must receive prior x permission in writing from both landon curt noll and larry bassel x x x mkentry make an international obfuscated c code contest entry x x usage x mkentry r remarks b build p prog c o ioccc entry x x r remarks file with remarks about the entry x b build file containing how prog c should be built x p prog c the obfuscated program source file x o ioccc entry ioccc entry output file x x compile by x cc mkentry c o mkentry x x x placed in the public domain by landon curt noll x x this software is provided as is and without any express or implied x warranties including without limitation the implied warranties of x merchantability and fitness for a particular purpose x x x warning x x this program attempts to implement the ioccc rules every attempt x has been made to make sure that this program produces an entry that x conforms to the contest rules in all cases where this program x differs from the contest rules the contest rules will be used be x sure to check with the contest rules before submitting an entry x x for more information x x you may contact the judges by sending email to the following address x x apple pyramid sun uunet hoptoad judges not the address for x judges toad com submitting entries x x questions and comments about the contest are welcome x x the rules and the guidelines may and often do change from year to x year you should be sure you have the current rules and guidelines x prior to submitting entries to obtain them send email to the address x above and use the subject send rules x x one may obtain winners of previous contests to date via ftp from x x host ftp uu net x user anonymous x pass yourname yourhost x dir pub ioccc x x as a last resort previous winners may be obtained by sending email x to the above address please use the subject send year winners x where year is a single digit year a year range or all x x because contest rules change from year to year one should only use this x program for the year that it was intended be sure that the rule year x define below matches this current year x x x include stdio h x include ctype h x include time h x include sys types h x include sys stat h x x logic x ifndef true x define true x endif true x ifndef false x define false x endif false x define eof ok true x define eof not ok false x x global limits x define rule year note should match the current year x define start date mar utc first confirmation received x define max col max column a line should hit x define max build size max how to build size x define max program size max program source size x define max program size max program source size not counting x whitespace and not followed by x whitespace or eof x define max title len max chars in the title x define max entry len max length in the entry input line x define max entry max number of entries per person per year x define max file len max filename length for a info file x x where to send entries x define entry addr apple pyramid sun uunet hoptoad obfuscate x define entry addr obfuscate toad com x x uuencode process assumes ascii x define uuencode c encode str int c xff x define uuencode len max uuencode chunk size x define uuinfo mode mode of an info file s uuencode file x define uubuild mode mode of the build file s uuencode file x define uubuild name build name for the build file s uuencode file x define uuprog mode mode of the program s uuencode file x define uuprog name prog c name for the program s uuencode file x x encode str char val is the uuencoded character of val xchar encode str abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz x x global declarations xchar program our name xlong start time the startup time x x forward declarations xvoid parse args xvoid usage xfile open remark xfile open build xfile open program xfile open output xvoid output entry xvoid output remark xvoid output author xvoid output info xvoid output build xvoid output program xvoid output end xint get line xvoid output till dot xint col len xvoid check io xvoid uuencode x xmain argc argv x int argc arg count x char argv the args x x file remark null open remarks stream x file build null open build file stream x file prog null open program stream x file output null open output stream x char rname null file with remarks about the entry x char bname null file containing how prog c should be built x char pname null the obfuscated program source file x char oname null ioccc entry output file x struct tm tm startup time structure x x x check on the year x x start time time long x tm gmtime start time x if tm tm year rule year x fprintf stderr x s warning this program applies to d which may differ from d n n x argv rule year tm tm year x x x x parse the command line args x x parse args argc argv rname bname pname oname x x x open check the input and output files x x we open and truncate the output file first in case it is the same x as one of the input files x x output open output oname x remark open remark rname x build open build bname x prog open program pname x if output null remark null build null prog null x exit x x x x output each section x x output entry output oname x output remark output oname remark rname x output author output oname x output info output oname x output build output oname build bname x output program output oname prog pname x output end output oname x x x flush the output x x if fflush output eof x fprintf stderr s flush error in s program oname x perror x exit x x x x final words x x printf nyour entry can be found in s you should check this file n x oname x printf correct any problems and verify that the uudecode utility will n x printf correctly decode your build file and program n n x printf this program has been provided as a guide for submitters in n x printf cases where it conflicts with the rules the rules shall apply n x printf it is your responsibility to ensure that your entry conforms to n x printf the current rules n n x printf email your entries to n x printf t s n entry addr x printf t s n n entry addr x printf please use the following subject when you email your entry n x printf tioccc entry n n x all done x exit x x x x parse args parse the command line args x x given the command line args this function parses them and sets the x required name flags this function will return only if the command x line syntax is correct x xvoid xparse args argc argv rname bname pname oname x int argc arg count x char argv the args x char rname file with remarks about the entry x char bname file containing how prog c should be built x char pname the obfuscated program source file x char oname ioccc entry output file x x char optarg flag option operand x int flagname the name of the flag x int i x x x not everyone has getopt so we must parse args by hand x x program argv x for i i argc i x x determine the flagname x if argv i x usage x notreached x x flagname int argv i x x determine the flag s operand x if flagname argv i x optarg argv i x else x if i argc x usage x notreached x else x optarg argv i x x x x save the flag s operand in the correct global variable x switch flagname x case r x rname optarg x break x case b x bname optarg x break x case p x pname optarg x break x case o x oname optarg x break x default x usage x notreached x x x x x verify that we have all of the required flags x x if rname null bname null pname null oname null x usage x notreached x x return x x x x usage print a usage message and exit x x this function does not return x xvoid xusage exitval x int exitval exit with this value x x fprintf stderr x usage s r remarks b build p prog c o ioccc entry n n program x fprintf stderr t r remarks tfile with remarks about the entry n x fprintf stderr t b build tfile containing how prog c should be built n x fprintf stderr t p prog c tthe obfuscated program source file n x fprintf stderr t o ioccc entry tioccc entry output file n x exit exitval x x x x open remark open check the remark file x x the remark file should be indented by spaces and should not extend x beyond column max col these are not requirements so we only warn x x this function returns null on i o or format error x xfile xopen remark filename x char filename x x file stream the opened file stream x char buf bufsiz input buffer x int toolong number of lines that are too long x int non indent number of lines not indented by spaces x x x open the remark input file x x stream fopen filename r x if stream null x fprintf stderr s cannot open remark file s x program filename x perror x return null x x x x look at each line x x while fgets buf bufsiz stream null x x count lines that do not start with spaces x if buf n strncmp buf x non indent x x x count long lines x if col len buf max col x found a line that is too long x toolong x x x x watch for i o errors x check io stream filename eof ok x x note long lines if needed x if toolong x fprintf stderr x s warning d line s from s extend beyond the th column n x program toolong filename x fprintf stderr x s this is ok but it would be nice to avoid n n x program x x x note non indented lines if needed x if non indent x fprintf stderr x s warning d line s from s are not indented by spaces n x program non indent filename x fprintf stderr x s this is ok but it would be nice to avoid n n x program x x x return the open file x rewind stream x return stream x x x x open build open check the build file x x the how to build file must not be longer than max build size bytes x x this function returns null on i o or size error x xfile xopen build filename x char filename x x file stream the opened file stream x struct stat statbuf the status of the open file x x x open the how to build input file x x stream fopen filename r x if stream null x fprintf stderr s cannot open how to build file s x program filename x perror x return null x x x x determine the size of the file x x if fstat fileno stream statbuf x fprintf stderr s cannot stat how to build file s x program filename x perror x return null x x if statbuf st size max build size x fprintf stderr x s fatal the how to build file s is d bytes long n x program filename statbuf st size x fprintf stderr x s it may not be longer than d bytes n x program max build size x return null x x x return the open file x return stream x x x x open program open check the program source file x x the program source file must be bytes the number of x non whitespace and chars not followed by whitespace must x be bytes x x this function returns null on i o or size error x xfile xopen program filename x char filename x x file stream the opened file stream x struct stat statbuf the status of the open file x int count special count size x int c the character read x x x open the program source input file x x stream fopen filename r x if stream null x fprintf stderr s cannot open program source file s x program filename x perror x exit x x x x determine the size of the file x x if fstat fileno stream statbuf x fprintf stderr s cannot stat program source file s x program filename x perror x return null x x if statbuf st size max program size x fprintf stderr x s fatal the program source file s is d bytes long n x program filename statbuf st size x fprintf stderr x s it may not be longer than d bytes n x program max program size x return null x x x x count the non whitespace non followed by whitespace chars x x count x c x while c fgetc stream eof x look at non whitespace x if isascii c isspace c x switch c x case count if not followed by eof or whitespace x case x case x peek at next char x c fgetc stream x if c eof isascii c isspace c x not followed by whitespace or eof count it x ungetc c stream x count x x break x default x count x break x x x x x watch for i o errors x check io stream filename eof ok x x look at the special size x if count max program size x fprintf stderr x s fatal the number of bytes that are non whitespace and n x program x fprintf stderr x s that are not followed by whitespace n x program x fprintf stderr x s or eof must be d bytes n x program max program size x fprintf stderr x s in s d bytes were found n x program filename count x return null x x x return the open file x rewind stream x return stream x x x x open output open check the entry output file x x this function returns null on open error x xfile xopen output filename x char filename x x file stream the opened file stream x x x open the ioccc entry output file x x stream fopen filename w x if stream null x fprintf stderr s cannot open ioccc entry file for output s x program filename x perror x exit x x x return the open file x return stream x x x x output entry output the entry section x x read the needed information form stdin and write the entry section x xvoid xoutput entry output oname x file output entry s output file stream x char oname name of the output file x x char title max title len the entry s title x char buf max col i o buffer x int entry entry number x int ret fields processed by fscanf x int ok line the line is not ok x char skip input to skip x file date pipe pipe to a date command x time t epoch sec seconds since the epoch x char p x x x write the start of the section x x fprintf output entry n x check io output oname eof not ok x x x write the rule year x x fprintf output rule t d n rule year x check io output oname eof not ok x x determine if this is a fix x printf is this a fix update or resubmittion to a x printf previous entry enter y or n x while get line buf buf y buf n x printf nplease answer y or n x x if buf y x fprintf output fix ty n x check io output oname eof not ok x printf nbe sure that the title and entry number that you give n x printf are the same of as the entry you are replacing n x else x fprintf output fix tn n x check io output oname eof not ok x x x x write the title x x printf nyour title must match expression be a a za z character n x printf followed by to d more a za z characters n n x max title len x printf it is suggested but not required that the title should n x printf incorporate your username in the n x printf case of multiple authors consider using parts of the usernames n x printf of the authors n n x printf enter your title x do x prompt and read a line x if ok line get line title max title len max col x printf ntitle is too long please re enter x continue x x x verify the pattern not everyone has regexp so do it by hand x if isascii int title x isalnum int title title title x printf ninvalid first character in the title n n x printf enter your title x ok line x else x for p title p p n p x if isascii int p x isalnum int p x p p p p x printf ninvalid character in the title n n x printf enter your title x ok line x x x x while ok line x fprintf output title t s title x check io output oname eof not ok x x x write the entry number x x printf neach person may submit up to d entries per year n n x max entry x printf enter an entry number from to d inclusive max entry x do x get a valid input line x fflush stdout x ret fscanf stdin d n entry x check io stdin stdin eof not ok x skip over input until newline is found x do x skip fgetc stdin x check io stdin stdin eof not ok x if skip n x bad text in input invalidate entry number x entry x x while skip n x x check if we have a number and if it is in range x if ret entry entry max entry x printf x nthe entry number must be between and d inclusive n n x max entry x printf enter the entry number x x while ret entry entry max entry x fprintf output entry t d n entry x check io output oname eof not ok x x x write the submission date x x returns a newline x epoch sec time null x fprintf output date t s asctime gmtime epoch sec x check io output oname eof not ok x x x write the os machine host information x x printf x nenter the machine s and os s under which your entry was tested n x output till dot output oname host x x x x output remark output the remark section x x read the needed information form stdin and write the entry section x xvoid xoutput remark output oname remark rname x file output entry s output file stream x char oname name of the output file x file remark stream to the file containing remark text x char rname name of the remark file x x char buf bufsiz input output buffer x x x write the start of the section x x fprintf output remark n x check io output oname eof not ok x x x copy the remark file to the section x x while fgets buf bufsiz remark null x fputs buf output x check io output oname eof not ok x x check io remark rname eof ok x x be sure that the remark section ends with a newline x if buf strlen buf n x fputc n output x check io output oname eof not ok x x x x x output author output the author section x x read the needed information from stdin and write the author section x if multiple authors exist multiple author sections will be written x xvoid xoutput author output oname x file output entry s output file stream x char oname name of the output file x x char buf max col i o buffer x int more auths true more authors to note x int auth cnt number of authors processed x x x prompt the user for the author section x x printf nenter information about each author if your entry is after n x printf s and before the contest deadline the judges n start date x printf will attempt to email back a confirmation to the first author n x x x place author information for each author in an individual section x x do x x write the start of the section x fprintf output author n x check io output oname eof not ok x x write the author x printf nauthor d name auth cnt x while get line buf max col max col x printf nname too long please re enter x x fprintf output name t s buf x check io output oname eof not ok x x write the organization x printf nenter the school company organization of author d n x auth cnt x printf nauthor d org auth cnt x while get line buf max col max col x printf nline too long please re enter x x fprintf output org t s buf x check io output oname eof not ok x x write the address x printf x nenter the postal address for author d be sure to include n x auth cnt x printf your country and do not include your name n x output till dot output oname addr x x write the email address x printf x nenter the email address for author d use an address from n x auth cnt x printf x a registered domain or well known site if you give several n x printf forms list them one per line n x output till dot output oname email x x write the anonymous status x printf nshould author d remain anonymous enter y or n x auth cnt x while get line buf buf y buf n x printf nplease answer y or n x x fprintf output anon t s buf x check io output oname eof not ok x x determine if there is another author x printf nis there another author enter y or n x while get line buf buf y buf n x printf nplease answer y or n x x if buf y x more auths true x else x more auths false x x while more auths true x return x x x x output info output the info section s x x read the needed information from stdin and write the info section x if multiple info files exist multiple info sections will be written x xvoid xoutput info output oname x file output entry s output file stream x char oname name of the output file x x char infoname max file len filename buffer x char yorn y or n answer x char uuname name to uuencode as x file infile info file stream x x x prompt the user for info information x x printf ninfo files should be used only to supplement your entry n x printf for example info files may provide sample input or detailed n x printf information about your entry because they are supplemental n x printf the entry should not require them to exist n n x x x while there is another info file to save uuencode it x x printf do you have a info file to include enter y or n x while get line yorn yorn y yorn n x printf nplease answer y or n x x while yorn y x x read the filename x printf nenter the info filename x while get line infoname max file len x printf ninfo filename too long please re enter x x x compute the basename of the info filename x remove the trailing newline x uuname infoname strlen infoname x uuname x avoid rindex shrrchr compat issues do it by hand x for uuname uuname infoname uuname x if uuname x uuname x break x x x x attempt to open the info file x infile fopen infoname r x if infile null x fprintf stderr n s cannot open info file s x program infoname x perror x continue x x x x write the start of the section x x fprintf output info n x check io output oname eof not ok x x uuencode the info file x uuencode output oname infile infoname uuinfo mode uuname x x printf ndo you have another info file to include enter y or n x while get line yorn yorn y yorn n x printf nplease answer y or n x x x return x x x x output build output the build section x x read the needed information from stdin and write the build section x xvoid xoutput build output oname build bname x file output entry s output file stream x char oname name of the output file x file build open build file stream x char bname name of the build file x x x write the start of the section x x fprintf output build n x check io output oname eof not ok x x x uuencode the program file x x uuencode output oname build bname uubuild mode uubuild name x return x x x x output program output the program section x x read the needed information form stdin and write the program section x xvoid xoutput program output oname prog pname x file output entry s output file stream x char oname name of the output file x file prog open program stream x char pname name of program file x x x write the start of the section x x fprintf output program n x check io output oname eof not ok x x x uuencode the program file x x uuencode output oname prog pname uuprog mode uuprog name x return x x x x output end output the end section x x read the needed information form stdin and write the end section x xvoid xoutput end output oname x file output entry s output file stream x char oname name of the output file x x x write the final section terminator x x fprintf output end n x check io output oname eof not ok x return x x x x get line get an answer from stdin x x this function will flush stdout in case a prompt is pending and x read in the answer x x this function returns if the line is too long of the length of the x line including the newline of the line was ok this function does x not return if error or eof x xint xget line buf siz maxcol x char buf input buffer x int siz length of input including the newline x int maxcol max col allowed disable check x x int length the length of the input line x x flush terminal output x fflush stdout x x read the line x if fgets buf siz stdin null x report the problem x check io stdin stdin eof not ok x x x look for the newline x length strlen buf x if buf length n x int eatchar the char being eaten x x no newline found line must be too long eat the rest of the line x do x eatchar fgetc stdin x while eatchar eof eatchar n x check io stdin stdin eof not ok x x report the situation x return x x x watch for long lines if needed x if maxcol length maxcol col len buf maxcol x report the situation x return x x x return length x return length x x x x output till dot output a set of lines until by itself is read x x this routine will read a set of lines until but not including x a single line with is read the format of the output is x x leader tfirst line x tnext line x tnext line x x x this routine will not return if i o error or eof x xvoid xoutput till dot output oname leader x file output entry s output file stream x char oname name of the output file x char leader the lead text for the first line x x char buf bufsiz input buffer x int count lines read x int done false true finished reading input x x instruct the user on how to input x printf nto end input enter a line with a single period n x x read lines until or eof x count x while done x issue the prompt x printf s t count leader x fflush stdout x x get the line x if get line buf bufsiz max col x printf nline too long please re enter n t x continue x x x note if was read x if strcmp buf n x done true x x x write line if we read something x if done x fprintf output s t s count leader buf x check io output oname eof not ok x x x x if no lines read at least output something x if count x fprintf output s t n leader x check io output oname eof not ok x x return x x x x col len determine the highest that a string would reach x x given a string this routine returns that a string would reach x if the string were printed at column tab stops are assumed x to start at x xint xcol len string x char string the string to examine x x int col current column x char p current char x x scan the string x for col p string p p n p x note the column shift x col p t col col x x if p n x col x x x return the highest column x return col x x x x check io check for eof or i o error on a stream x x does not return if eof or i o error x xvoid xcheck io stream name eof ok x file stream the stream to check x char name the name of this stream x int eof ok eof ok or eof not ok x x test for i o error x if ferror stream x fprintf stderr s error on s program name x perror x exit x x test for eof x else if eof ok eof not ok feof stream x fprintf stderr s eof on s n program name x exit x x return x x x x uuencode uuencode a file x x perform the uuencoding process identical to the process performed x by the uuencode utility x x this routine implements the algorithm described in the uuencode x bsd reno man page x xvoid xuuencode output oname infile iname umode uname x file output output file stream x char oname output filename x file infile input file stream x char iname input filename x int umode the mode to put on the uuencode file x char uname name to put on the uuencode file x x char buf uuencode len the uuencode buffer x int read len actual number of chars read x int val bit chunk from buf x char filler filler uuencode pad text x char p x x x output the initial uuencode header x x fprintf output begin o s n umode uname x check io output oname eof not ok x x x clear out the input buffer x x for p buf p buf sizeof buf sizeof buf p x p x x x x we will process uuencode len chars at a time forming x a single output line each time x x while read len fread buf sizeof buf uuencode len infile x x x the first character is the length character x x fputc uuencode read len output x check io output oname eof not ok x x x we will convert bits at a time thus we will convert x sets of bits into sets of uuencoded bits x x for p buf read len read len p x x bits to x val p x f x fputc uuencode val output x check io output oname eof not ok x x bits to x val p x p x f x fputc uuencode val output x check io output oname eof not ok x x bits to x val p x c p x x fputc uuencode val output x check io output oname eof not ok x x bits to x val p x f x fputc uuencode val output x check io output oname eof not ok x x x end of uuencode len line x fputc n output x check io output oname eof not ok x x x clear out the input buffer don t depend on bzero or memset x x for p buf p buf sizeof buf sizeof buf p x p x x x x check the last read on the input file x check io infile iname eof ok x x write end of uuencode file x fprintf output c nend n uuencode filler x check io output oname eof not ok x shar eof chmod mkentry c echo restore of mkentry c failed set wc c mkentry c wc c if test wc c then echo original size current size wc c fi obfuscate info echo x extracting obfuscate info text sed s x shar eof obfuscate info x obfuscated contest information x xcopyright c landon curt noll larry bassel xall rights reserved permission for personal education or non profit use is xgranted provided this this copyright and notice are included in its entirety xand remains unaltered all other uses must receive prior permission in writing xfrom both landon curt noll and larry bassel x xthe international obfuscated c code contest ioccc in the sprit of xco operation is willing mention other programming contents as space xpermits x xhow to have your contest included in this file x x if you wish the ioccc judges to include your contest in this file x send a request to x x judges toad com x x we request that contest descriptions be limited to lines and to x not exceed bytes we typically request that your contest x include a current description of the ioccc x x in order to be included in this file for given year we must x receive a current description no earlier than jan utc and x no later than feb utc agreement to publish your x contest must also be obtained prior to feb annual contests x that fail to submit a new entry will be dropped from this file x xofficial disclaimer pardon the officialese x x the contents noted below other than the ioccc are not affiliated x with the ioccc nor are they endorsed by the ioccc we reserve the x right to refuse to print information about a given contest x x the information below was provided by the particular contest x organizer s and printed by permission please contact the x contest organizer s directly regarding their contents x xwith that official notice given we present for your enjoyment the following xinformation about contents x x x x th international obfuscated c contest x x the original obfuscated contest x x obfuscate tr v cated cating cates a to render obscure x b to darken to confuse their emotions obfuscated x their judgment llat obfuscare to darken ob intensive x lat fuscare to darken fuscus dark obfuscation n x obfuscatory adj x x goals of the contest x x to write the most obscure obfuscated c program under the rules below x to show the importance of programming style in an ironic way x to stress c compilers with unusual code x to illustrate some of the subtleties of the c language x to provide a safe forum for poor c code x x the ioccc is the grandfather of usenet programming contests since x this contest demonstrated that a program that simply works x correctly is not sufficient the ioccc has also done much to add x the arcane word obfuscated back into the english language x see the new hacker s dictionary by eric raymond x x you are strongly encouraged to read the new contest rules before x sending any entries the rules and sometimes the contest email x address itself change over time a valid entry one year may x be rejected in a later year due to changes in the rules the typical x start date for contests is in early march contest rules are normally not x finalized and posted until the beginning of the contest the typical x closing date for contests are in early may x x the rules and the guidelines may and often do change from year to x year you should be sure you have the current rules and guidelines x prior to submitting entries to obtain them send email to the address x above and use the subject send rules x x one may obtain winners of previous contests to date via ftp from x x host ftp uu net x user anonymous x pass yourname yourhost x dir pub ioccc x x as a last resort previous winners may be obtained by sending email x to the above address please use the subject send year winners x where year is a single digit year a year range or all x x x x th international obfuscated perl contest x by landon noll larry wall x x this content is being planned someday when landon larry are not too x busy they will actually get around to posting the first set of rules x x landon says yes i know that i said we would have a contest in x but other existing projects got in the way hopefully x something will be developed after nov x x x x nd international obfuscated postscript contest x jonathan monsarrat jgm cs brown edu x alena lacova alena nikhef nl x x a contest of programming skills and knowledge exclusively for the x postscript programming language its purpose x x to spread knowledge of postscript and its details x to applaud those with the best tricks x to prove that humans can beat those damnable machine generators at x their own game by writing the most obscure and mysterious postscript x programs ever x x winners will receive the fame and attention that goes with having their x program entry posted as a winner to programmers world wide x x the contest rules and results are available by ftp as x wilma cs brown edu pub postscript obfuscated shar or individually x in the obfuscated directory the judges will post the rules x in november to comp lang postscript on usenet and other places x send questions to jgm cs brown edu x x categories include best obfuscated postscript best artwork x most compact best interactive program most useful and x anything so unusual and creative that it deserves an award x x the judges will choose the winners of each category x x alena lacova is a system administrator at nikhef institute for high x energy and nuclear physics in the netherlands she is the author of x the postscript chaos programs which draw julia sets mandelbrot sets x and other kinds of fractal functions x x jonathan monsarrat is a graduate student from mit and brown university x in the u s a he is the faq maintainer for the usenet newsgroup x comp lang postscript and the author of the postscript zone and lametex x x shar eof chmod obfuscate info echo restore of obfuscate info failed set wc c obfuscate info wc c if test wc c then echo original size current size wc c fi exit sunnyvale residents vote landon noll for sunnyvale city council seat
2,819
comp.windows.x
re problem with xvertext package in article mar sierra com dkarr sierra com david karr writes i might have a need in the future to display rotated text i noticed the xvertext package on the net it looks very good but it has one slight problem the api to it assumes you have a font name not an already loaded font it shouldn t be too difficult to split up the function into two interface routines one with a font name and one with an xfontstruct but i thought i would ask the author alan richardson mppa uk ac sussex syma first in case he was planning this already unfortunately his email address bounced does alan r or the current maintainer of xvertext see this the e mail address you mentioned above is for use with the u k as you know the brits do everything backwards so the real address from the states is mppa syma sussex ac uk give it a try harvard ucbvax uwvax astroatc ftms brown or uu psi com ftms brown rutgers internet brown wi extrel com or ftms brown astroatc uucp cs wisc edu
2,820
comp.windows.x
re gadgets vs widgets motif managers take a very simplistic approach to the way they handle events for gadgets they track for all events such as motion notify wether or not the gadget expresses interest in the events as a result gadgets typically generate a great deal more network traffic those with x terminals might find a noticable network performance drop as a result really what s the point using gadgets then it is a case of memory vs network performance tradeoff gadgets save both client and server memory but memory is easily expandable while network performance is not so if i were designing motif i would at least make it possible to avoid using gadgets at present you really don t have a choice because motif forces you to use gadgets in menus and in various other places adrian nye o reilly and associates inc i ve been using the xmgraph widget that s been floating around and i noticed the performance is significantly better using gadgets perhaps even faster i had heard in an old programming course that gadgets were no longer any benefit to performance and that it s just as well to use widgets everywhere so why would pushbutton gadgets be a lot quicker than pushbuttons in the graph should i start putting gadgets back into my long pulldown menus xmgraph manages children connected by xmarc widgets in a directed network type graph with automatic layout capability bill schlumberger geco prakla internet kayser delft sgp slb com
2,821
comp.windows.x
re trouble compiling x r on sunos epstein trwacs fp trw com jeremy epstein writes dmm head cfa harvard edu david meleedy writes description of compiling problems deleted gcc fpcc struct return o bmtoa bmtoa o o funroll loops l lib xmu lxmu l lib xt l extensions lib l lib x l afs cfa syste m sun c usr head lib x x r ld undefined symbol xgetvisualinfo xfree xinternatom etc there s a bug in sunos which is alluded to in the faq although there it s talking about x r as being affected you need to force libxmu to be linked statically rather than dynamically which works around the linker error the simplest thing to do is edit each of the makefiles where there s a failure and change the line which reads xmulib l xmusrc lxmu to xmulib l xmusrc bstatic lxmu bdynamic no this is only relevant for openwindows x as shipped with sunos it is not relevant for mit r mit r should compile without problems casper
2,822
comp.windows.x
re help building x r with gcc in article apr etrog se citri edu au tim kimba catt citri edu au tim liddelow writes can people please send me any hints on building x r with gcc is there any pitfalls to be avoided any hints i would appreciate hearing other peoples stories on this i have been building x with gcc since and the only time i had trouble was when the position independant code option broke so i couldn t use gcc to build sun shared libraries the important thing to do is to follow the tips given in the gcc release gcc generates code that requires libgcc and you should take that into account when deciding which compiler to use for the libraries michael salmon include standard disclaimer include witty saying include fancy pseudo graphics ericsson telecom ab stockholm
2,823
comp.windows.x
getting pseudo tty in x motif hi i am about to write an application in x motif that will require the embedding of a pseudo tty so before i re invent the wheel has anyone written gotten a motif widget that does the job otherwise i would appreciate any pointers to make such a beast my environment is x r motif and x r motif if this helps thanks in advance arthur lim email arthur mailhost scs com sg
2,824
comp.windows.x
experiences of desqview x i need to have pcs and sparcstations run the same application namely microsoft project the original system ran on the pc now it needs to be expanded to allow unix users to work with the application the current proposal is to use desqview x as a display server for the application i would like to know your experiences with using desqview x to run an application on a pc and displaying on a sparcstation i ve heard that the network traffic is slow replies only by e mail please thanks in advance o willie willie wilson analog com
2,825
comp.windows.x
re teleuse uim x and c does anyone have any good ideas on how to integrate c code elegantly with teleuse uim x interface architect generated code source would be great but any suggestions are welcome it s my understanding that the next release of uim x due out last february has full support for c i use xdesigner which does not have the interpreter or ui meta languages of these other tools but does fully support c code generation reusable templates via c classes which are generated a variety of other handy features for using c and layout functions in different ways and generates motif code including drag n drop internationalization etc fits in quite nicely with doug young s paradigm for c motif available in the us from vi corp in europe from imperial software london see faq for details bill schlumberger geco prakla kayser delft sgp slb com
2,826
comp.windows.x
re private colormaps widget creation you are right in supposing that the problem is with the xmncolormap xtncolormap for truly literate beings not being set what you want to do is start your application with your new colormap this can be a chicken and egg sort of problem however if you look at the xt faq there is an example that should show how it can be done if not let me know and maybe i can improve the example pete pete ware ware cis ohio state edu cis dept ohio state university w bolz hall neil ave h columbus oh
2,827
comp.windows.x
xtshellstrings xtstrings hello does somebody know the functions xtshellstrings and xtstrings i haven t found them in any librarys not xm xt nor x and i need them to install a tool any hints greatly appreciated please reply via e mail thanks in advance christian wilk i ve seen things you people wouldn t believe technical university of munich attack ships on fire off the shoulder of orion munich germany i watched c beams glitter in the dark near the tannhauser gate all those moments will be lost wilk informatik tu muenchen de in time like tears in rain time to die roy batty
2,828
comp.windows.x
re xtshellstrings xtstrings in article apr informatik tu muenchen de wilk informatik tu muenchen de christian wilk writes hello does somebody know the functions xtshellstrings and xtstrings i haven t found them in any librarys not xm xt nor x and i need them to install a tool any hints greatly appreciated please reply via e mail they aren t functions they are character arrays the standard strings are either defined as string constants or character pointers into xtshellstrings and xtstrings determined by xtstringdefines your libraries were compiled with this defined and your application with it undefined so simply recompile one or the other it is probably worth adding dxtstringdefines to your cflags michael salmon include standard disclaimer include witty saying include fancy pseudo graphics ericsson telecom ab stockholm
2,829
comp.windows.x
xbell i have a program produces a continuous tone by calling xbell repeatedly at an interval equal to the duration of the bell if it is run more than once on a display the tones are buffered in the x server and the tone contunues after all occurrences of the program have exited is there a convenient way of preventing this e g by emptying the x server bell buffer when each program exits disclaimer please note that the above is a personal view and should not be construed as an official comment from the jet project
2,830
comp.windows.x
re honors degrees do they mean anything in article tkld apr burns cogsci ed ac uk tkld cogsci ed ac uk kevin davidson writes in my opinion a programming degree is still worth having yes but a cs degree is not a programming degree does anybody know of a computing course where programming is taught computer science is a branch of maths or the course i did was i ve also done a software engineering course much more practical and likely to be the sort of thing an employer really wants rather than what they think they want but also did not teach programming the ability to program was an entry requirement at robert gordon university programming was the main most time consuming start of the course the first two years consisted of five subjects software engineering pascal c unix computer engineering assembler computer theory lisp prolog mathematics statistics and communication skills how to pass interviews intelligence tests and group discussions e g how to survive a helicopter crash in the north sea the third year industrial placement was spent working for a computer company for a year the company could be anywhere in europe there was a special travel allowance scheme to cover the visiting costs of professors the fourth year included operating systems c modula software engineering c assembler real time laboratory c assembler and computing theory lisp there were also group projects in nd and th years where students worked in teams to select their own project or decide to work for an outside company the only disadvantage being that specifications would change suddenly in the first four years there was a weighting between courseworks and exams for most subjects however in the honours year this was reduced to a split between an individual project and final exams no coursework assessment are all computer science courses like this btw we started off with students in our first year and were left with by honours year also every course is tutored separately not easy trying to sleep when you are in student class cheers michael michael s a robb tel the problem with bolt on software engineer fax software is making sure the spider systems limited e mail bolts are the right size edinburgh eh ng michaelr spider co uk anonymous
2,831
comp.windows.x
comp windows x frequently asked questions faq archive name x faq part last modified subject where can i get an x based plotting program these usually are available from uucp sites such as uunet or other sites as marked please consult the archie server to find more recent versions gnuplot x xplot postscript and a bunch of other drivers export lcs mit edu and elsewhere contrib gnuplot tar z gl plot x output only comp sources unix volume graph yallara cs rmit oz au pub graph tar z comp sources unix volume pdraw drawplot d and d x ps scam berkeley edu src local dplot tar z scam berkeley edu src local contour tar z scam berkeley edu src local drawplot tar z uunet ftp contrib drawplot tar z xgraph plot zoom outputs ps or hpgl shambhala berkeley edu pub xgraph tar z sun ruf uni freiburg de x contrib xgraph tar z nisc jvnc net pub xgraph tar z comp sources x volume or many other sites ace gr formerly xvgr and xmgr xy plotting tools ftp ccalmr ogi edu xview version ccalmr pub acegr xvgr tar z motif version ccalmr pub acegr xmgr tar z mirrored on export in contrib acegr xgobi an interactive dynamic scatter plotting tool from bellcore lib stat cmu edu general xgobi log in as statlib with your email as the password or send email to statlib lib stat cmu edu containing the one line message send xgobi from general information from debby swayne dfs bellcore com robot a scientific xview based graph plotting and data analysis tool ftp astro psu edu pub astrod robotx tar z plotmtv a multi purpose d d plotter tanqueray berkeley edu pub plotmtv tar z thanks in part to emv ox com ed vielmetti geoff veritas com geoffrey leach paul a scowen uk spacsun rice edu black beno css gov mike black subject where can i get an x based spreadsheet a version of sc for x and which supports lotus files is available from vernam cs uwm edu in xspread tar z it also includes graphing functions information soft eng cs uwm edu the gnu package oleo is available in prep ai mit edu pub gnu oleo tar z it can generate postscript renditions of spreadsheets also several of the below are part of integrated office productivity tools which may also include word processing email conferencing image processing and drawing painting among other features vendor product contact information access technology informix wingz quality software products q calc exclaim ca unipress q calc uniplex uniplex digital decdecision digital applix aster x applix ais xess info ais com bbn software products bbn slate slate offer bbn com elsid software systems ripcam sas by the sas institute now has a spreadsheet module the x version is available on the current popular risc platforms subject where can i get x based project management software vendor product contact information productivity solutions ultra planner quality software products masterplan version sales qsp com digital tools inc autoplan nasa compass service cossack cosmic uga edu gec marconi software systems gecomo plus gec marconi software systems size plus tei inc vue mantix cascade advanced management solutions schedule publisher auburn university thanks to pete phillips pete egh qc co uk thanks to atul chhabra atul nynexst com subject where can i get an x based postscript previewer ghostscript is distributed by the free software foundation and includes a postscript interpreter and a library of graphics primitives version is now available the major site is prep ai mit edu gspreview by the computing laboratory of the university of kent at canterbury is an x user interface wcl based to the ghostscript interpreter the source is available for anonymous ftp from export lcs mit edu as gspreview tar z ghostview by tim theisen tim cs wisc edu is full function user interface for ghostscript check ftp cs wisc edu or prep ai mit edu for pub ghostview tar z there are also several executables available on ftp cs wisc edu pub x ghostview exe for various architectures also scriptworks is harlequin s software package for previewing and printing postscript r descriptions of text and graphics images previewers for x are available for information call or send email to scriptworks request harlqn co uk image network s xps supports the full postscript language and renders in color grayscale or monochrome fonts displayed are anti aliased info image network digital s dxpsview runs on uws and sun s pageview runs with the x news server subject where can i get an x based gks package the latest freely available xgks can be obtained from xgks request unidata ucar edu this is a c implementation derived from the x r contrib xgks from ibm and the university of illinois the release is on unidata ucar edu as pub xgks tar z in addition grafpak gks is available from advanced technology center gksul is available from gks ulowell edu ulowell cs department it is a b implementation which includes drivers for a variety of devices it can be passed an x window id to use the package includes both c and fortran bindings from dsrand mitre org and from stew hanauma stanford edu an xgkswidget is produced by neil bowers neilb leeds dcs neilb dcs leeds ac uk the latest conforms with the new version of xgks it is available on export in contrib xgks widget tar z subject where can i get an x based pex package the first official release of pex is with x r fix brings the sample implementation server to version the final pex protocol specification is now available via anonymous ftp to export lcs mit edu in the directory pub docs pex changes made from the public review draft are listed in the file p changes in that directory the final pexlib document is on export in pub docs pexlib there is now available from the university of illinois an implementation of the pex specification called uipex it contains a near complete implementation of phigs and phigs plus the file pub uipex uipex tar z is on a cs uiuc edu the porting platform was an rt running questions and comments can to go uipex cs uiuc edu in addition the pext toolkit by rich thomson rthomson dsd es com is available on export as pext tar z it includes a pex widget making it easier to include pex in xt based programs subject where can i get an x based tex or dvi previewer the xtex previewer for tex files is available from a number of archive sites including uunet the current version is usually on ftp cs colorado edu in seetex tar z pre converted fonts are also on that machine the distribution all includes mftobdf which converts pk gf and pxl fonts to bdf format where they can then be compiled for use by your local x server the xdvi dvi previewer is fairly comprehensive and easy to use it is also available from a number of sites including uunet and export lcs mit edu current version is patchlevel subject where can i get an x based troff previewer x r has two previewers for device independent troff the supported client xditview and the contributed but well maintained xtroff an earlier version of xtroff also appeared on the r contributed source xditview is also in the r distribution in addition the xman client can be used to preview troff documents which use the man macros i e man pages if psroff is used its output can be viewed with a postscript previewer in addition xproof an x previewer for ditroff has been contributed by marvin solomon solomon cs wisc edu version is available on export in contrib xproof elan computer group ca produces eroff a modified troff implementation and elan express an x eroff previewer softquad usa only mail sq uu net or mail sq com offers softquad publishing software including a substantially rewritten troff formatter a better intermediate language with backwards compatibility and an x r r previewer this is the package adopted by at t s own mis department and used in and re sold by many parts of at t information from ian darwin softquad ian sq com image network toxroff ca offers the xroff package which includes a fine modified troff implementation and a set of x based page previewers this is the package oem ed by several hardware vendors mostly courtesy moraes cs toronto edu mark moraes subject where can i get a wysiwyg interface builder a new release of the dirt interface builder by richard hesketh works with x r and includes some support for the motif widget set from the readme this builder allows the interactive creation and rapid prototyping of x user interfaces using the x toolkit and a number of widget sets dirt generates wc widget creation resource files and this distribution also includes the widget creation library version with the exception of the demos and mri ari source code with the kind permission of its author david e smyth check dirt readme dirt a tar z and dirt ps z on export lcs mit edu the interviews c toolkit contains a wysiwig interface builder called ibuild ibuild generates code for an interviews application complete with imakefile and an x resource file documentation is pub papers ibuild ps on interviews stanford edu quest windows s objectviews c package includes an interactive building tool druid demonstrational rapid user interface development runs on sparc machines using osf motif it is intended eventually to be a full uims but apparently now has only support for creating the presentation components for which it generates c uil code info singh g kok ch ngan ty druid a system for demonstrational rapid user interface development proc acm siggraph symp on user interface software and technology uist acm ny pp the byo interface builder is implemented in tcl also in addition these commercial products unsorted are available in final or prerelease form the following the product name indicates that the product is known to allow the designer to specify for each widget whether a particular resource is hard coded or written to an application defaults file for at least one form of output some are much more than user interface tools some are full user interface management systems information on most is not up to date product name look feel code output vendor hp interface motif c xm hp visual edge architect uimx open look express open look c xol helper lib at t visual edge uimx motif c xm helper code visual edge distributors vuit motif c uil r w dec digital x designer motif c xm c uil imperial software technology ltd sales ist co uk xfacemaker xfm motif c c script c like procedural language c uil nsl requests nsl fr builder xcessory motif c xm c uil r w ics ada info ics com xbuild motif c xm c uil nixdorf xbuild nixdorf com ixbuild motif c xm c uil ixos software karl ixos uucp teleuse motif c xm c uil r w telesoft gui info telesoft com ezx motif c xm helper lib c uil ada sunrise info sunrise com snapix motif c xm adnt openwindows developers open look gil c xview sun guide gil c xview gil c olit gil c postscript for tnt exocode sxm motif c xm expert object exocode plus open look xview tae xw motif c xw xm c tcl tae control language like uil needs helper library vax fortran ada c nasa goddard mob xsculptor motif openlook c xm uil c xol kovi psm pm msw c uil lancorp motif mac pty ltd fax australia motifation motif c xm aka edv fax uib open look motif c oi parcplace look for magazine reviews for more complete comparisons of meta file formats documentation real ease of use etc unix world and unix review often carry articles in addition neuron data makes open interface a window system independent object toolkit which supports interfaces which are or resemble supersets of mac windows and motif and open look the package includes an interface builder in addition the grammi builder supports the development of ada x applications using its own set of objects which are planned to have a motif look grammi is written in ada and generates ada specs and stub bodies grammi in addition these non wysiwyg but related products may help for goals of rapid prototyping of the application interface wcl the widget creation library basically describes the widget hierarchy and actions in a resources file available from fine archive servers everywhere including devvax jpl nasa gov in pub wcl provides a very thin layer over xt without any internal tweaking version is current winterp an xlisp based motif toolkit allows for interpretive programming the copy on the r tape is outdated get a copy off export or email to winterp source hplnpm hplabs hp com the serpent uims permits the building of user interfaces without specific knowledge of coding but with an understanding of attributes being set on a particular motif widget beta release is available from ftp sei cmu edu and can be found in pub serpent serpent is also available on export lcs mit edu in contrib serpent email questions can go to serpent sei cmu edu a commercial version of serpent is available as agora from aset woodhaven drive pittsburgh pa garnet is a common lisp based gui toolkit information is available from garnet cs cmu edu metacard is a hypertext rapid application development environment similar to apple claris corporation s hypercard info metacard com metacard is available via anonymous ftp from ftp metacard com csn org or subject where can i find x tools callable from shell scripts i want to have a shell script pop up menus and yes no dialog boxes if the user is running x several tools in the r contrib area were developed to satisfy these needs yorn pops up a yes no box xmessage displays a string etc there are several versions of these tools few if any have made it to the r contrib area though they may still be available on various archive sites in addition richard hesketh rlh ukc ac uk has posted the xmenu package to comp sources x v i xmenu for of n choices two versions of xprompt have been posted to comp sources x the latter being an unauthorized rewrite r forsman thoth reef cis ufl edu there is a version of xmenu available from comp sources x it is being worked on and will likely be re released xp tar z xpick tar z and xzap tar z on export s contrib are tools by gerry tomlinson newcastle ac uk which act as x versions of the simple display and choice making tools in k p xtpanel lets the user build a panel containing interactive objects such as buttons sliders text fields etc either from the command line or using a simple scripting language it is available for anonymous ftp from hanauma stanford edu as pub x xtpanel tar z and may also be found in the alt sources archives subject where can i get an x based debugger xdbx an x interface to the dbx debugger is available via ftp from export the current version is patchlevel an x interface to gdb called xxgdb is more like xdbx it is part of comp sources x volume xxgdb tar z is on export mxgdb is a motif interface to gdb by jim tsillas jtsillas bubba ma bull com version was released ups is a source level debugger which runs under the x and sunview window systems on sun and dec platforms it is available from export as contrib ups tar z also ups to patch z and unix hensa ac uk in pub misc unix ups or try mail to archive unix hensa ac uk unofficial fixes by rod armstrong rod sj ate slb com are on unix hensa ac uk in misc unix ups contrib rod sj ate slb com also mips produces a highly customizable wcl based visual debugger you should be able to use sun s dbxtool with its x news server the codecenter source level debugger available on most major platforms includes an x based interface at t offers the examine graphical interface an x interface to dbx and c dbx for sun and sun and sdb and sdb for and b platforms call or contact examine mvuxi att com for more information solbourne offers pdb its x based debugger for c c and fortran pdb uses the oi toolkit and runs in either open look or motif mode sco info sco com offers dbxtra as part of several development systems lucid s energize programming system a tightly integrated development environment for c and c programs incorporates a graphical user interface on top of an extended version of gdb info lucid info lucid com or subject how can i tee an x program identically to several displays there are several protocol multiplexer tools which provide for the simultaneous display of x clients on any number of machines xmx an x protocol multiplexor is available from wilma cs brown edu as pub xmx tar z it works independently of the server and does not affect the application being shared it was developed for use in the electronic classroom xtv is a conference program which can be used to duplicate the chalkboard on several displays release is available on the x r contrib tapes a more recent version is on ftp cs odu edu as pub wahab xtv r tar z shx from michael altenhofen of digital equipment gmbh cec karlsruhe also does this it is a wysiwis what you see is what i see package in the context of a computer based learning training tool to provide online help from remote tutors but is also useful for general window sharing information shx nestvx enet dec com shx can be found on export and gatekeeper dec com pub x contrib shx tar z crl dec com pub x contrib shx tar z modifications to shx for color mapping and private color allocation by mark j handley m handley cs ucl ac uk are on cs ucl ac uk in car shx car tar z xtrap is implemented as a server library extension and can be used to record and then replay an x session it is available as gatekeeper dec com pub x contrib xtrap v tar z export lcs mit edu contrib xtrap v tar z wscrawl can be used as a multi person paint program it s available on sax stanford edu as wscrawl shar z shdr implements a simple shared whiteboard without a chalk passing mechanism it s available on parcftp xerox com as pub europarc shdr tar z sketchpad is a distributed interactive graphical editor particularly designed for sketching sources have been posted to alt sources and are available from ftp igd fhg de in ftp incoming sketchpad the nestor project is described in upgrading a window system for tutoring functions michael altenhofen et al the proceedings of the exug conference also of use hewlett packard co has a commercial product hp sharedx which works under hp ux currently on their and series workstations and their hp rx x stations machines receiving shared windows can be any x server hp sharedx consists of a server extensions and a motif based user interface process contact your local hp sales rep for more information ibm offers a commercial product sun offers multi user confering software called showme insoft mechanicsburg pa usa offers multi user confering software called communique thanks in part to scott spectra com tim scott and to peter cigehn peter lulea trab se subject topic building the x distribution topic needs updating to r subject what s a good source of information on configuring the x build this faq includes information on a number of gotchas that can bite you on particular system however the best source of general information on building the x release is found in the release notes the file is bundled separately from the rest of the release so if it s become separated from your sources you can ftp another copy separately the file relnotes ms ps txt at the top of the distribution the file relnotes is also available from the xstuff mail server in addition o reilly associates s volume on x administration includes information on configuring and building x subject why doesn t my sun with a cg work with r apparently gcc is the problem it seems to produce fine code for all sun displays except for the cgsix the new sungx o distributed with fix may fix the problem note not known to work on solaris subject why doesn t my sun with sunos know about dlsym etc if you get errors with dlsym dlopen dlclose undefined link with libdl a add ldl to your and eventually your site def you may want to surround it with bstatic ldl bdynamic if you add it to the extra libraries variable since syslibs get added after extra libraries on the eventual compilation command otherwise you may not have a shared libdl or compile the stubs shared thanks to joe backo joe backo east sun com subject what is this strange problem building x clients on sunos in sunos sun fixed a shared library bug in ld which conflicts with the way x r builds the shared xmu library causing these symbols to be undefined when building some x clients get wmshellwidgetclass get applicationshellwidgetclass compiling bstatic lxmu bdynamic appears to work to solve the problem if you are using openwindows x r based xt please contact your local sun office and request the following patches patch i d description x openwindows libxt jumbo patch x openwindows undefined symbols when using shared libxmu greg earle earle sun com a source patch for use with the mit x r libraries was developed by conrad kimball cek sdc boeing com it retrofits into r some fixes made in r to get around this problem the patch is on export in contrib x r sunos patch version z subject why can t gcc compile x r on my sparc i used gcc to compile the whole distribution but i get several segmentation faults when running x note first that gcc on risc machines does not necessarily result in any performance increase it certainly is not as noticeable as it is on the x or vax platforms here is the problem gcc and cc use incompatible methods of passing structures as arguments and returning them as function values so when gcc compiled parts of x are linked with sun supplied functions that pass or return structs run time errors occur affected programs include rgb and the server this is from the gcc manual on the sparc gnu cc uses an incompatible calling convention for structures it passes them by including their contents in the argument list whereas the standard compiler passes them effectively by reference this really ought to be fixed but such calling conventions are not yet supported in gnu cc so it isn t straightforward to fix it the convention for structure returning is also incompatible and fpcc struct return does not help you can duck the problem either by using cc throughout or by using it for just the routines which cause incompatibilities the problem cannot be solved with compilation flags files which need to be compiled using cc include server os bsd oscolor c rgb rgb c in addition several of the inet functions use structs as args or return values clients xhost xhost c clients xauth gethost c calls to inet addr in lib clx socket c and lib x xconndis c are possibly harmless as they don t involve structs collected by bashford scripps edu don bashford subject what are these i o errors running x built with gcc when i try to run xinit or the xsun server i get the error getting interface configuration operation not supported on socket fatal server bug no screens found running the gcc fixincludes script apparently didn t work you can do this simple test include sys ioctl h siocgifconf run that through cc e and gcc e the last line of output is the piece of interest it should be identical modulo irrelevant differences like whitespace if the gcc version has x where the cc version has i your fixincludes run didn t work for some reason or other go back to your gcc sources and run fixincludes then rebuild the x distribution if they are identical try running a make clean in mit server and rebuilding just to make sure everything gets compiled with the proper include files courtesy der mouse mouse larry mcrcim mcgill edu subject what are these problems compiling x r on the older sun in mit server ddx sun suncg c c we have found missing defines for cg ac monolen cg bc monolen cg ac enblen cg bc enblen what should these be the r errata list distributed after x r mentions that you can add these lines to the file on older sunos versions e g to compile define cg ac monolen define cg ac enblen cg ac monolen define cg bc monolen cg ac monolen define cg bc enblen cg ac monolen however the sun should not actually ever have the cg device and so references to it can be removed from mit server ddx sun suninit c and the imakefile subject what are these problems compiling the x server on sunos the file sundev cg reg h isn t being found sun omitted sundev cg reg h from sunos remove the include from suncg c c and replace it with the line define cg vaddr color x the file has changed from earlier versions of sunos and should not be copied from another distribution subject what are these problems using r shared libraries on sunos all of the executables that i try to run have the following results ld so libxmu so not found or even ld so call to undefined procedure gethostname from xf a c if you are building with shared libraries on a sun remember that you need to run ldconfig as root after installing the shared libraries if you ve installed x on a file server run it on the server s clients too while building and installing the distribution you need to be careful to avoid linking against any existing x shared libraries you might have e g those distributed with openwindows you should make sure you do not have ld library path set in your environment during the build or the installation if you are going to keep xterm and xload as setuid programs please note that the shared libraries must be installed in usr lib usr local lib or usr lib for these programs to work or else those programs must be linked statically courtesy mit x consortium note also that the program mkfontdir is run as part of the build it attempts however to use the shared libraries before they have been installed you can avoid the errors by building mkfontdir statically pass bstatic to most c compilers subject can olit programs run with r xt xtqstring undefined this is a bug in the olit xtqstring was an external symbol that existed in x r upon which ow s libxt is based it wasn t documented and was removed in x r mit s guarantee of upward compatibility between the r and r libraries only applied to the documented interface a workaround is to temporarily set your ld library path to point to the x r or openwindows xt library that you linked the program against from barry margolin barmar think com from jeff francis jpf heliocentric com subject how do i get around the sunos security hole there is a security problem with certain r clients xterm and xload running under sunos that have been installed setuid root and are using shared libraries to avoid the problem do one of these make the program non setuid you should consult your system administrator concerning protection of resources e g ptys and dev kmem used by these programs to make sure that you do not create additional security problems at your site relink the programs statically using bstatic install the libraries before linking and link with absolute paths to the libraries from rws expo lcs mit edu bob scheifler the r version of xterm does this automatically by rebuilding xterm against the newly installed libraries when xterm is being installed this prevents an suid program from being built with libraries specified relatively note that this may cause an inconvenience when doing the installation from nfs mounted disks xload has been rewritten to avoid the problem subject how do i get around the frame buffer security hole on many systems the frame buffer is unsecured by default this permits anyone who can log into your workstation to peek at your windowing session by accessing the frame buffer directly or as less of a privacy issue but perhaps more annoying to accidentally start up a second x session on your console display check the man page for fbtab thanks to art mulder art cs ualberta ca subject topic building x programs subject what is imake imake is not a replacement for the make program instead it is a makefile generator that takes advantages of the include file and macro processing capabilities of the c preprocessor cpp to generate makefiles suitable for building software on a particular system although it is not specific to x the x release uses it to help solve a number of the configuration issues that arise in making such a large system widely portable imake has a fairly steep learning curve in part because the process by which the system specific configuration files system independent configuration files and individual imakefiles are melded to produce a makefile is not obvious there have been several different versions of imake the r r and r versions are different you can obtain information on imake from these sources the r and r release notes and imake man page include information on using imake to build x the r and r file mit config readme also contains useful information on the r tapes contrib doc imake imake tex is mark moraes r r guide to imake the r mit doc config usenixws paper ms contains a paper by jim fulton on an early version of imake paul dubois dubois primate wisc edu has written a useful explanation of how imake works and how to use it in configuring x for non supported systems the document is available from ftp primate wisc edu in the directory ftp pub imake stuff look for config x r ms troff and config x r ps postscript some supplemental appendices are nearby document version is now these imake papers are available by email mail a message body of send imake stuff help to almanac primate wisc edu see system administration imake friend of foe by dinah mcnutt in the november issue of sunexpert german readers should expect in june an article das meta make i make you make schwerelos by rainer klute in ix multiuser multitasking magazin directed at application programmers needing to write imakefiles an english language derivative of this article is in the x journal issue the o reilly x resource issue contains paul davey s article on demystifying imake alain brossard s working document full of tips on imake is in sasun epfl ch pub imakefile z subject where can i get imake versions are distributed with the r and r releases an earlier version is distributed with the x r release some third party toolkits redistribute versions of imake along with their own implementations of the template and configuration files there are no real standards for such configuration files although most current contributed software expects the templates distributed with x r export contains the r distribution unpacked so you can pick up imake without picking up the entire distribution a stand alone version of imake but one stemming from x r is in ftp germany eu net pub x misc imake imake pure tar z subject i have a program with an imakefile but no makefile what to do if you have r or r installed on your system run xmkmf this is a script which runs imake for you with the correct arguments the output is a makefile configured for your system and based on the imakefile then run make which will use that new makefile to compile the program subject why can t i link to the xlib shape routines when i try to compile certain programs i get the following link error undefined xshapequeryextension xshapecombinemask these routines are actually part of the shape extension to x shape which was introduced in the mit x r distribution and allows non rectangular windows like the other sample server extensions the shape extension will only run on a server which supports it pre x r servers as well as many vendor supplied servers do not support the shape extension in which case they will display rectangular windows anyway in order to use the shape extension you must link to the library libxext a in the x r distribution this library and the associated includes will be in the mit extensions directory if you do not have these files do not despair many freeware programs which use the shape extension can also be compiled without it by removing the dshape define from the makefile you can probably do this and compile successfully against your older vendor supplied x libraries from john b melby melby yk fujitsu co jp uunet uu net subject what are these problems with xtinherit not found on the sun when i run a x program that i wrote on a sunos or machine i get the error ld so symbol not found xtinherit what you are seeing is a side effect of a kludge in the r libxt a to get sun shared libraries working apparently you can t share a function that is both called and compared as xtinherit is this was handled by putting xtinherit in the same file as a function that is always used thereby guaranteeing that it would be loaded that is in initialize c where xttoolkitinitialize and xtinitialize reside these routines would normally be called you are probably seeing this error because your program is not a normal xt based program and does not call xttoolkitinitialize anywhere it may be a program that uses xt functions but never opens a connection to the x server osf motif s uil had this problem it called xtmalloc and other xt functions the solution is to add the call to your program the function does not have to be executed just linked in alternatively your program doesn t need any xt functions and is correct in not calling xttoolkitinitialize it may be an xlib or xview program in this case you can remove lxt from your link command it should not be necessary to link the shared libraries statically although this will certainly solve the problem from jordan hayes now jordan moorenet com and danny backx db sunbim be subject why can t i compile my r xaw contrib programs under the new x i have a program that worked well under x r when i try to link it under the current version of x i get this message undefined xtscrollbarsetthumb xttextsetinsertionpoint xttextreplace there were several name changes in the athena widget set in addition to the header files moving into x xaw these are mentioned in the r release notes in this case these functions are not really xt functions but are part of the xaw text widget and so have been renamed from xt to xaw subject topic programming problems and puzzles subject why doesn t my program get the keystrokes i select for sic the window manager controls how the input focus is transferred from one window to another in order to get keystrokes your program must ask the window manager for the input focus to do this you must set up what are called hints for the window manager if your applications is xlib based you can use something like the following xwmhints wmhints wmhints flags inputhint wmhints input true xsetwmhints dpy window wmhints if your application is based on the xt intrinsics you can set the xtninput resource to be true as you probably want to in any case if you don t have source you can start up the application with the resource input true certain window managers notably dxwm and olwm are very picky about having this done if you are using sun s openwindows olwm you can also add this resource to your defaults file to use clients that aren t icccm compliant openwindows focuslenience true mostly courtesy dave lemke of ncd and stuart marks of sun subject how do i figure out what window manager is running you can t reliably tell whatever mechanism you could use could be spoofed in any case for most cases you shouldn t care which window manager is running so long as you do things in an icccm conformant manner there are some cases in which particular window managers are known to do things wrong checking for particular hints placed on the window by the window manager so that you can sidestep the problem may be appropriate in these cases alternatively it may be appropriate to determine which window manager is running in order to take advantage of specific added features such as olwm s push pin menus in order to give your program added functionality beware of usurping the window manager s functions by providing that functionality even when it is missing this surely leads to future compatibility problems subject is there a skeleton x program available there is no general framework such as the transskel program for the macintosh which handles lots of the odds and ends and overhead of development under a window system and which can be used as a platform for additional development in x the problem is typically solved by using an interactive application builder tool or by using cut paste on existing x applications good applications which you might look to manipulate when you want to test just this one little thing include contrib clients xskel a simple r program that puts up a window and allows sketching in it and offers a starting point for quick hacks the xaw examples in the examples directory in the r and r distributions and the xlib hello world example in the r doc helloworld and r doc tutorials helloworld an updated version of this program which uses r xlib calls and current icccm conventions was posted in to comp windows x by glenn widener of tektronix in addition a sample xt program for xaw or xm by rainer klute showing how to open multiple displays and how to catch a broken display connection is available on export lcs mit edu in contrib mdisp tar z subject why does xtgetvalues not work for me sic the xtgetvalues interface for retrieving resources from a widget is sensitive to the type of variable your code may be doing something like this arg args int i int sensitive oops wrong data type i xtsetarg args i xtnsensitive sensitive i xtgetvalues widget args i but xtnsensitive is a boolean which on most machines is a single byte declaring the variable sensitive as boolean works properly this problem comes up often when using particular toolkits that redefine the xt types dimension and position code that assumes they are int will have similar problems if those types are actually short in general you are safe if you use the actual type of the resource as it appears in the widget s man page subject why don t xtconfigurewidget xtresizewidget xtmovewidget work you re probably trying to use these functions from application code they should be used only internally to widgets these functions are for a parent widget to change the geometry of its children other promising functions xtmakegeometryrequest and xtmakeresizerequest are also for use only by widgets in this case by a child to request a change from its parent the only way for your application to request a geometry change for a widget is to issue an xtsetvalues call setting some of the geometry resources although this will result in the widget internal functions being called your application code must use the standard xtsetvalues interface or risk the widgets data becoming corrupted the xlib calls xmovewindow and xresizewindow should similarly be avoided they shouldn t be used to change xtnx xtny xtnwidth or xtnheight subject why isn t there an xtreparentwidget call like xreparentwindow although there are various details of the current implementation of the xt internals which make reparenting difficult the major reason that no such call exists is that it remains undefined what the set of resources for the new widget should be resources are typically set based on the location in the instance hierarchy what resources should change if the instance moves what should happen to the widget s children and by the time such semantics are defined there would probably be little advantage over destroying the old widget and creating a new widget in the correct location with the desired resources as setting the resources correctly is the majority of work in creating a new widget note that reparenting is possible in the oi toolkit david b lewis faq craft uunet uu net just the faqs ma am joe friday david b lewis temporarily at but not speaking for visual inc day dbl visual com evening david craft uunet uu net
2,832
comp.windows.x
whole win on screen window placement on screen i would like to configure my system a hp unix to avoid that any corner of a given window is displayed outside of the visible screen the whole window should be visible and it should be impossible to move any window outside the visible aerea can this be done by configuring the window manager s resources can this be done on applikation level a hardcoded solution is possible but is it possible to have a upper limit of a given window size thank you for information and help
2,833
comp.windows.x
comp windows x frequently asked questions faq archive name x faq part last modified subject i m writing a widget and can t use a float as a resource value float resources are not portable the size of the value may be larger than the size of an xtpointer try using a pointer to a float instead the xaw scrollbar float resources are handled in this way subject is this a memory leak in the x r xtdestroywidget yes this is the unofficial fix for the x r destroy c destroy c thu jul lib xt destroy c thu jul xconsortium destroy c v swick exp plus unofficial patches in revisions and copyright by digital equipment corporation maynard massachusetts int i destroyrec dr app destroy list while i app destroy count if dr dispatch level dispatch level widget w dr widget if app destroy count bcopy char dr char dr app destroy count sizeof destroyrec xtphase destroy w else i dr int i destroyrec dr while i app destroy count xtphase destroy can result in calls to xtdestroywidget and these could cause app destroy list to be reallocated dr app destroy list i if dr dispatch level dispatch level widget w dr widget if app destroy count bcopy char dr char dr app destroy count i sizeof destroyrec xtphase destroy w else i from donna converse converse expo lcs mit edu subject are callbacks guaranteed to be called in the order registered although some books demonstrate that the current implementation of xt happens to call callback procedures in the order in which they are registered the specification does not guarantee such a sequence and supplemental authoritative documents i e the asente swick volume do say that the order is undefined because the callback list can be manipulated by both the widget and the application xt cannot guarantee the order of execution in general the callback procedures should be thought of as operating independently of one another and should not depend on side effects of other callbacks operating if a seqence is needed then the single callback to be registered can explicitly call other functions necessary thanks to converse expo lcs mit edu subject why doesn t xtdestroywidget actually destroy the widget xtdestroywidget operates in two passes in order to avoid leaving dangling data structures the function call marks the widget which is not actually destroyed until your program returns to its event loop subject how do i query the user synchronously using xt it is possible to have code which looks like this trivial callback which has a clear flow of control the calls to askuser block until answer is set to one of the valid values if it is not a yes answer the code drops out of the callback and back to an event processing loop void quit widget w xtpointer client xtpointer call int answer answer askuser w really quit if ret yes answer answer askuser w are you really positive if ret yes answer exit a more realistic example might ask whether to create a file or whether to overwrite it this is accomplished by entering a second event processing loop and waiting until the user answers the question the answer is returned to the calling function that function askuser looks something like this where the motif can be replaced with widget set specific code to create some sort of dialog box displaying the question string and buttons for ok cancel and help or equivalents int askuser w string widget w char string int answer ret none some not used marker widget dialog could cache carry but arg args int n xtappcontext context n xtsetarg args n xmnmessagestring xmstringcreateltor string xmstring default charset n xtsetarg args n xmndialogstyle xmdialog application modal n dialog xmcreatequestiondialog xtparent w string args n xtaddcallback dialog xmnokcallback response answer xtaddcallback dialog xmncancelcallback response answer xtaddcallback dialog xmnhelpcallback response answer xtmanagechild dialog context xtwidgettoapplicationcontext w while answer ret none xtapppending context xtappprocessevent context xtimall xtdestroywidget dialog blow away the dialog box and shell return answer the dialog supports three buttons which are set to call the same function when tickled by the user the variable answer is set when the user finally selects one of those choices void response w client call widget w xtpointer client xtpointer call int answer int client xmanycallbackstruct reason xmanycallbackstruct call switch reason reason case xmcr ok answer ret yes some define value break case xmcr cancel answer ret no break case xmcr help answer ret help break default return and the code unwraps back to the point at which an answer was needed and continues from there thanks to dan heller argv sun com further code is in dan s r contrib widgetwrap library subject how do i determine the name of an existing widget i have a widget id and need to know what the name of that widget is users of r and later are best off using the xtname function which will work on both widgets and non widget objects if you are still using r you can use this simple bit of code to do what you want note that it depends on the widget s internal data structures and is not necessarily portable to future versions of xt including r include x corep h include x xresource h string xtname widget widget widget will work with non widget objects return xrmnametostring widget core xrm name modified with suggestion by larry rogers larry boris webo dg com subject why do i get a baddrawable error drawing to xtwindow widget i m doing this in order to get a window into which i can do xlib graphics within my xt based program canvas xtcreatemanagedwidget widgetclass drawing area window xtwindow canvas get the window associated with the widget xdrawline window produces error the window associated with the widget is created as a part of the realization of the widget using a window id of null no window could create the error that you describe it is necessary to call xtrealizewidget before attempting to use the window associated with a widget note that the window will be created after the xtrealizewidget call but that the server may not have actually mapped it yet so you should also wait for an expose event on the window before drawing into it subject why do i get a badmatch error when calling xgetimage the badmatch error can occur if the specified rectangle goes off the edge of the screen if you don t want to catch the error and deal with it you can take the following steps to avoid the error make a pixmap the same size as the rectangle you want to capture clear the pixmap to background using xfillrectangle use xcopyarea to copy the window to the pixmap if you get a noexpose event the copy was clean use xgetimage to grab the image from the pixmap if you get one or more graphicsexpose events the copy wasn t clean and the x y width height members of the graphicsexpose event structures tell you the parts of the pixmap which aren t good get rid of the pixmap it probably takes a lot of memory thanks to oliver jones oj pictel com subject how can my application tell if it is being run under x a number of programs offer x modes but otherwise run in a straight character only mode the easiest way for an application to determine that it is running on an x display is to attempt to open a connection to the x server display xopendisplay display name if display do x stuff else do curses or something else where display name is either the string specified on the command line following display by convention or otherwise is char null in which case xopendisplay uses the value of display if set this is superior to simply checking for the existence a display command line argument or checking for display set in the environment neither of which is adequate subject how do i make a busy cursor while my application is computing is it necessary to call xdefinecursor for every window in my application the easiest thing to do is to create a single inputonly window that is as large as the largest possible screen make it a child of your toplevel window and it will be clipped to that window so it won t affect any other application it needs to be as big as the largest possible screen in case the user enlarges the window while it is busy or moves elsewhere within a virtual desktop substitute toplevel with your top most widget here similar code should work for xlib only applications just use your top window unsigned long valuemask xsetwindowattributes attributes ignore device events while the busy cursor is displayed valuemask cwdontpropagate cwcursor attributes do not propagate mask keypressmask keyreleasemask buttonpressmask buttonreleasemask pointermotionmask attributes cursor xcreatefontcursor xtdisplay toplevel xc watch the window will be as big as the display screen and clipped by its own parent window so we never have to worry about resizing xcreatewindow xtdisplay toplevel xtwindow toplevel unsigned int inputonly copyfromparent valuemask attributes where the maximum size above could be replaced by the real size of the screen particularly to avoid servers which have problems with windows larger than when you want to use this busy cursor map and raise this window to go back to normal unmap it this will automatically keep you from getting extra mouse events depending on precisely how the window manager works it may or may not have a similar effect on keystrokes as well in addition note also that most of the xaw widgets support an xtncursor resource which can be temporarily reset should you merely wish to change the cursor without blocking pointer events thanks to andrew wason aw cellar bae bellcore com dan heller argv sun com and mouse larry mcrcim mcgill edu subject how do i fork without hanging my parent x program an x based application which spawns off other unix processes which continue to run after it is closed typically does not vanish until all of its children are terminated the children inherit from the parent the open x connection to the display what you need to do is fork then immediately in the child process close connectionnumber xtdisplay widget to close the file descriptor in the display information after this do your exec you will then be able to exit the parent alternatively before exec ing make this call which causes the file descriptor to be closed on exec void fcntl connectionnumber xdisplay f setfd thanks to janet anstett anstettj tramp colorado edu gordon freedman gjf duts ccc amdahl com greg holmberg holmberg frame com subject can i make xt or xlib calls from a signal handler no xlib and xt have no mutual exclusion for protecting critical sections if your signal handler makes such a call at the wrong time which might be while the function you are calling is already executing it can leave the library in an inconsistent state note that the ansi c standard points out that behavior of a signal handler is undefined if the signal handler calls any function other than signal itself so this is not a problem specific to xlib and xt the posix specification mentions other functions which may be called safely but it may not be assumed that these functions are called by xlib or xt functions you can work around the problem by setting a flag in the interrupt handler and later checking it with a work procedure or a timer event which has previously been added note the article in the x journal and the example in o reilly volume are in error thanks to pete ware ware cis ohio state edu and donna converse converse expo lcs mit edu subject what are these xlib sequence lost errors you may see these errors if you issue xlib requests from an xlib error handler or more likely if you make calls which generate x requests to xt or xlib from a signal handler which you shouldn t be doing in any case subject how can my xt program handle socket pipe or file input it s very common to need to write an xt program that can accept input both from a user via the x connection and from some other file descriptor but which operates efficiently and without blocking on either the x connection or the other file descriptor a solution is use xtappaddinput after you open your file descriptor use xtappaddinput to register an input handler the input handler will be called every time there is something on the file descriptor requiring your program s attention write the input handler like you would any other xt callback so it does its work quickly and returns it is important to use only non blocking i o system calls in your input handlers most input handlers read the file descriptor although you can have an input handler write or handle exception conditions if you wish be careful when you register an input handler to read from a disk file you will find that the function is called even when there isn t input pending xtappaddinput is actually working as it is supposed to the input handler is called whenever the file descriptor is ready to be read not only when there is new data to be read a disk file unlike a pipe or socket is almost always ready to be read however if only because you can spin back to the beginning and read data you ve read before the result is that your function will almost always be called every time around xtappmainloop there is a way to get the type of interaction you are expecting add this line to the beginning of your function to test whether there is new data if ioctl fd fionread n n return but because this is called frequently your application is effectively in a busy wait you may be better off not using xtappaddinput and instead setting a timer and in the timer procedure checking the file for input courtesy dan heller argv ora com mouse larry mcrcim mcgill edu ollie jones oj pictel com subject how do i simulate a button press release event for a widget you can do this using xsendevent it s likely that you re not setting the window field in the event which xt needs in order to match to the widget which should receive the event if you re sending events to your own application then you can use xtdispatchevent instead this is more efficient than xsendevent in that you avoid a round trip to the server depending on how well the widget was written you may be able to call its action procedures in order to get the effects you want courtesy mark a horstman mh sarek sbc com subject why doesn t anything appear when i run this simple program the window xcreatesimplewindow the display root window size hints x size hints y size hints width size hints height border width blackpixel the display the screen whitepixel the display the screen xselectinput the display the window exposuremask buttonpressmask buttonreleasemask xmapwindow the display the window xdrawline the display the window the gc you are right to map the window before drawing into it however the window is not ready to be drawn into until it actually appears on the screen until your application receives an expose event drawing done before that will generally not appear you ll see code like this in many programs this code would appear after window was created and mapped while done xnextevent the display the event switch the event type case expose on expose events redraw xdrawline the display the window the gc break note that there is a second problem some xlib implementations don t set up the default graphics context to have correct foreground background colors so this program could previously include this code the gc values foreground blackpixel the display the screen e g the gc values background whitepixel the display the screen e g the gc xcreategc the display the window gcforeground gcbackground the gc values note the code uses blackpixel and whitepixel to avoid assuming that is black and is white or vice versa the relationship between pixels and and the colors black and white is implementation dependent they may be reversed or they may not even correspond to black and white at all also note that actually using blackpixel and whitepixel is usually the wrong thing to do in a finished program as it ignores the user s preference for foreground and background and also note that you can run into the same situation in an xt based program if you draw into the xtwindow w right after it has been realized it may not yet have appeared subject what is the difference between a screen and a screen the screen is an xlib structure which includes the information about one of the monitors or virtual monitors which a single x display supports a server can support several independent screens they are numbered unix unix unix etc the screen or screen number is the second digit the which can be thought of as an index into the array of available screens on this particular display connection the macros which you can use to obtain information about the particular screen on which your application is running typically have two forms one which takes a screen and one with takes both the display and the screen number in xt based programs you typically use xtscreen widget to determine the screen on which your application is running if it uses a single screen part of the confusion may arise from the fact that some of the macros which return characteristics of the screen have display in the names xdisplaywidth xdisplayheight etc subject can i use c with x motif xview the x r header files are compatible with c the motif header files are usable as is inside extern c however the definition of string in intrinsic h can conflict with the libg or other string class and needs to be worked around some other projects which can help wwl a set of c classes by jean daniel fekete to wrap x toolkit widgets available via anonymous ftp from export lcs mit edu as contrib wwl tar z or lri lri fr as pub wwl tar z it works by building a set of c classes in parallel to the class tree of the widgets the c interviews toolkit is obtainable via anonymous ftp from interviews stanford edu interviews uses a box glue model similar to that of tex for constructing user interfaces and supports multiple looks on the user interfaces some of its sample applications include a wysiwig document editor doc a macdraw like drawing program idraw and an interface builder ibuild things a class library written at the rome air force base by the strategic air command available as freeware on archive sites motif is a public domain library that defines c class wrappers for motif it adds an application class for e g initializing x and also integrates wcl and the xbae widget set this work was developed by ronald van loon rvloon cv ruu nl based on x a set of bindings done by the university of lowell graphics research laboratory the current sources are available from decuac dec com as pub x motif jul tar z the source code examples for doug young s object oriented programming with c and osf motif isbn do not include widget wrappers but do include a set of classes that encapsulates higher level facilities commonly needed by motif or other xt based applications check export in ftp contrib young c tar z rogue wave offers view h for c programmers using motif info or a product called commonview by glockenspiel ltd ireland apparently is a c based toolkit for multiple window systems including pm windows and x motif xv is sold by qualix fax it implements an interface from the gil files that sun s openwindows developers guide produces to xview wrapper classes in c uit is a set of c classes embedding the xview toolkit it is intended for use with sun s openwindows developers guide builder tool sources are on export mit edu au as uit tar z version was released also of likely use is objectcenter saber c and a reasonable alternative to all of the above is parcplace s formerly solbourne s object interface thanks to douglas s rand dsrand mitre org and george wu gwu tcs com subject where can i obtain alternate language bindings to x versions of the clx lisp bindings are part of the x core source distributions a version of clx is on the r tape version is on export lcs mit edu in contrib clx r tar z the saic ada x bindings are through anonymous ftp in pub from stars rosslyn unisys com there is an x ada study team sponsored by nasa jsc which apparently is working out bindings information xada ghg hou tx us gnu smalltalk has a beta native smalltalk binding to x called stix by steven byrne eng sun com it is still in its beginning stages and documentation is sparse outside the smalltalk code itself the sources are available as pub gnu smalltalk tar z on prep ai mit edu or ugle unit no prolog bindings called xwip written by ted kim at ucla while supported in part by darpa are available by anonymous ftp from export lcs mit edu contrib xwip tar z or ftp cs ucla edu pub xwip tar z these prolog language bindings depend on having a quintus type foreign function interface in your prolog the developer has gotten it to work with quintus and sicstus prolog inquiries should go to xwip cs ucla edu scheme bindings to xlib osf motif and xaw are part of the elk distribution version a on export obsoletes the version on the r contrib tape x scm a bolt on accessory for aubrey jaffer s scm scheme interpreter that provides an interface to xlib motif and openlook is now available via ftp from altdorf ai mit edu archive scm xscm tar z and nexus yorku ca pub scheme new xscm tar z ada bindings to motif explicitly will eventually be made available by the jet propulsion laboratories probably through the normal electronic means advance information can be obtained from dsouleles dsfvax jpl nasa gov who may respond as time permits adamotif is a complete binding to x and motif for the ada language for many common systems it is based in part upon the saic unisys bindings and also includes a uil to ada translator info systems engineering research corporation ada serc well serc apple com also the mit consortium although not involved in producing ada bindings for x maintains a partial listing of people involved in x and ada information is available from donna converse converse expo lcs mit edu subject can xgetwindowattributes get a window s background pixel pixmap no once set the background pixel or pixmap of a window cannot be re read by clients the reason for this is that a client can create a pixmap set it to be the background pixmap of a window and then free the pixmap the window keeps this background but the pixmap itself is destroyed if you re sure a window has a background pixel not a pixmap you can use xcleararea to clear a region to the background color and then use xgetimage to read back that pixel however this action alters the contents of the window and it suffers from race conditions with exposures courtesy dave lemke of ncd and stuart marks of sun note that the same applies to the border pixel pixmap this is a mis feature of the protocol which allows the server is free to manipulate the pixel pixmap however it wants by not requiring the server to keep the original pixel or pixmap some potentially a lot of space can be saved courtesy jim fulton mit x consortium subject how do i create a transparent window a completely transparent window is easy to get use an inputonly window in order to create a window which is mostly transparent you have several choices the shape extension first released with x r offers an easy way to make non rectangular windows so you can set the shape of the window to fit the areas where the window should be nontransparent however not all servers support the extension a machine specific method of implementing transparent windows for particular servers is to use an overlay plane supported by the hardware note that there is no x notion of a transparent color index a generally portable solution is to use a large number of tiny windows but this makes operating on the application as a unit difficult a final answer is to consider whether you really need a transparent window or if you would be satisfied with being able to overlay your application window with information if so you can draw into separate bitplanes in colors that will appear properly thanks to der mouse mouse lightning mcrcim mcgill edu see also the x journal for a more complete answer including code samples for this last option subject why doesn t gxxor produce mathematically correct color values when using gxxor you may expect that drawing with a value of black on a background of black for example should produce white however the drawing operation does not work on rgb values but on colormap indices the color that the resulting colormap index actually points to is undefined and visually random unless you have actually filled it in yourself on many x servers black and white often or programs taking advantage of this mathematical coincidence will break if you want to be combining colors with gxxor then you should be allocating a number of your own color cells and filling them with your chosen pre computed values if you want to use gxxor simply to switch between two colors then you can take the shortcut of setting the background color in the gc graphics context to and the foreground color to a value such that when it draws over red say the result is blue and when it draws over blue the result is red this foreground value is itself the xor of the colormap indices of red and blue thanks to chris flatters cflatter zia aoc nrao edu and ken whaley whaley spectre pa dec com subject why does every color i allocate show up as black make sure you re using bits and not the red green and blue fields of an xcolor structure are scaled so that is nothing and is full blast if you forget to scale using for example for each color the xalloccolor function will perform correctly but the resulting color is usually black thanks to paul asente asente adobe com subject why can t my program get a standard colormap i have an image processing program which uses xgetrgbcolormap to get the standard colormap but it doesn t work xgetrgbcolormap when used with the property xa rgb default map does not create a standard colormap it just returns one if one already exists use xstdcmap or do what it does in order to create the standard colormap first from der mouse mouse larry mcrcim mcgill edu subject why does the pixmap i copy to the screen show up as garbage the initial contents of pixmaps are undefined this means that most servers will allocate the memory and leave around whatever happens to be there which is usually garbage you probably want to clear the pixmap first using xfillrectangle with a function of gxcopy and a foreground pixel of whatever color you want as your background or l if you are using the pixmap as a mask courtesy dave lemke of ncd and stuart marks of sun subject how do i check whether a window id is valid my program has the id of a window on a remote display i want to check whether the window exists before doing anything with it because x is asynchronous there isn t a guarantee that the window would still exist between the time that you got the id and the time you sent an event to the window or otherwise manipulated it what you should do is send the event without checking but install an error handler to catch any badwindow errors which would indicate that the window no longer exists this scheme will work except on the rare occasion that the original window has been destroyed and its id reallocated to another window courtesy ken lee klee synoptics com subject can i have two applications draw to the same window yes the x server assigns ids to windows and other resources actually the server assigns some bits the client others and any application that knows the id can manipulate the resource almost any x server resource except for gcs and private color cells can be shared the problem you face is how to disseminate the window id to multiple applications a simple way to handle this and which solves the problem of the applications running on different machines is in the first application to create a specially named property on the root window and put the window id into it the second application then retrieves the property whose name it also knows and then can draw whatever it wants into the window note this scheme works iff there is only one instance of the first application running and the scheme is subject to the limitations mentioned in the question about using window ids on remote displays note also that you will still need to coordinate any higher level cooperation among your applications note also that two processes can share a window but should not try to use the same server connection if one process is a child of the other it should close down the connection to the server and open its own connection mostly courtesy phil karlton karlton wpd sgi com subject why can t my program work with tvtwm or swm a number of applications including xwd xwininfo and xsetroot do not handle the virtual root window which tvtwm and swm use they typically return the wrong child of root a general solution is to add this code or to use it in your own application where you would normally use rootwindow dpy screen function name getvroot description gets the root window even if it s a virtual root arguments the display and the screen returns the root window for the client include x xatom h window getvroot dpy scr display dpy int scr window rootreturn parentreturn children unsigned int numchildren window root rootwindow dpy scr atom swm vroot none int i swm vroot xinternatom dpy swm vroot false xquerytree dpy root rootreturn parentreturn children numchildren for i i numchildren i atom actual type int actual format long nitems bytesafter window newroot null if xgetwindowproperty dpy children i swm vroot false xa window actual type actual format nitems bytesafter unsigned char newroot success newroot root newroot break return root courtesy david elliott dce smsc sony com similar code is in ssetroot a version of xsetroot distributed with tvtwm a header file by andreas stolcke of icsi on export lcs mit edu contrib vroot h functions similarly by providing macros for rootwindow and defaultrootwindow code can include this header file first to run properly in the presence of a virtual desktop subject how do i keep a window from being resized by the user resizing the window is done through the window manager window managers can pay attention to the size hints your application places on the window but there is no guarantee that the window manager will listen you can try setting the minimum and maximum size hints to your target size and hope for the best subject how do i keep a window in the foreground at all times it s rather antisocial for an application to constantly raise itself e g by tracking visibilitynotify events so that it isn t overlapped imagine the conflict between two such programs running the only sure way to have your window appear on the top of the stack is to make the window override redirect this means that you are temporarily assuming window management duties while the window is up so you want to do this infrequently and then only for short periods of time e g for popup menus or other short parameter setting windows thanks to der mouse mouse larry mcrcim mcgill edu subject how do i make text and bitmaps blink in x there is no easy way unless you re willing to depend on some sort of extension as yet non existent you have to arrange for the blinking yourself either by redrawing the contents periodically or if possible by playing games with the colormap and changing the color of the contents thanks to mouse larry mcrcim mcgill edu der mouse subject how do i get a double click in xlib users of xt have the support of the translation manager to help get notification of double clicking there is no good way to get only a double click in xlib because the protocol does not provide enough support to do double clicks you have to do client side timeouts unless the single click action is such that you can defer actually taking it until you next see an event from the server thus you have to do timeouts which means system dependent code on most unixish implementations you can use xconnectionnumber to get the file descriptor of the x connection and then use select or something similar on that note that many user interface references suggest that a double click be used to extend the action indicated by a single click if this is the case in your interface then you can execute the first action and as a compromise check the timestamp on the second event to determine whether it too should be the single click action or the double click action thanks to mouse larry mcrcim mcgill edu der mouse subject how do i render rotated text xlib intentionally does not provide such sophisticated graphics capabilities leaving them up to server extensions or clients side graphics libraries your only choice if you want to stay within the core x protocol is to render the text into a pixmap read it back via xgetimage rotate it by hand with whatever matrices you want and put it back to the server via xputimage more specifically create a bitmap b and write your text to it create an xybitmap image i from b via xgetimage create an xybitmap image i big enough to handle the transformation for each x y in i i x y i a b where a x cos theta y sin theta b x sin theta y cos theta render i note that you should be careful how you implement this not to lose bits an algorithm based on shear transformations may in fact be better the high level server extensions and graphics packages available for x also permit rendering of rotated text display postscript pex phigs and gks although most are not capable of arbitrary rotation and probably do not use the same fonts that would be found on a printer in addition if you have enough access to the server to install a font on it you can create a font which consists of letters rotated at some predefined angle your application can then itself figure out placement of each glyph courtesy der mouse mouse larry mcrcim mcgill edu eric taylor etaylor wilkins bmc tmc edu and ken lee klee synoptics com liam quin lee sq com interviews c ui toolkit in the x contrib software has support for rendering rotated fonts in x it could be one source of example code brian r smith brsmith cs umn edu another possibility is to use the hershey fonts they are stroke rendered and can be used by x by converting them into xdrawline requests eric pencom com the xrotfont program by alan richardson mppa syma sussex ac uk posted to comp sources x july paints a rotated font by implementing the method above and by using an outline hershey font the xvertext package by alan richardson mppa syma sussex ac uk is a set of functions to facilitate the writing of text at any angle version was recently released to alt sources and comp sources misc it is also on export as contrib xvertext shar z o reilly s x resource volume includes information from hp about modifications to the x fonts server which provide for rotated and scaled text subject what is the x registry how do i reserve names there are places in the x toolkit in applications and in the x protocol that define and use string names the context is such that conflicts are possible if different components use the same name for different things the mit x consortium maintains a registry of names in these domains orgainization names selection names selection targets resource types application classes and class extension record types and several others the list as of is in the directory mit doc registry on the r tape it is also available by sending send docs registry to the xstuff mail server to register names first come first served or to ask questions send to xregistry expo lcs mit edu be sure to include a postal address for confirmation condensed from asente swick appendix h david b lewis faq craft uunet uu net just the faqs ma am joe friday david b lewis temporarily at but not speaking for visual inc day dbl visual com evening david craft uunet uu net
2,834
comp.windows.x
re mouse buttons urgent on apr gmt it ik dmu ac uk i kler said ik nntp posting host elm ik i know it sounds stupid but ik does anyone know how to control individual mouse buttons ik i am writing an application which currently makes use of ik buttonpressmask however this is invoked by the pressing ik of any mouse button i want to be able to restrict this ik to one of the buttons i tried button pressmask but ik just get undefined errors i know it can be done and i ik am pretty sure theres an easy answer to it but i just don t know ik what it is ik time is of the essence there is no event mask for a particular mouse button press however in your event handler you can use the event structure passed in and query it to find which button was pressed i e void someeventhandler widget w xtpointer data xevent event catch the button usually left button if event xbutton button button do some action else do nothing and exit from function guy singh ixi internet guy x co uk vision park uucp guy ixi uucp cambridge bang uunet ixi guy cb zr uk tel
2,835
comp.windows.x
re x protocol packet type in article dep slacvm slac stanford edu dep slacvm slac stanford edu writes is there a way to identify an x protocol packet under decnet under tcp ip the information in the packets isn t necessarily distinctive you need to know that it is an x connection ethan
2,836
comp.windows.x
re drawing colour pixmaps not rectangular in article mar etrog se citri edu au jck catt citri edu au justin kibell writes i am writing a program which needs to draw colour xpm pixmap files onto a background without having the borders show up i cannot do xor as the colours all stuff up i cannot use xcopyplane as that is for single planes only i want to be able to specify a colour in the pixmap to be used as the opaque colour is this possible games such as xjewel have the same problem how does the mouse pointer do it any help would be helpful you wanna do masking build a bitmap pixmap of depth one where all pixels you name opaque are that get copied and the others are use this bitmap as the clip mask in the gc used for xcopyarea and remember to adjust the clip origin coordinates to the xcopyarea blit origin the mouse pointer besides from that it is driven using ramdac analog mapping on most hardwares uses a mask too but be warned blitting through a mask and especially moving around this mask is annoying slow on most xservers it flickers even at mips o o o brain inside o o o o andre beck abpsoft mehl andre beck irs inf tu dresden de o o o
2,837
comp.windows.x
re pixmaps masks icons clues in article sophia inria fr lehors koala inria fr arnaud le hors writes in article buzz mar lion bear com buzz bear com buzz moschetti writes this is a simple x graphics question assume you have a valid window w an icon pixmap and the background mask also a pixmap for that icon you wish to place the icon at x y in w without the background question what combination of xcopyarea and gc functions are necessary i think the idea is to merge only those pixels of pixmap into w as indicated by the corresponding mask pixel value specifically the problem involves a pixmap and mask generated by the xpm libs any clues would be most appreciated xpm provides you with symbolic color names which can be specified at load time so for doing what you want i would suggest you to define a background symbol in your pixmap file which you ll set to whatever color is used by the widget or the window on which you want to put your pixmap this would surely be the simplest and fastest way to do what you want no as soon as you blit two of this icons once on top of the other with a little dislocation you see the rectangular blit crashes too much of the icon first blitted because it draws a full rectangle the way to do it is masking create a bitmap with all pixels to be merged are and all not to be merged are then set the clip mask of the gc to this bitmap set the clip x origin and clip y origin of the gc to the x y coordinates where you blit the icon to the destination drawable use gxcopy and xcopyarea the icon pixmap to the destination drawable using this gc o o o brain inside o o o o andre beck abpsoft mehl andre beck irs inf tu dresden de o o o
2,838
comp.windows.x
comp windows x frequently asked questions faq archive name x faq part last modified this article and several following contain the answers to some frequently asked questions faq often seen in comp windows x it is posted to help reduce volume in this newsgroup and to provide hard to find information of general interest please redistribute this article this article includes answers to the following questions which are loosely grouped into categories questions marked with a indicate questions new to this issue those with significant changes of content since the last issue are marked by topic basic information sources and definitions what books and articles on x are good for beginners what courses on x and various x toolkits are available what conferences on x are coming up what x related public mailing lists are available how can i meet other x developers what related faqs are available how do i ask a net question so as to maximize helpful responses what publications discussing x are available what are these common abbreviations acronyms what is the icccm how do i write x friendly applications what is the x consortium and how do i join just what are open look and motif just what is openwindows just what is decwindows what is pex what is low bandwidth x lbx xremote ppp slip cslip topic using x in day to day life what are all these different window managers why does my x session exit when i kill my window manager sic can i save the state of my x session like toolplaces does how do i use another window manager with dec s session manager how do i change the keyboard auto repeat rate how do i remap the keys on my keyboard to produce a string how do i make a screendump or print my application how do i make a color postscript screendump of the x display how do i make a screendump including the x cursor how do i convert view mac tiff gif sun pict img fax images in x how can i change the titlebar of my xterm window where can i find the xterm control sequences why does the r xterm et al fail against the r server how can i use characters above ascii in xterm why are my xterm menus so small how can i print the current selection how does xt use environment variables in loading resources how to i have the r xdm put a picture behind the log in window why isn t my path set when xdm runs my xsession file how do i keep my display when i rlogin to another machine how can i design my own font why does adding a font to the server not work sic how do i convert a snf font back to bdf font what is a general method of getting a font in usable format how do i use decwindows fonts on my non decwindows server how do i add bdf fonts to my decwindows server how can i set backgroundpixmap in a defaults file what is xpm why can t i override translations only the first item works how can i have xclock or oclock show different timezones i have xmh but it doesn t work where can i get mh why am i suddenly unable to connect to my sun x server why don t the r pex demos work on my mono screen how do i get my sun type keyboard fully supported by xsun how do i report bugs in x why do i get warning widget class version mismatch where can i find a dictionary server for xwebster topic obtaining x and related software and hardware is x public domain software how compatible are x r r and r what changes are there where can i get x r source and or binaries where can i get patches to x r what is the xstuff mail archive where can i get x r source and binaries where can i get osf motif does motif work with x r x r where can i get toolkits implementing open look where can i get other x sources including r modifications where can i get interesting widgets where can i get a good file selector widget what widget is appropriate to use as a drawing canvas what is the current state of the world in x terminals where can i get an x server with a touchscreen or lightpen where can i get an x server on a pc dos or unix where can i get an x server on a macintosh running macos where can i get x for the amiga where can i get a fast x server for a workstation where can i get a server for my high end sun graphics board where can i get an x terminal server for my low end sun what terminal emulators other than xterm are available where can i get an x based editor or word processor where can i get an x based mailer where can i get an x based paint draw program where can i get an x based plotting program where can i get an x based spreadsheet where can i get x based project management software where can i get an x based postscript previewer where can i get an x based gks package where can i get an x based pex package where can i get an x based tex or dvi previewer where can i get an x based troff previewer where can i get a wysiwyg interface builder where can i find x tools callable from shell scripts where can i get an x based debugger how can i tee an x program identically to several displays topic building the x distribution topic needs updating to r what s a good source of information on configuring the x build why doesn t my sun with a cg work with r why doesn t my sun with sunos know about dlsym etc what is this strange problem building x clients on sunos why can t gcc compile x r on my sparc what are these i o errors running x built with gcc what are these problems compiling x r on the older sun what are these problems compiling the x server on sunos what are these problems using r shared libraries on sunos can olit programs run with r xt xtqstring undefined how do i get around the sunos security hole how do i get around the frame buffer security hole topic building x programs what is imake where can i get imake i have a program with an imakefile but no makefile what to do why can t i link to the xlib shape routines what are these problems with xtinherit not found on the sun why can t i compile my r xaw contrib programs under the new x topic programming problems and puzzles why doesn t my program get the keystrokes i select for sic how do i figure out what window manager is running is there a skeleton x program available why does xtgetvalues not work for me sic why don t xtconfigurewidget xtresizewidget xtmovewidget work why isn t there an xtreparentwidget call like xreparentwindow i m writing a widget and can t use a float as a resource value is this a memory leak in the x r xtdestroywidget are callbacks guaranteed to be called in the order registered why doesn t xtdestroywidget actually destroy the widget how do i query the user synchronously using xt how do i determine the name of an existing widget why do i get a baddrawable error drawing to xtwindow widget why do i get a badmatch error when calling xgetimage how can my application tell if it is being run under x how do i make a busy cursor while my application is computing how do i fork without hanging my parent x program can i make xt or xlib calls from a signal handler what are these xlib sequence lost errors how can my xt program handle socket pipe or file input how do i simulate a button press release event for a widget why doesn t anything appear when i run this simple program what is the difference between a screen and a screen can i use c with x motif xview where can i obtain alternate language bindings to x can xgetwindowattributes get a window s background pixel pixmap how do i create a transparent window why doesn t gxxor produce mathematically correct color values why does every color i allocate show up as black why can t my program get a standard colormap why does the pixmap i copy to the screen show up as garbage how do i check whether a window id is valid can i have two applications draw to the same window why can t my program work with tvtwm or swm how do i keep a window from being resized by the user how do i keep a window in the foreground at all times how do i make text and bitmaps blink in x how do i get a double click in xlib how do i render rotated text what is the x registry how do i reserve names if you have suggestions or corrections for any of these answers or any additional information please send them directly to uunet craft faq the information will be included in the next revision or possibly the one after that thanks for the many suggestions which haven t been incorporated yet this version of the faq is in the process of having r information replaced by r information this posting is intended to be distributed at approximately the beginning of each month new versions are archived on export lcs mit edu and are also available from mail server pit manager mit edu and archive server nic switch ch send help the information contained herein has been gathered from a variety of sources in many cases attribution has been lost if you would like to claim responsibility for a particular item please let me know conventions used below telephone numbers tend to be bell system unless otherwise noted prices on items are not included email addresses are those that work from the us x window system is a trademark of the massachusetts institute of technology other trademarks are the property of their respective owners note a script by george ferguson ferguson cs rochester edu to pretty print this faq is available from ugle unit no pub x contrib xfaq texinfo subject topic basic information sources and definitions subject what books and articles on x are good for beginners ken lee of synoptics klee synoptics com regularly posts to comp windows x and ba windows x a bibliography containing cites of all known reference books and how to manuals and also cites of selected technical articles on x and x programming it is ftp able as export lcs mit edu contrib xbibliography and gatekeeper dec com pub x contrib xbibliography here is an unordered set of the reference books and tutorials most useful for beginners most appear on that list comments are gathered from a variety of places and are unattributable asente paul j and swick ralph r x window system toolkit the complete programmer s guide and specification digital press the bible on xt a treasury of information excellent and invaluable distributed by digital press isbn order number ey e e dp and by prentice hall isbn also available through dec direct at digital the examples are on export lcs mit edu in contrib and on gatekeeper dec com in pub x contrib as asente swick examples tar z they were also posted to comp sources x as xt examples part jones oliver introduction to the x window system prentice hall isbn an excellent introduction to programming with xlib written with the programmer in mind this book includes many practical tips that are not found anywhere else this book is not as broad as the o reilly xlib tutorial but jones is an experienced x programmer and this shows in the quality and depth of the material in the book originally written for x r recent printings have included corrections and additions and current material young doug the x window system applications and programming with xt motif version prentice hall isbn the excellent tutorial x window system programming and applications with xt isbn updated for motif the examples are available on export the ones from the motif version are in ftp contrib young motif tar z young doug and john pew the x window system programming and applications with xt open look edition isbn x the tutorial rewritten for olit with new examples and drag drop information examples are on export in youg olit tar z and in you openwindows distribution in openwinhome share src olit olitbook heller dan motif programmers manual the th volume in the o reilly series covers motif application programming it s full of good examples with motif reference pages isbn the examples are available on uunet in comp sources x and nutshell archives a motif will be out soon scheifler robert and james gettys with jim flowers and david rosenthal x window system the complete reference to xlib x protocol icccm xlfd x version release third edition digital press the bible in its latest revision an enhanced version of x documentation by the authors of the xlib documentation this is the most complete published description of the x programming interface and x protocol it is the primary reference work and is not introductory tutorial documentation additional tutorial works will usually be needed by most new x programmers digital press order ey j e dp isbn nye adrian xlib programming manual volume and xlib reference manual volume o reilly and associates a superset of the mit x documentation the first volume is a tutorial with broad coverage of xlib and the second contains reference pages for xlib functions and many useful reference appendices both cover x r and r isbn volume and isbn volume nye adrian and tim o reilly x toolkit programming manual volume o reilly and associates the folks at o reilly give their comprehensive treatment to programming with the mit intrinsics r versions are now available as is a motif version volume m o reilly tim ed x toolkit reference manual volume o reilly and associates a professional reference manual for the mit x r and x r xt mansfield niall the x window system a user s guide addison wesley a tutorial introduction to using x now upgraded for r isbn quercia valerie and tim o reilly x window system user s guide o reilly and associates a tutorial introduction to using x isbn also available in r and motif flavors mui linda and eric pearce x window system administrator s guide for x r and r ora volume help for x users and administrators isbn prentice hall ordering is o reilly ordering is in addition check the x r and x r core distribution in doc tutorials for some useful papers and tutorials particularly the file answers txt late night s top ten x questions by dave lemke lemke ncd com and stuart marks smarks sun com answers other common questions and some of these here in more detail new r versions of the o reilly references not yet volume are now available a single volume programmer s supplement for r by david flanagan provides an overview of new r features it includes man pages for xlib xt and xmu isbn subject what courses on x and various x toolkits are available advanced computing environments periodically offers at least a two day introduction course contact susie karlson at for information at t offers training in xlib and in the xol set contact at t corporate education training for more info trainer in the usa bim educational services offers training in x administration and in programming with xt motif and open windows the courses are given near brussels info edu sunbim be voice fax communica software consultants offers three day hands on courses in x designed for the x window system developer and programmer contact chris clarkson telephone e mail communica communica oz au cora computer technologies offers several courses ghct offers a one week lecture lab course for programmmers designed by douglas young based on his book the x window system programming and applica tions with xt osf motif edition information brian stell or ghct brian sgi com ghg offers a range of courses on x and motif information or training info ghg hou tx us hands on learning has live training and self paced video workshops on topics such as using and or programming x xlib xm xt and widget writing information hewlett packard hpclass or contact your local hp center offers a day introduction to x a day xlib course a day xt and motif seminar and a day motif lab course integrated computer solutions inc offers several multi day hands on courses on x xt and the xaw and motif widget sets in particular information is available at and info ics com intelligent visual computing teaches several lab courses on site for motif and xview ivc is at or or at info ivc com iris computing laboratories offers five day xlib and xt courses info or info spectro com ixi limited offers regular x training courses for both programmers and non technical managers see also unipalm below learning tree international offers a four day course in x window system applications development including xlib and some information on motif for more info call in canada courses are offered in major north american cities also in london stockholm tokyo and elsewhere lurnix offers day type along courses on xt the course is being ported from xaw to xm information is available at in ca mitch trachtenberg and associates offers regular day lab courses on programming with osf motif usually in but not limited to cambridge ma info info mta com non standard logics requests nsl fr offers courses on programming with xlib motif and creating motif widgets osf educational services offers one day seminars and one week motif lab courses john a pew offers a day course on olit possibly based on his book on that subject sco scol info sco com offers training for its open desktop motif environment in the uk and europe software pundits offers a range of courses technology exchange offers a day xlib xt motif course telesoft is now offering a day plus day seminar on x and motif information bruce sherman bds telesoft com unipalm xtech offers osf s day motif course and a day overview on x information unipalm training at xtech unipalm co uk the university of edinburgh is developing a series of courses on x and related topics primarily for non profit making training in academia but also for commercial use information cliff booth unipalm ltd phone fax various other vendors are also beginning to offer x training usually specific to a proprietary toolkit or to xt and a proprietary widget set dec is offering xlib courses sun offers an xview course various universities are offering short x courses or overviews ucla dartmouth university of lowell university of canberra within australia uc berkeley extension will have a one week x motif class for programmers in san francisco starting on july the class will have a hands on lab for more information contact ucbx at among the best places to find courses are at the various unix conferences uniforum usenix unix expo xhibition the mit x technical conference the acm tutorial weeks c in addition the x consortium posts approximately quarterly a list of unendorsed speakers and consultants who can provide talks on a variety of x topics subject what conferences on x are coming up the xhibition x trade show and conference with tutorials panels presentations and vendor exhibits will be held at the san jose convention center june information xhibit ics com the tcl tk workshop will be held at ucal berkeley june information tcl cs berkeley edu the andrew technical conference and consortium annual meeting will be held june in pittsburgh information wilfred hansen cs cmu edu the european x user group holds an annual conference which typically includes includes paper presentations and a vendor exhibit exug x in the real world and multimedia will be held at the imperial college of science and technology london information exug demon co uk niall uit co uk or p whitehead cc ic ac uk fax the motif show is held in washington to coincide with the fedunix and the federal open systems conference usually december information motif fedunix org or paller fedunix org fax the mit x technical conference is typically held in january in boston registration information is available from registration expo lcs mit edu the xworld conference and exhibition includes tutorials panels presentations and vendor exhibits it is typically held in march in new york city information sigs publication group at other trade shows unixexpo uniforum siggraph show an increasing presence of x including tutorials and exhibits subject what x related public mailing lists are available the xpert mailing list is the general public mailing list on x maintained by the x consortium the mailings are gatewayed so xpert is almost identical to the comp windows x usenet newsgroup if you get comp windows x you don t need to be added to the xpert mailing list otherwise you can join the list to receive x information electronically it is best to find a local distribution perhaps someone within your company is already receiving the mailing as a last resort send mail to xpert request expo lcs mit edu with a valid return electronic address the xannounce mailing list carries major x announcements such as new releases including public patches from mit public reviews adoption of standards by the mit x consortium and conference announcements it does not carry advertisements source code patches or questions if you already receive the usenet news group comp windows x announce or the xpert mailing list you don t need to be added to the xannounce mailing list otherwise to subscribe send a request to xannounce request expo lcs mit edu note only redistribution addresses will be accepted for this list i e no personal addresses if you wish to receive xannounce yourself please contact your mail administrator to set up a local redistribution list and to put you on it comp windows x apps is not gatewayed to a mailing list in addition the x consortium sponsors these public lists bug clx clx bug reports and discussions x ada x and ada x d people interested in x and d graphics ximage people interested in image processing and x xvideo discussion of video extensions for x to subscribe to one of these lists assuming no one in your organization already receives it send mail to list request expo lcs mit edu with the subject line including the name of the list in caps and the request addition request in the body of the message be sure to give an address for your local distribution which is accessible from mit eddie mit edu a mailing list for topics related to open look is sponsored by greg pasquariello of unify corporation send to openlook request unify com or openlook request unify uunet uu net for information a mailing list for bugs in the publicly available version of xview source in particular is sponsored by sun send for information to xviewbug trackers request sun com a mailing list for topics related to motif is sponsored by kee hinckley of alfalfa software inc send to motif request alfalfa com for information this group is gatewayed to comp windows x motif a mailing list for topics related to the xpm pixmap format is sponsored by arnaud le hors of group bull send to xpm talk request sa inria fr for information a mailing list discussing interviews can be subscribed to by sending to interviews request interviews stanford edu a mailing list amiga x nic funet fi for topics related to the port of x to the amiga can be subscribed by sending to mailserver nic funet fi a message containing subject adding myself to amiga x subs amiga x your real name a mailing list discussing parcplace s formerly solbourne s oi object interface toolkit can be subscribed to at oi users requests bbn com a mailing list discussing multi threaded xlib can be subscribed to at mt xlib request xsoft xerox com subject how can i meet other x developers o reilly and associates sponsors a mailing list for the use of x user group organizers subscribe by sending to listserv ora com the message subscribe xgroups your internet address local area x user s groups are listed in issue of o reilly s x resource journal a list may also be available from xug ics com the french x user group is called afux and is based in sophia antipolis by cerics information can be obtained from miss vasseur or miss forest bp rue albert einstein valbonne cedex phone fax the european x user group was formed in to represent x users in europe it holds technical conferences at regular intervals the exug also publishes a regular newsletter which is distributed free of charge to members the exug also runs a email mailing list for members which is frequently used to address issues of european interest in x the exug can be contacted at p whitehead cc ic ac uk fax gxugiv is the german x user s group in vorbereitung in preparation being formed for x programmers and users it is associated with the exug all interested should contact olaf heimburger and at mcvax unido tub olaf subject what related faqs are available liam r e quin lee sq sq com posts a faq on open look to comp windows open look jan newmarch jan pandonia canberra edu au posts a faq on motif to comp windows x motif peter ware ware cis ohio state edu posts a faq for comp windows x intrinsics it is on export in contrib faq xt art mulder art cs ualberta ca posts to comp windows x a faq on maximizing the performance of x steve kotsopoulos steve ecf toronto edu posts to comp windows x a faq about using x on intel based unix systems the faq in alt binaries pictures contains information on viewing images with x and on massaging image formats the faq in comp mail mh gatewayed to mh users ics uci edu includes a section on xmh the faq in comp lang lisp contains information on several interface tools and toolkits there exists a pex phigs faq subject how do i ask a net question so as to maximize helpful responses when asking for help on the net or x mailing lists be sure to include all information about your setup and what you are doing the more specific you are the more likely someone will spot an error in what you are doing without all the details people who want to help you often have to guess if they are able to respond at all always mention what version of x you are using and where you got it from if your server came from a different source as the rest of your x system give details of that too give the machine type operating system and o s version for both the client and server machine it may also be appropriate to mention the window manager compiler and display hardware type you are using then tell exactly what you are doing exactly what happens and what you expected wanted to happen if it is a command that fails include the exact transcript of your session in the message if a program you wrote doesn t work the way you expect include as little of the source necessary just a small test case please for readers to reproduce the problem subject what publications discussing x are available the trade magazines unix world unix review computer language etc are publishing more articles on x two x specific publications include o reilly and associates publishes the x resource a practical journal of the x window system morris st a sebastapol ca editorial information adrian nye adrian ora com the x journal is started bi monthly publication september on a variety of x topics subscription information the x journal subscriber services dept xxx p o box denville nj usa editorial information editors topgun uunet uu net subject what are these common abbreviations acronyms xt the x toolkit intrinsics is a library layered on xlib which provides the functionality from which the widget sets are built an xt based program is an application which uses one of those widget sets and which uses intrinsics mechanisms to manipulate the widgets xmu the xmu library is a collection of miscellaneous utility functions useful in building various applications and widgets xaw the athena widget set is the mit implemented sample widget set distributed with x source xm the osf motif widget set from the open software foundation binary kits are available from many hardware vendors xhp xw the hewlett packard widget set was originally based on r but several sets of patches exist which bring it up to r as it is distributed on the x r tapes supplemental patches are available to use it with r r clx the common lisp x interface is a common lisp equivalent to xlib xdmcp the x display manager protocol provides a uniform mechanism for a display such as an x terminal to request login service from a remote host xlfd the x logical font description conventions describes a standard logical font description and conventions to be used by clients so that they can query and access those resources rtfm common expert speak meaning please locate and consult the relevant documentation read the forgotten manual utsl a common expression meaning take advantage of the fact that you aren t limited by a binary license use the source luke api application programmer interface the function calls etc in a programming library bdf bitmap distribution format a human readable format for uncompiled x fonts gui graphical user interface uil the user interface language part of osf motif which lets programmers specify a widget hierarchy in a simple outline form wcl the widget creation language a package which extends the understanding of the xt resource format such that a widget hierarchy and actions on the widgets can be specified through the resources file gil the file format put out by sun s openwindows developers guide uims user interface management system subject what is the icccm how do i write x friendly applications the inter client communication conventions manual is one of the official x consortium standards documents that define the x environment it describes the conventions that clients must observe to coexist peacefully with other clients sharing the same server if you are writing x clients you need to read and understand the icccm in particular the sections discussing the selection mechanism and the interaction between your client and the window manager get it either as part of the r distribution from mit in the later editions of the scheifler gettys x window system book as an appendix in the new version of o reilly s volume x protocol reference manual a version in old copies of their volume is obsolete the version in the digital press book is much more readable thanks to the efforts of digital press s editors to improve the english and the presentation from david rosenthal the icccm was updated for r updates are published in o reilly s programmer s supplement for release the complete document is on the r tapes alternate definition the icccm is generally the m in rtfm and is the most important of the least read x documents subject what is the x consortium and how do i join the mit x consortium was formed in january of to further the development of the x window system and has as its major goal the promotion of cooperation within the computer industry in the creation of standard software interfaces at all layers in the x window system environment mit s role is to provide the vendor neutral architectural and administrative leadership required to make this work membership in the consortium open to any organization there are two categories of membership member for large organizations and affiliate for smaller organizations most of the consortium s activities take place via electronic mail with meetings when required as designs and specifications take shape interest groups are formed from experts in the participating organizations typically a small multi organization architecture team leads the design with others acting as close observers and reviewers once a complete specification is produced it may be submitted for formal technical review by the consortium as a proposed standard the standards process typically includes public review outside the consortium and a demonstration of proof of concept your involvement in the public review process or as a member or affiliate of the consortium is welcomed write to bob scheifler mit x consortium laboratory for computer science technology square cambridge ma for complete information see the xconsortium man page from the x r distribution from which this information is adapted subject just what are open look and motif open look and motif are two graphical user interfaces guis open look was developed by sun with help from at t and many industry reviewers motif was developed by the open software foundation osf with input from many osf members open look is primarily a user interface specification and style guide there are several toolkits which can be used to produce open look applications motif includes an api specification the only sanctioned motif toolkit is the one from osf however there are other toolkits which can be used to produce programs which look and behave like osf motif one of these parcplace s formerly solbourne s oi is a virtual toolkit which provides objects in the style of open look and motif at the user s choice open look gui is also the name of a product from at t comprising their open look intrinsics toolkit and a variety of applications thanks to ian darwin ian sq com subject just what is openwindows open windows is a sun product that encompasses a window system that combines a news and x compliant server x news a user interface specification open look and a series of toolkits that implement it including the sunview like xview and the xt based olit xlib and xt implementations and a number of utilities olwm window manager filemgr shelltool etc thanks to frank greco fgreco govt shearson com subject just what is decwindows decwindows is a dec product that encompasses an x server the xui toolkit including the dwt widget set and uil xlib and xt implementations a session manager and a number of utilities dxwm window manager dxcalendar dxpsview etc at some point motif flavors of the toolkit and applications will be shipped subject what is pex pex is the phigs extension to x phigs stands for programmer s hierarchical interactive graphics system and is essentially a library of functions that simplifies the creation and manipulation of d graphics many platforms are capable of performing in hardware the computations involved in rendering d objects the extension allows the client phigs in this case to take advantage of the specialized hardware for d graphics sun microsystems is currently contracted to develop a freely redistributable copyright similar to the current x copyright sample implementation source and documentation are available in the r release several vendors are currently selling independently developed pex servers for their workstations and x terminals last modified subject what is low bandwidth x lbx xremote ppp slip cslip there are several options for using x over serial lines slip serial line ip this is both a mechanism and a protocol for sending ip packets over point to point serial links it has been around for several years and implementations are available for many of the major tcp ip implementations most x terminal vendors supply this as a checkoff item although nobody really ever uses it since it is horribly slow the tcp ip headers add bytes per packet and the tcp ip encoding of the x protocol is rather verbose rightfully so it is optimized for packing and unpacking over high speed links cslip compressed header slip this is a variant of slip that compresses the bytes of tcp ip headers down to about or bytes it still doesn t do anything about reencoding the x protocol modems that do compression can help but they increase packet latency it takes time to dribble the uncompressed data through typical serial interfaces plus the compression assembly time ppp point to point protocol this is an emerging standard for point to point links over serial lines that has a more complete set of option negotiation than slip a growing number of people see the combination of ppp for the serial line management and cslip for the header compression as becoming common for running normal tcp ip protocols over serial lines running raw x over the wire still needs compression somewhere to make it usable xremote this is the name of both a protocol and set of products originally developed by ncd for squeezing the x protocol over serial lines in addition to using a low level transport mechanism similar to ppp cslip xremote removes redundancies in the x protocol by sending deltas against previous packets and using lzw to compress the entire data stream this work is done by either a pseudo x server or proxy running on the host or in a terminal server there are several advantages to doing compression outside the modem you don t have to have compressing modems in there if you wouldn t otherwise be using them e g if you were going to be directly connected and it reduces the i o overhead by cutting down on the number of bytes that have to cross the serial interface and in addition to the effects of it reduces the latency in delivering packets by not requiring the modem to buffer up the data waiting for blocks to compress lbx low bandwidth x this is an x consortium project that is working on a standard for this area it is being chaired by ncd and xerox and is using ncd s xremote protocol as a stepping stone in developing the new protocol lbx will go beyond xremote by adding proxy caching of commonly used information e g connection setup data large window properties font metrics keymaps etc and a more efficient encoding of the x protocol the hope is to have a standard ready for public review in the first half of next year and a sample implementation available in r additional technical information about how xremote works and a few notes on how lbx might be different are available via anonymous ftp from export lcs mit edu in contrib in the following files xremote slides ps slides describing xremote xremote lbx diffs ps more slides describing some of lbx information provided by jim fulton jim ncd com there is also a set of slides on export from jim fulton s talk at the th mit x technical conference subject topic using x in day to day life subject what are all these different window managers the window manager in x is just another client it is not part of the x window system although it enjoys special privileges and so there is no single window manager instead there are many which support different ways for the user to interact with windows and different styles of window layout decoration and keyboard and colormap focus in approximate chronological order generally the more recent ones are more conformant with the icccm wm this simple title bar window manager was phased out in r or r uwm the universal window manager is still popular for its speed although it is very outdated moved to contrib on the r tape twm old tom s window manager was among the first non mit window managers and offered the user a great deal of customization options in a re parenting window manager awm the ardent window manager remains a hotbed for hackers and offers some features dynamic menus not found on more current window managers cwm cwm is part of the andrew system rtl siemen s window manager tiles windows so that they don t overlap and resizes the window with the focus to its preferred size dxwm digital s dxwm is part of the decwindows offering hpwm hp s window manager offers a d look it is a precursor of mwm mwm the motif window manager is part of the osf motif toolkit tekwm tektronix s window manager offering olwm sun olwm implements the open look gui and some of the style guide functionality olwm at t ditto gwm bull s generic window manager emulates others with a built in lisp interpreter version h is on the r contrib tape n is on avahi inria fr and export lcs mit edu m swm the sigma window manager is on the r tape pswm sun s postscript based pswm is part of the openwindows release swm solbourne s swm is based on the oi toolkit and offers multiple gui support and also a panned virtual window configuration information comes from the resources file twm new mit s new tab window manager from the r tape is a reworked twm and is the basis for several derivatives including the one on the r tape vtwm vtwm offers some of the virtual desktop features of swm with a single root window implementation it is based on the r twm and is available on archive servers a new version vtwm is based on r and is available from export tvtwm tom s virtual tab window manager is also based on the r twm and provides a virtual desktop modeled on the virtual root window of swm it is available on archive servers olvwm the vtwm style virtual desktop added to sun s olwm it is available on archive servers version is on export mvwm the vtwm style virtual desktop added to osf s mwm a beta version is floating around most recently from suresh unipalm co uk but requires a source license to osf motif ncdwm the window manager local to ncd terminals offers an mwm look xdswm the window manager local to visual technology s terminals ctwm claude lecommandeur s lecom sic epfl ch modification of the r twm offers virtual screens in the fashion of hp vuewm source is on export version also offers the window overview used in vtwm and tvtwm vuewm hp s mwm based window manager offers configurable workspaces dwm sgi s enhanced mwm piewm this version of tvtwm offers pie menus subject why does my x session exit when i kill my window manager sic it needn t what is probably happening is that you are running your window manager as the last job in your xsession or xinitrc file your x session runs only as long as the last job is running and so killing your window manager is equivalent to logging out instead run the window manager in the background and as the last job instead invoke something safe like exec xterm name login rv iconic or any special client of your devising which exits on some user action your x session will continue until you explicitly logout of this window whether or not you kill or restart your window manager subject can i save the state of my x session like toolplaces does although no known window manager directly supports such a feature which may be equivalent to writing out a xinitrc or xsession file naming the geometry and wm command of each application but olvwm may have something close there is a contributed application which does much of what you are looking for although it is not as complete as the sunview program toolplaces look for the application xplaces on an archive server near you there are several versions of this program floating around look for a recent vintage some new pseudo session managers such as hp s vuewm provide for the saving of sessions including information on the geometry of currently running applications and the resource database bjxrn stabell bjoerns staff cs uit no subject how do i use another window manager with dec s session manager dec s session manager will start dxwm up by default to override this add to your xdefaults file something like this line naming the full pathname sm windowmanagername wherever usr bin x your favorite wm subject how do i change the keyboard auto repeat rate you can turn auto repeat on or off by using xset r on off the x protocol however doesn t provide for varying the auto repeat rate which is a capability not supported by all systems some servers running on systems that support this however may provide command line flags to set the rate at start up time if you have control over server start up see the man pages for xinit and xdm you can invoke the server with the chosen settings for example you can start the xsun server from mit with the options ar ar to reduce the sensitivity of the keyboard subject how do i remap the keys on my keyboard to produce a string there is no method of arranging for a particular string to be produced when you press a particular key the xmodmap client which is useful for moving your ctrl and esc keys to useful places just rearranges keys and does not do macro expansion some few clients including xterm and several x based editors accept a translation resource such as xterm vt translations override key f string setenv display unix which permits the shorthand f to be pressed to reset the display locally within an xterm it takes effect for new xterm clients to include control characters in the string use nnn where nnn is the octal encoding of the control character you want to include window managers which could provide this facility do not yet nor has a special remapper client been made available david b lewis faq craft uunet uu net just the faqs ma am joe friday david b lewis temporarily at but not speaking for visual inc day dbl visual com evening david craft uunet uu net
2,839
comp.windows.x
comp windows x frequently asked questions faq archive name x faq part last modified subject how do i make a screendump or print my application the xwd client in the x distributions can be used to select a window or the background it produces an xwd format file of the image of that window the file can be post processed into something useful or printed with the xpr client and your local printing mechanism you can use this command csh sleep xwd root output xwd and then spend seconds or so setting up your screen the entire current display will be saved into the file output xwd note that xwd also has an undocumented before r id flag for specifying the window id on the command line there are also unofficial patches on export to xwd for specifying the delay and the portion of the screen to capture two publicly available programs which allow interactive definition of arbitrary portions of the display and built in delays are asnap and xgrabsc there are several versions of xgrabsc version available on export is the most recent xsnap includes some asnap features and supersedes it it also renders xpm output version unknown it is available on export or avahi inria fr see xsnap pl tar z a screen dump and merge edit program combining features of xwd and xpr is available from vernam cs uwm edu as xdump tar z information soft eng cs uwm edu xprint by alberto accomazzi alberto cfa harvard edu is available from cfa in xprint export tar z to post process the xwd output of some of these tools you can use xpr which is part of the x distribution also on several archives are xwd ps and xtops which produce encapsulated postscript with trimmings suitable for use in presentations see export lcs mit edu contrib xwd ps tar z and contrib imagemagick tar z also useful is the pbmplus package on many archive servers and the xim package contains level color postscript output the xv program can grab a portion of the x display manipulate it and save it in one of the available formats imagemagick has similar capabilities also bristol technology info bristol com offers xprinter an xlib api for postscript and pcl printers a demo is on ftp uu net in vendor bristol xprinter colorsoft offers openprint package includes a screen capture facility image processing and support for postscript and non postscript printers some vendors implementations of x e g decwindows and openwindows include session managers or other desktop programs which include print portion of screen or take a snapshot options some platforms also have tools which can be used to grab the frame buffer directly the sun systems for example have a screendump program which produces a sun raster file some x terminals have local screen dump utilities to write postscript to a local serial printer some vendors implementations of lpr e g sony include direct support for printing xwd files but you ll typically need some other package to massage the output into a useful format which you can get to the printer subject how do i make a color postscript screendump of the x display if you need color postscript in particular you can grab the screen image using a program which can produce color postscript such as xgrabsc and xv grab the screen image using xwd and post process xwd into color ps you can do this using xwd ps or the xtops program from the imagemagick distribution the pbmplus package is also good for this as is the xim package subject how do i make a screendump including the x cursor this can t be done unless the x server has been extended consider instead a system dependent mechanism for e g capturing the frame buffer subject how do i convert view mac tiff gif sun pict img fax images in x the likeliest program is an incarnation of jef poskanzer s useful portable bitmap toolkit which includes a number of programs for converting among various image formats it includes support for many types of bitmaps gray scale images and full color images pbmplus has been updated recently the most recent version is on export in contrib pbmplus dec tar z another tool is san diego supercomputing center s imtools imconv in particular which packages the functionality of pbm into a single binary it s available anonymous ftp from sdsc edu useful for viewing some image formats is jim frost s xloadimage a version of which is in the r directory contrib clients xloadimage there are later versions available including contrib xloadimage tar z on export graeme gill s updates to an earlier version of xloadimage are also on export see xli readme and xli tar z uu version was released xv x image viewer written by bradley cis upenn edu john bradley can read and display pictures in sun raster pgm pbm ppm x bitmap tiff gif and jpeg it can manipulate on the images adjust color intensity contrast aspect ratio crop it can save images in all of the aforementioned formats plus postscript it can grab a portion of the x display manipulate on it and save it in one of the available formats the program was updated see the file contrib xv tar z on export lcs mit edu the fuzzy pixmap manipulation by michael mauldin mlm nl cs cmu edu conversion and manipulation package similar to pbmplus version available via ftp as nl cs cmu edu usr mlm ftp fbm tar z uunet uu net pub fbm tar z and ucsd edu graphics fbm tar z the img software set by paul raveling raveling venera isi edu reads and writes its own image format displays on an x screen and does some image manipulations version is available via ftp on expo lcs mit edu as contrib img tar z along with large collection of color images the utah rle toolkit is a conversion and manipulation package similar to pbmplus available via ftp as cs utah edu pub urt weedeater math yale edu pub urt and freebie engin umich edu pub urt xim the x image manipulator by philip thompson does essential interactive displaying editing filtering and converting of images there is a version in the x r contrib area but a more recent version using r and motif is available from gis mit edu xim reads writes gif xwd xbm tiff rle xim writes level eps and other formats and also has a library and command line utilities for building your own applications imagemagick by cristy dupont com can be retrieved from export s contrib area it is a collection of utilities to transform and display images on any x server the tool uses the miff format filters to and from miff from other popular formats ppm tiff gif sun raster etc are included xtiff is a tool for viewing a tiff file in an x window it was written to handle as many different kinds of tiff files as possible while remaining simple portable and efficient xtiff illustrates some common problems with building pixmaps and using different visual classes it is distributed as part of sam leffler s libtiff package and it is also available on export lcs mit edu uunet uu net and comp sources x dbs decwrl dec com xtiff was announced in it includes xlib and xt versions a version of lee iverson s leei mcrcim mcgill edu image viewing tool is available as contrib vimage tar z on export lcs mit edu the package also includes an imageviewport widget and a filedialog widget some material from larry carroll larryc poe jpl nasa gov subject how can i change the titlebar of my xterm window the solution involves sending an escape sequence to xterm which will cause it to update the property which the window manager relies upon for the string which appears in the window titlebar a solution is as easy as typing this in an xterm running a shell echo esc text g where esc is the escape key text is the string you wish to have displayed and g is a control g the bel character here is a more complicated csh alias which changes the titlebar to the current working directory when you change directories alias newcd cd echo n esc cwd g the digit in these strings indicates to xterm that it should change only the title of the window to change both the title and the name used in the icon use the digit instead and use to change only the icon name note another way to do this which prevents an incorrect display of the local directory if a modified cd is used in a subshell is to wrap the escape sequences into the ps prompt itself note on an ibm rs is may be necessary to begin the sequence with a v subject where can i find the xterm control sequences the best source of such information is in your r sources in the file ctlseqs ms a postscript version is in mit hardcopy clients ctlseqs ps z o reilly s volume the x user s guide includes an r version of the control sequences the standard volume will be available and a motif version of the book is available now the current r guide includes an outdated version of the control sequences other good sources of information include the r version of that document and also the file in the r sources called mit clients xterm ctlseq txt a compilation put together by skip montanaro ge cr d listing the vt sequences it dates from r but is fairly accurate a hardcopy version was published in the december xnextevent the xug newsletter in a pinch a vt manual will do last updated subject why does the r xterm et al fail against the r server subject how can i use characters above ascii in xterm in order to use special characters such as the o umlaut you need to stty pass but also to use a charcell iso font such as xterm font medium r normal c iso xterm boldfont bold r normal c iso the family is intentionally unspecified in this example in addition you may want to set this in your shell setenv lc ctype iso for a given character above you can determine the key to use with the alt modifier by finding the equivalent character below try using man ascii for example o umlaut v is alt v and the section character is alt thanks to greg holmberg greg thirdi uunet uu net and stephen gildea gildea expo lcs mit edu subject why are my xterm menus so small you are probably setting the geometry small accidentally if you give a resource specification like this xterm geometry x then you are asking for all widgets under xterm to have their geometry set to x for the main window this is ok as it uses characters for its size but its popup menus don t they are in pixels and show up small to set only the terminal widget to have the specified geometry name it explicitly xterm vt geometry x subject how can i print the current selection you could paste it into an xterm after executing the lpr command however a program by richard hesketh rlh ukc ac uk specifically for manipulating the selection will help e g xselection primary lpr finds the primary selection and prints it this command can be placed in a window manager menu or in shell scripts xselection also permits the setting of the selection and other properties a version is on export also available is ria ccs uwo ca pub xget selection tar z which can be adapted to do this subject how does xt use environment variables in loading resources you can use several environment variables to control how resources are loaded for your xt based programs xfilesearchpath xuserfilesearchpath and xapplresdir these environment variables control where xt looks for application defaults files as an application is initializing xt loads at most one app defaults file from the path defined in xfilesearchpath and another from the path defined in xuserfilesearchpath set xfilesearchpath if software is installed on your system in such a way that app defaults files appear in several different directory hierarchies suppose for example that you are running sun s open windows and you also have some r x applications installed in usr lib x app defaults you could set a value like this for xfilesearchpath and it would cause xt to look up app defaults files in both usr lib x and usr openwin lib or wherever your openwinhome is located setenv xfilesearchpath usr lib x t n openwinhome lib t n the value of this environment variable is a colon separated list of pathnames the pathnames contain replacement characters as follows see xtresolvepathname n the value of the filename parameter or the application s class name t the value of the file type in this case the literal string app defaults c customization resource r only s suffix none for app defaults l language locale and codeset e g ja jp euc l language part of l e g ja t the territory part of the display s language string c the codeset part of the display s language string let s take apart the example suppose the application s class name is myterm also suppose open windows is installed in usr openwin notice the example omits locale specific lookup usr lib x t n means usr lib x app defaults myterm openwinhome lib t n means usr openwin lib app defaults myterm as the application initializes xt tries to open both of the above app defaults files in the order shown as soon as it finds one it reads it and uses it and stops looking for others the effect of this path is to search first in usr lib x then in usr openwin let s consider another example this time let s set xuserfilesearchpath so it looks for the file myterm ad in the current working directory then for myterm in the directory app defaults setenv xuserfilesearchpath n ad home app defaults n the first path in the list expands to myterm ad the second expands to home app defaults myterm this is a convenient setting for debugging because it follows the imake convention of naming the app defaults file myterm ad in the application s source directory so you can run the application from the directory in which you are working and still have the resources loaded properly note when looking for app default files with xuserfilesearchpath for some bizarre reason neither the type nor file suffix is defined so t and s are useless with r there s another twist you may specify a customization resource value for example you might run the myterm application like this myterm xrm customization color if one of your pathname specifications had the value usr lib x t n c then the expanded pathname would be usr lib x app defaults myterm color because the c substitution character takes on the value of the customization resource the default xfilesearchpath compiled into xt is usr lib x l t n c r usr lib x l t n c r usr lib x t n c r usr lib x l t n usr lib x l t n usr lib x t n note some sites replace usr lib x with a projectroot in this batch of default settings the default xuserfilesearchpath also compiled into xt is root l n c r root l n c r root n c r root l n root l n root n root is either the value of xapplresdir or the user s home directory if xapplresdir is not set if you set xuserfilesearchpath to some value other than the default xt ignores xapplresdir altogether notice that the quick and dirty way of making your application find your app defaults file in your current working directory is to set xapplresdir to a single dot in r all this machinery worked differently for r compatibilty many people set their xapplresdir value to a dot followed by a slash thanks to oliver jones oj world std com subject how to i have the r xdm put a picture behind the log in window the answer lies in changing xdm s xrdb resource in the xdm config file to run a program to change the background before loading the resources for example your usr lib x xdm xdm config file may add the line displaymanager authorize false to permit unrestricted access to the display before log in beware and also displaymanager xrdb usr lib x xdm new xrdb where that file does something for all connections along the lines of bin sh comes in with arguments display load usr lib x xdm xresources usr bin x xsetroot display bitmap usr lib x xdm new bitmap usr bin x xrdb substitute xloadimage or xv for xsetroot to taste note that this is a general hack that can be used to invoke a console window or any other client thanks to jay bourland jayb cauchy stanford edu subject why isn t my path set when xdm runs my xsession file when xdm runs your xsession it doesn t source your cshrc or login files you can set the path explicitly as you normally could for any sh script or you can place all environment setting statements in a separate file and source it from both the xsession file and your shell configuration file or if you set your path in your cshrc file the normal place you can make your xsession have path set simply by making it a csh script i e by starting your xsession file off with bin csh if this doesn t work also try starting off with bin sh reset path path csh c echo path export path subject how do i keep my display when i rlogin to another machine there are several ways to avoid having to do a setenv display whenever you log in to another networked unix machine running x one solution is to use the clients xrsh on the r contrib tape it includes xrsh a script to start an x application on remote machine and xrlogin a script to start a local xterm running rlogin to a remote machine a more recent version is on export in xrsh shar one solution is to use the xrlogin program from der mouse mouse larry mcrcim mcgill edu you can ftp caveat emptor versions from in x xrlogin c and x xrlogind c the program packages up term and display into a single string which is stuffed into term rlogin then propagates term normally your cshrc on the remote machine should contain eval xrlogind where xrlogind is a program that checks term and if it is of the special format it recognizes unpacks it and spits out setenv and unsetenv commands to recreate the environment variables in addition if all you need to do is start a remote x process on another host and you find rsh host n usr bin x xterm display display too simple display must have your real hostname then this version of xrsh can be used to start up remote x processes the equivalent usage would be xrsh host xterm bin sh start an x process on another host date dec gmt from chris torek chris mimsy umd edu rsh host n setenv display display exec dev null dev null an improved version rxcmd suggested by john robinson jr bbn com generalized for sh ksh by keith boyer keith cis ohio state edu but they put the rcmd in s which left zombies again this script combines the best of both case in echo usage host x cmd args case shell in csh host shift xhost host dev null rsh host n setenv term xterm setenv display hostname exec dev null dev null sh host shift xhost host dev null rsh host n term xterm export term display hostname export display ld library path usr x lib export ld library path path path usr x bin usr bin x usr local bin export path exec dev null dev null esac esac subject how can i design my own font one way is to use the bitmap client or some other bitmap editor e g sun s icon editor tool post processed with pbmplus to design the individual characters and then to do some large amount of post processing to concatenate them into the bdf format see ollie jones s article in the november x journal for more information the r contrib area in fonts utils and in clients xtroff contained a number of useful utilities including some to convert between bdf font format and a simple character format which can be edited with any text editor an easier way is to use the xfed client to modify an existing font a version is on the r or r x r contrib tape in contrib clients xfed xfed is available for anonymous ftp on ftp informatik uni dortmund de possibly as file pub windows x diverse x sourcen xfed tar z it can produce bdf format fonts which can be compiled for a variety of x servers the xfedor client from group bull permits creation of bitmaps cursors xpm pixmaps and fonts binaries for common machines are on avahi inria fr in pub in addition the sources an old xlib implementation have been placed in export contrib if you are a metafont user you can use mftobdf from the seetex distribution to convert pk gf and pxl fonts to bdf format the distribution is on ftp cs colorado edu and on export lcs mit edu the gnu package fontutils tar z on prep ai mit edu includes xbfe a font editor and a number of utilities for massaging font formats the o reilly x resource issue contains an article on using these tools to modify a font fonts can be resized with hiroto kagotani s bdfresize a new version is in ftp cs titech ac jp x contrib subject why does adding a font to the server not work sic after you have built the font using your system s font compiler installed it in some directory and run mkfontdir or your system s equivalent e g bldfamily for openwindows in that directory be sure to use xset fp dir to add that full path name to the server s font path or if the directory is already in the path use xset fp rehash so that the new fonts in that directory are actually found it is this last step that you re probably leaving out you can also use xset q to make sure that that directory is in the path sometimes your xset fp dir command fails with a badvalue error x error of failed request badvalue integer parameter out of range for operation major opcode of failed request x setfontpath this means the x server cannot find or read your font directory or that your directory does not look like a font directory to the server the mention of an integer parameter in the message is spurious is the font directory you re specifying readable from the server s file system remember it s the server not the client which interprets your font directory trouble in this area is especially likely when you issue an xset command with shell metacharacters in it e g xset fp myfonts and the server is an x terminal or managed by xdm is the directory really a font directory if you re running an mit server or most varieties of vendor servers look in the directory for the file fonts dir if you can t find that file run mkfontdir if you re running openwindows look for the file families list if you can t find it run bldfamily if you re in a site where some people run x rn servers and others run a proprietary server with nonstandard font formats openwindows for example make sure the font directory is right for the server you re using hint if the directory contains pcf and or snf files it won t work for open windows if the directory contains ff and or fb files it won t work for x rn thanks to der mouse mouse larry mcrcim mcgill edu and to oliver jones oj pictel com subject how do i convert a snf font back to bdf font a tool called snftobdf is part of the bdftools package which is available from export lcs mit edu contrib bdftools tar z and from crl nmsu edu pub misc bdftools tar z subject what is a general method of getting a font in usable format der mouse s getbdf is one solution it connects to a server and produces a bdf file for any font the server is willing to let it it can be used as an anything to bdf converter but requires access to a server that can understand the font file thus is both more and less powerful than other tools such as snftobdf getbdf is on in x getbdf c or available via mail from mouse larry mcrcim mcgill edu in addition the r program fstobdf can produce bdf for any font that the r server has access to subject how do i use decwindows fonts on my non decwindows server the decwindows fonts typically don t exist on a non dec installation but rewrite rules can be used to alias fonts used by decwindows applications to standard mit fonts of similar characteristics and size pick up the file contrib decwindows on x r font aliases from export lcs mit edu this file is for a standard mit r server it can also serve as a starting point for creating a similar aliases file for the open windows server or other servers which do not use the mit font scheme subject how do i add bdf fonts to my decwindows server the format of fonts preferred by dec s x server is the pcf format you can produce this compiled format from the bdf format by using dec s dxfc font compiler note that the dec servers can also use raw bdf fonts with a performance hit subject how can i set backgroundpixmap in a defaults file what is xpm i want to be able to do something like this xclock backgroundpixmap usr include x bitmaps rootweave you can t do this the backgroundpixmap resource is a pixmap of the same depth as the screen not a bitmap which is a pixmap of depth because of this writing a generic string to pixmap converter is impossible since there is no accepted convention for a file format for pixmaps therefore neither the x toolkit or the athena widget set define a string to pixmap converter because there is no converter you cannot specify this value as a resource the athena widget set does define a string to bitmap converter for use in many of its widgets however courtesy chris d peterson now kit ics com however a specific converter which encapsulates much of the functionality of the xloadimage package by jim frost was posted by sebastian wangnick basti unido informatik uni dortmund de it permits loading of a number of image formats as a pixmap the leading general purpose format for pixmaps is the xpm format used by groupe bull in several of its programs including the gwm window manager by at t in its olpixmap editor and by ics in its interface builder xpm distribution available on export as contrib xpm tar z includes read write routines which can easily be adapted to converters by new widgets which want to allow specification of pixmap resources in the above manner see information on the xpm talk mailing list above xpm f was announced in and is available from export lcs mit edu and avahi inria fr an older version is on the r contrib tape a set of xpm icons collected by anthony thyssen anthony kurango cit gu edu au is on export in contrib aicons subject why can t i override translations only the first item works you probably have an extra space after the specification of the first item like this basic text translations override ctrl key a beginning of line n ctrl key e end of line extra space the newline after that space is ending the translation definition thanks to timothy j horton subject how can i have xclock or oclock show different timezones one solution is xchron in volume of comp sources x which can show the time for timezones other than the local one alternatively you can probably set the timezone in the shell from which you invoke the xclock or oclock or use a script similar to this bin sh tz pst pdt xclock name san luis obispo ca dev null tz est edt xclock name king of prussia pa dev null subject i have xmh but it doesn t work where can i get mh the xmh mail reader requires the rand mh mail message handling system which is not part of the unix software distribution for many machines a list of various ftp uucp e mail and us mail sites for both xmh and mh is given in the monthly mh faq one source is ics uci edu in the file pub mh mh tar z if you do not receive the comp mail mh newsgroup or the mh users mailing list you can request a copy of the faq which also includes a section on xmh by sending mail to mail server pit manager mit edu containing the request send usenet news answers mh faq subject why am i suddenly unable to connect to my sun x server after a seemingly random amount of time after the x server has been started no other clients are able to connect to it the default cron cleanup jobs supplied by sun for at least delete old unreferenced files from tmp including tmp x unix which contains the socket descriptor used by x the solution is to add type s to the find exclusion in the cron job subject why don t the r pex demos work on my mono screen the r sample server implementation works only on color screens sorry subject how do i get my sun type keyboard fully supported by xsun many users wants the num lock key to light the num lock led and have the appropriate effect on the numeric keypad the xsun server as distributed by mit doesn t do this but there are two different patches available the first patch is written by jonathan lemon and fixes the num lock related problems it is available from export lcs mit edu in the file contrib xsun r numlock patch z the second is written by martin forssen and fixes the num lock and compose keys and adds support for the different national keyboard layouts for type and type keyboards this patch is available from export lcs mit edu in contrib sunkbd tar z or via email from maf dtek chalmers se thanks to martin forssen maf dtek chalmers se or maf math chalmers se a set of patches by william bailey dbgwab arco com was posted to newsgroups to provide support for the type keyboard subject how do i report bugs in x generally report bugs you find to the organization that supplied you with the x window system if you received the r source distribution directly from mit please read the file mit bug report for instructions look in mit doc bugs bug report in r thanks to stephen gildea gildea expo lcs mit edu subject why do i get warning widget class version mismatch this error which typically goes on to say widget vs intrinsics indicates that the header files you included when building your program didn t match the header files that the xt library you re linking against was built with check your i include path and l link path to be sure however the problem also occurs when linking against a version of the x r xt library before patch the version number was wrong some sun ow systems in particular were shipped with the flawed version of the library and applications which link against the library typically give the warnings you have seen subject where can i find a dictionary server for xwebster webster s still owns the copyright to the on line copies of webster s dictionary which are found at various university sites after it became aware that these sites were then acting as servers for other sites running xwebster and gnuemacs webster it asked that server sites close off external access the next machine apparently is also licensed to have the dictionary a webster daemon for next machines is available from iuvax cs indiana edu in pub webster next unless you want to get a legal on line copy yourself or can find a site which can grant you access you are probably out of luck however if you are a legitimate site you ll want to pick up the latest xwebster as is on export contrib xwebster tar z the file xwebster readme includes discussions of the availability illegality and non availability of dictionary servers courtesy steve umiacs umd edu steve miller and mayer hplabs hp com niels mayer subject topic obtaining x and related software and hardware subject is x public domain software no the x software is copyrighted by various institutions and is not public domain which has a specific legal meaning however the x distribution is available for free and can be redistributed without fee contributed software though may be placed in the public domain by individual authors subject how compatible are x r r and r what changes are there the release notes for each mit release of x specify the changes from the previous release the x consortium tries very hard to maintain compatibility across releases in the few places where incompatible changes were necessary details are given in the release notes each x distribution site on the network also offers the release notes that go with the release they offer the file typically can be found at the top of the distribution tree stephen gildea the comp windows x intrinsics faq xt lists xt differences among these versions subject where can i get x r source and or binaries information about mit s distribution of the sources on bpi and qic tape and its distribution of hardcopy of the documents is available from software center technology licensing office massachusetts institute of technology carleton street room e cambridge ma phone you will need about mb of disk space to hold all of core and mb to hold the contrib software donated by individuals and companies please use a site that is close to you in the network note that the release notes are generally available separately in the same directory the notes list changes from previous versions of x and offer a guide to the distribution north america anonymous ftp california gatekeeper dec com pub x r california soda berkeley edu pub x r indiana mordred cs purdue edu pub x r maryland ftp brl mil pub x r good for milnet sites massachusetts crl dec com pub x r massachusetts export lcs mit edu pub r crl dec com is better michigan merit edu pub x r missouri wuarchive wustl edu packages x r montana ftp cs montana edu pub x v r new mexico pprg eece unm edu pub dist x r new york azure acsu buffalo edu pub x r north carolina cs duke edu dist sources x r ohio ftp cis ohio state edu pub x v r ontario ftp cs utoronto ca pub x r washington dc x r a uu net x r washington dc x r b uu net x r europe middle east australia anonymous ftp australia munnari oz au x v r denmark freja diku dk pub x r united kingdom src doc ic ac uk graphics x v r hpb mcc ac uk pub x r finland nic funet fi pub x r france nuri inria fr x x r germany ftp germany eu net pub x x r israel cs huji ac il pub x r italy ghost sm dsi unimi it pub x r netherlands archive eu net windows x r norway ugle unit no pub x r norway nac no pub x r switzerland nic switch ch software x r japan anonymous ftp kanagawa sh wide ad jp x r kwansai ftp ics osaka u ac jp x r kyushu wnoc fuk wide ad jp x r tisn utsun s u tokyo ac jp x r tokyo kerr iwanami co jp x r tokyo scslwide sony co jp pub x r uucp uunet for uunet customers x r decwrl existing neighbors only pub x r osu cis x v r not online until sept utai existing neighbors only ftp pub x r hp nl netherlands only uucp pub windows x r nfs missouri wuarchive wustl edu archive packages x r mount point archive afs pennsylvania afs grand central org pub x r niftp hhcp cpf fcp united kingdom uk ac ic doc src x v r user guest anon ftam united kingdom janet x v r internet ixi acsnet australia munnari oz fetchfile x v r please fetch only one file at a time after checking that a copy is not available at a closer site updated for contrib anyone in europe can get a copy of the mit x v r distribution including the core and contributed software and all official patches free of charge the only requirement is to agree to return the tapes or equivalent new tapes only qic and tk format cartridges can be provided contact jamie watson adasoft ag nesslerenweg wabern switzerland tel or fax jw adasoft ch uk sites can obtain x through the ukuug software distribution service from the department of computing imperial college london in several tape formats you may also obtain the source via janet and therefore pss using niftp host uk ac ic doc src name guest password your email address queries should be directed to lee mcloughlin or to info server doc ic ac uk or ukuug soft uk ac ic doc send a subject line of wanted also offered are copies of comp sources x the export lcs mit edu contrib and doc areas and most other announced freely distributable packages x r and x r source along with x r contrib code prebuilt x binaries for major platforms and source code examples from o reilly s books is available on an iso format cd rom from o reilly associates as of x r source is available on iso format cd rom for members of the japan unix society from hiroaki obata obata jrd dec com x r source along with gnu source the comp sources x archives and sparc binaries is available on an iso format cd rom from pdq software or robert a bruce rab sprite berkeley edu x r source is available from automata design associates various users groups e g sug offer x sources cheaply typically on cd rom source for the andrew user interface system and binaries for common systems are available on cd rom information info andrew requests andrew cmu edu fax binaries for x r with shared libx and libxmu for a ux are now available from wuarchive wustl edu archive systems aux x r patches for x r compiled with gcc but not shared libraries are also available john l coolidge coolidge cs uiuc edu binaries by rich kaul kaul ee eng ohio state edu for the sun i running sunos are available on dsinc dsi com please only after hours usa est binaries for the sun i are available from compaq com in pub sun i sources and from vernam cs uwm edu a binary tree for the next by douglas scott doug foxtrot ccmrc ucsb edu is on foxtrot ccmrc ucsb edu it is missing the server though binaries for the sun i are in vernam cs uwm edu sun i binaries for the hp pa are on hpcvaaz cv hp com source and binaries for hp ux s and domain k dn k are available through the interworks users group contact carol relph at fax or relph c apollo hp com patches to x r for solaris by casper h s dik casper fwi uva nl et al are on export in contrib r sunos patch tar z r sunos patch readme patches to x r for the sun type keyboard and the keyboard numlock are available from william bailey dbgwab arco com also binaries are available from unipalm xtech unipalm co uk probably for the sun platforms david b lewis faq craft uunet uu net just the faqs ma am joe friday david b lewis temporarily at but not speaking for visual inc day dbl visual com evening david craft uunet uu net
2,840
comp.windows.x
pointer cursor hi i am trying to implement a pointer feature in xlib i have multiple windows and all can take input and show output simultaneously on all other displays i want to implement a pointer feature i would like to get the pointer to come up on all windows once i choose pointer in the menu and every one should be able to see it can you give me some hints as to how i should proceed i am new to xlib replies will be greatly appreciated thank you prakash duvvuri cs odu edu
2,841
comp.windows.x
lost in tekhvc color space please respond via email has anybody actually seen the tek color space stuff working i m not having any luck with either the xtici editor from export lcs mit edu or with o reilly s ftp able example xcms from ftp uu net the o reilly example fails for almost every set of inputs because xcmstekhvcquerymaxv returns a smaller value than xcmstekhvcqueryminv does which makes no sense to me the xtici editor fails in xcmsstorecolors apparently because the mathematical manipulations of the color specs results in invalid values so you can t actually edit any colors we have x r patch level bit pseudocolor visual i ve poked around in the xcms code in xlib but without some understanding of the theory i have no idea what s going wrong can somebody confirm if either of the above mentioned programs work on their systems or let me know if they fail for you too please include what hardware software patch levels you have any hints please respond with email as i don t regularly read this group thanks karen karen bircsak concurrent computer corporation karenb westford ccur com
2,842
comp.windows.x
comp windows x frequently asked questions faq archive name x faq part last modified subject where can i get patches to x r the release of new public patches by the mit x consortium is announced in the comp windows x announce newsgroup patches themselves are available via ftp from export and from other sites from which x is available they are now also distributed through the newsgroup comp sources x some source re sellers may be including patches in their source distributions of x people without ftp access can use the xstuff mail server it now has patches for x r send to xstuff expo lcs mit edu the subject line send fixes where is the name of the patch and is usually just the number of the patch here are a few complications fix is in four parts you need to request a b c and d separately the file sungx uu which was part of an earlier patch was re released with patch note the file doesn t work with solaris fix is in two parts a and b fix is in three parts a b and c fix is in two parts a and b fix replaces the r fix test for the x test suite which previously was optional fix also needs pexlib tar z which you can obtain from xstuff by asking for pexlib uu fix is in parts a through i subject what is the xstuff mail archive the xstuff server is a mail response program that means that you mail it a request and it mails back the response any of the four possible commands must be the first word on a line the xstuff server reads your entire message before it does anything so you can have several different commands in a single message unless you ask for help the xstuff server treats the subject header line just like any other line of the message the archives are organized into a series of directories and subdirectories each directory has an index and each subdirectory has an index the top level index gives you an overview of what is in the subdirectories and the index for each subdirectory tells you what is in it the command help or send help causes the server to send you a more detailed version of this help file if your message contains a line whose first word is index then the server will send you the top level index of the contents of the archive if there are other words on that line that match the name of subdirectories then the indexes for those subdirectories are sent instead of the top level index for example you can say send index fixes or index fixes a message that requests an index cannot request data if your message contains a line whose first word is send then the xstuff server will send you the item s named on the rest of the line to name an item you give its directory and its name for example send fixes a b you may issue multiple send requests the xstuff server contains many safeguards to ensure that it is not monopolized by people asking for large amounts of data the mailer is set up so that it will send no more than a fixed amount of data each day if the work queue contains more requests than the day s quota then the unsent files will not be processed until the next day whenever the mailer is run to send its day s quota it sends the requests out shortest first some mailers produce mail headers that are unusable for extracting return addresses if you use such a mailer you won t get any response if you happen to know an explicit path you can include a line like path foo bar bitnet mitvma mit edu or path bar foo frotz in the body of your message and the daemon will use it the xstuff server itself can be reached at xstuff expo lcs mit edu if your mailer deals in notation try sending to someplace mit eddie expo lcs mit edu xstuff based on information from the mit x consortium subject where can i get x r source and binaries integrated computer solutions inc ships x r on half inch quarter inch and tk formats call for ordering information the free software foundation sells x r on half inch tapes and on qic cartridges yaser doleh doleh math cs kent edu p o box kent oh is making x r available on hp format tapes track and sun cartridges european sites can obtain a free x r distribution from jamie watson who may be reached at chx pan jw or jw pan uu ch non standard logics requests nsl fr makes source available ixi limited is selling x r source on quarter inch cartridge formats and on and floppy with other formats available on request ixi virtual technologies provides the entire x r compressed source release on a single qic quarter inch cartridge and also on meg or meg floppies upon request conor cahill cpcahil virtech uu net young minds makes the r and gnu distributions available on a full text indexed cd rom note that some distributions are media only and do not include docs x r is ftp able from export lcs mit edu these sites are preferable though and are more direct machine internet ftp location name address directory west usa gatekeeper dec com pub x r central usa mordred cs purdue edu pub x r central usa giza cis ohio state edu pub x v r southeast usa uunet uu net x r northeast usa crl dec com pub x r uk janet src doc ic ac uk x v r uk niftp uk ac ic doc src xv r australia munnari oz au x v r the giza cis ohio state edu site in particular is known to have much of the contrib stuff that can be found on export the release is available to dec easynet sites as crl pub x r sites in australia may contact this address ftp adelaide edu au and check the directory pub x r the machine shadows export and archives comp sources x mark prior mrp ucs adelaide edu au note a much more complete list is distributed as part of the introductory postings to comp sources x a set of x r binaries built by tom roell roell informatik tu muenchen de for the ix will available from export lcs mit edu in contrib and in pub i x r from in europe stephen hite shite sinkhole unf edu can also distribute to folks without ftp facilities via disks sent sase contact him for usmail and shipping details in addition the binaries are available via uucp from szebra tb pep ogin nuucp sword nuucp in usr xbbs bbs x in addition the source is on zok in usrx i r server in addition if you are in the us the latest svr binary april patches and fonts are available on piggy ucsb edu in the directory pub x same filenames as above please use after pm pacific as these are large files a set of hp binaries is available on hpcvaaz cv hp com as ftp pub mitx r libs x z a set of x r binaries for the next x have been made available by howie kaye on cunixf cc columbia edu a set of binaries by john coolidge coolidge cs uiuc edu for the mac running a ux is available from wuarchive wustl edu in the file archive systems aux x r xupdate tar z also in x r diffs is a set of patches for making x r with shared libraries with mkshlib a complete distribution of sco x r binaries by baruch cochavy blue techunix technion ac il can be found on uunet the server is roell s x b compiled for et based svga boards subject where can i get osf motif you can obtain either osf motif source or binaries from a number of vendors motif source is now available it is based on x r motif is based on the r intrinsics and is currently at an osf motif source license must be obtained from osf before source can be obtained from the open software foundation or any value added vendor for any version call the direct channels desk at osf at for ordering information various hardware vendors produce developer s toolkits of binaries header files and documentation check your hardware vendor particularly if that vendor is an osf member in addition independent binary vendors produce motif toolkits for machines for which motif is not supported by a vendor the kits include varied levels of bug fixing and support for shared libraries and are based on widely divergent version of motif quest sells kits for suns as well ixi offers kits for sun and sun nsl requests nsl fr offers kits for the sun and sun bluestone consulting makes a kit for sun systems ics makes several binary kits notably for sun dec hp and dec have announced support for motif on sun systems unipalm currently offers for sun systems a motif development kit including x r and based on motif the us distributor is expert object corp bim ships motif binaries for suns shared library support is included contact alain vermeiren av sunbim be or danny backx db sunbim be at fax belgium silogic ships motif and motif on sun machines s i systems offers motif for solaris info in usa and canada metro link inc sales metrolink com in europe contact adnt univision uk ltd ships an implementation of x r and motif including a shared library implementation of libxm a for the unix market motif is also available for sun sparc based workstations it has also announced motif for solaris systems subject does motif work with x r x r motif is based on x r motif available in source form from osf as of august uses the vanilla x r intrinsics where vanilla means with just a few patches the file fix osf which osf distributes is obsoleted by mit s patches the file fix osf distributed with the version or its subsequent modification needs to be applied after mit fix though motif to will work with x r if x r is compiled with dmotifbc and later should work with the vanilla r although there are some known new geometry management problems subject where can i get toolkits implementing open look sun s xview has a sunview style api a version is on the x r tape the latest sources are on export in contrib xview xview and x binaries for the sun i roadrunner are available for ftp from svin win tue nl directory pub x r i supported binaries of xview or include xview for non sun platforms domestic and selected international vendors several are also available from sun contact your local sales office amiga gfxbase inc ellwell drive amigados milpitas ca fax sgi sony news os ibm rs hp decstation unipress software lincoln highway ultrix edison nj fax unipress software ltd po box viking house fax nelson street douglas isle of man united kingdom dec vaxstation tgv mission street vms tgv santa cruz ca fax unipalm ltd st neots road hardwick fax cambridge cb qj england intel quarterdeck office pico boulevard dos systems santa monica ca fax intel sunsoft corporation center drive west interactive suite unix and los angeles ca sco unix stardent scripps institute clinic mb stellix os fax n torrey pines road and titan os include mailstop mb la jolla ca by ftp in pub binary xview readme xview tar z at t s open look gui xt based toolkit is now generally available contact unix for information binaries are produced for sparc systems by international quest corporation a version of the toolkit is also produced under the name olit by sun more recent versions of olit have been ported to ibm and dec mips by both unipress and ics olit is also available for hp from melillo consulting mjm somerset nj makes olit for hp xx series running hpux decstations and rs s thanks to joanne newbauer jo attunix att com sun is shipping openwindows contact your local sales representative for more details the package includes toolkit binaries and header files parcplace s formerly solbourne s extensible c based object interface library which supports run time selection between open look or motif is available from subject where can i get other x sources including r modifications the mit software center ships the x test suite on tape a multi threaded version of xlib based on x r patch is now available for anonymous ftp from new version dec on gatekeeper dec com in pub x contrib mt xlib mit on export lcs mit edu in contrib mt xlib hp has made available drivers to permit the building of the x r sample server on the hp series workstations the files are on export lcs mit edu in ftp contrib r hp srv user contributed software is distributed through the newsgroup comp sources x moderated by chris olson chris imd sterling com also check that group for posting information richard hesketh rlh ukc ac uk has been creating a list of freely available x sources the list is stored on export lcs mit edu in contrib as x source list z it lists the main storage locations for the program and international sites from which it may be ftp ed the machine export lcs mit edu has a great deal of user contributed software in the contrib directory a good deal of it is present in current or earlier versions on the x r x r and x r contrib tapes there are also directories for fixes to contrib software the file on export in contrib index txt is a quick overall index of the software in that area provided by daniel lewart d lewart uiuc edu these sites used to and may still mirror export and are of particular use for australasia anonymous ftp ftp adelaide edu au acsnet fetchfile sirius ua oz the material on giza cis ohio state edu which tends to duplicate the export archives is also available via anonymous uucp from osu cis at tb and v speeds write to uucp cis ohio state edu same as osu cis uucp for instructions the archive is now maintained by karl kleinpaste a new west coast uucp x archive is administered by mark snitily mark zok uucp and contains the full x distribution the xtest distribution an entire archive of comp sources x and other goodies the machine zok has a tb modem which will connect to k baud in that order the anonymous uucp account is uxarch with password xgoodies the modem s phone number is a sample systems or l sys entry might be zok any acu in in uxarch word xgoodies to get a current listing of the files that are available download the file usrx ls lr z a full subject index of the comp sources x files is available in the file usrx comp sources x index the machine has just the one modem so please do not fetch large amounts of data at one sitting courtesy mark snitily in addition uunet source archives tracks comp sources x and provides mb of compressed programs on bpi tapes or tapes it also mirrors export contrib in its packages x directory subject where can i get interesting widgets the free widget foundation fwf library sponsored by brian totty totty cs uiuc edu is now available on a cs uiuc edu in pub fwf v shar z the set of widgets there is intended to form the basis for future contributions to be added to the discussion list send to listserv cs uiuc edu a message saying subscribe listname your full name where listname is one of free widgets announce free widgets development or free widgets bugs version is current look for in the xew widget set contains widgets for data representation version is on export contrib xew tar z peter ware s xo open widget set which has motif like functionality is on archive cis ohio state edu as pub xo xo tar z the athenatools plotter widget set version beta maintained by peter klingebiel klin iat uni paderborn de includes many graph and plotting widgets a copy is on export in plotter v b tar z plotter doc tar z plotter afm tar z and plotter readme the latest versions may in fact be on ftp uni paderborn de in unix tools an advance version of marc quinton s motif port of the fwf multilist widget is in ftp stna stna dgac fr pub multilist tar z additional widgets are available on the contrib portion of the x r tapes these include the xcu set paul johnston s johnston spc jpl nasa gov x control panel widget set emulates hardware counterparts sources are on export lcs mit edu in xc tar z o reilly volume doug young s book the asente swick book and jerry smith s object oriented programming with the x window system toolkits all include details on writing widgets and include several useful widgets sources are typically on export and or uunet the dirt interface builder includes the libxukc widet set which extends the functionality of xaw a graph widget and other d plot and d contour widgets by sundar narasimhan sundar ai mit edu are available from ftp ai mit edu as com ftp pub users sundar graph tar z the graph widget has been updated with documentation and histogram capabilities a graph widget is available from ftp stna stna dgac fr in pub graph tar z it uses a segment list for drawing and hence supports a zoom operation ken lee s xm widget demo that uses display postscript to draw labels at a non horizontal angle is on export in contrib dpslabel tar z the table widget works like troff tbl tables is available in several flavors one of which is with the widget creation library release bell communications research has developed a matrix widget for complex application layouts it s on export in contrib xbae widgets tar z the distribution also includes a caption widget to associate labels with particular gui components dan connolly s connolly convex com xcrichtext interprets rtf data it s on export as contrib xcrichtext tar z the xmgraph motif based graphing widget is on iworks ecn uiowa edu in comp hp gui classic xmgraph tar z although it may not be stable a tex style layout widget by keith packard is described in the proceedings of the th mit technical conference o reilly x resource volume source is available on export contrib layout tar z a version of lee iverson s leei mcrcim mcgill edu image viewing tool is available as contrib vimage tar z on export lcs mit edu the package also includes an imageviewport widget and a filedialog widget in addition the pext toolkit by rich thomson rthomson dsd es com is available on export as pext tar z it includes a pex widget making it easier to use pex in xt based programs a motif port of the xaw clock widget is in ftp stna stna dgac fr in pub clock tar z a modification of the xaw scrollbar widget which supports the arrowhead style of other toolkits is on export in contrib xaw scrollbar mta z a beta release of the r xaw widgets with a d visual appearance by kaleb keithley kaleb thyme jpl nasa gov is available on export in contrib xaw d r xaw d tar z the library which is binary compatible with the mit xaw implements a d subclass which handles the extra drawing also the xmt motif tools dovetail systems s shareware library of widgets and many convenience functions is available from export lcs mit edu contrib and ftp ora com pub xbook xmt in xmt readme and xmt tar z the xtra xwidgets set includes widgets for pie and bar charts xy plots help spreadsheets data entry forms and line and bar graphs contact graphical software technology at info gst com for information the xrt graph widget available for motif xview and olit displays x y plots bar and pie charts and supports user feedback fast updates and postscript output contact kl group inc at info klg com a set of data entry widgets for motif is available from marlan software gwg world std com a set of graph widgets is available from expert database systems a set of osf motif compound widgets and support routines for d visualization is available from ms quek lee hian national computer board republic of singapore tel fax leehian iti gov sg leehian itivax bitnet the ics widget databook includes a variety of control widgets and special purpose widgets available on a variety of platforms information info ics com information on graphing tools may be obtained from info tomsawyer com fax subject where can i get a good file selector widget the free widget foundation set offers a fileselector widget with separate directory path and file listing windows and the filecomplete which has emacs style file completion and expansion other available file requestor widgets include the xifileselector from iris software s book the xdbx file selector extracted by david nedde daven wpi wpi edu and the filenominator from the axe distribution the ghostview xfig and vimage packages also include file selector widgets subject what widget is appropriate to use as a drawing canvas some widget sets have a widget particularly for this purpose a workspace or drawingarea which doesn t display anything but lets your xt application know when it has been re exposed resized and when it has received user key and mouse input the best thing to do for other widget sets including the athena set is to create or obtain such a widget this is preferable to drawing into a core widget and grabbing events with xtaddeventhandler which loses a number of benefits of xt and encapsulation of the functionality at least one version has been posted to comp sources x name the publicly available programs xball and xpic include other versions the athena widget manual mit doc xaw template in the r distribution includes a tutorial and source code to a simple widget which is suitable for use the free widget foundation set contains a canvas widget subject what is the current state of the world in x terminals jim morton jim applix com posts quarterly to comp windows x a list of manufacturers and terminals it includes pricing information notable buyers guide surveys include the september issue of systems integration subject where can i get an x server with a touchscreen or lightpen labtam fax offers a surface acoustic wave touch screen option on its xengine terminals tektronix provides an x terminal with the xtouch touch screen this terminal may also be resold through trident systems metro link supports the elographics serial touch screen controllers subject where can i get an x server on a pc dos or unix mit x r already provides a server to many unixes with support for many of the popular video graphics adapters and for other non msdos pcs you can obtain a server from these sources xfree formerly x e is an enhanced version of x which was distributed with x r it includes many bug fixes speed improvements and other enhancements source for version is on export lcs mit edu in pub contrib ftp physics su oz au in x and ftp win tue nl in pub x in addition binaries are on ftp physics su oz au and ftp win tue nl among other systems info x physics su oz au note this package obsoletes glenn lai s speedup patches for an enhanced x r server for unixes with et boards speedup tar z on export metro link inc sales metrolink com in europe contact adnt ships an implementation of x r for the unix market sgcs offers x version based on thomas roell s x r two headed server in binary and source form information info sgcs com isc sco uhc and other well known operating system vendors typically offer x servers for msdos pcs daniel j mccoy mccoy gothamcity jsc nasa gov has started posting monthly a list of non unix servers for pcs macs and amigas it includes pricing information the current copy is kept on export in contrib as xservers nonunix txt z an article on pc x servers appears in the march open systems today also of possible use net i from programit enables communication among dos os and unix machines and can be used to display pc sessions on your unix x display subject where can i get an x server on a macintosh running macos exodus from white pine software runs on any mac with at least mb of memory and runs the x server within a standard macintosh window version supports intermixing of x and mac windows and the adsp protocol the version supports the shape extension and includes decwindows support apple s macx runs on macplus or newer machines with mb of memory and system software or later version is fully x r based it supports full icccm compatible cut and paste of text and graphics between the macintosh and x worlds the shape extension including shaped windows on the macintosh desktop an optional built in icccm compliant window manager x r fonts and colors a built in bdf font compiler and built in standard colormaps upgrades to macx are available by ftp from aux support apple com info note macx is also the name of a vax mac xmodem transfer utility also liken unix or info qualix com software enables monochrome mac applications to run on a sparc system running x xport unix or xport qualix com enables mac applications to display on an x based workstation by turning the mac into an x client intercon has a product called planet x which enables mac applications to display on an x server subject where can i get x for the amiga the new amiga machines offer an x server and open look tools and libraries on a full svr implementation gfxbase inc provides x r for the amigados computer it contains x r clients fonts etc and a release color server an optional programmer s toolkit includes the header files libraries and sample programs info from gfxbase dale luck uunet cbmvax pyramid boing dale subject where can i get a fast x server for a workstation the r server should be among the fastest available for most machines sun sells a direct xlib product which improves rendering for applications running on the same machine as the x server the replacement xlib library accesses graphics hardware directly using sun s direct graphics access dga technology international quest corporation has an optimized r server for sun under sunos unipalm have r servers for sun and sparc platforms these are optimised to use graphics hardware and will run with sunview information or xtech unipalm co uk xgraph s xtool is an x server implemented in sunview which boasts impressive results on sun and sparc systems several companies are making hardware accellerator boards dupont pixel systems for sun megatek s x cellerator board for the sun and sun is based on the ti the company claims performance improvements of x to x over the sample x r server subject where can i get a server for my high end sun graphics board takahashi naoto electrotechnical laboratory ntakahas etl go jp has modified the mit x r server to support the sun cg cg and cg boards the files are on export in contrib xsun tar z note that both files are necessary to build xsun the jpl r xsun multi screen server is a general purpose replacement for the mit server ddx sun layer it provides for the screen to be split among several monitors and implements several other features above the mit implementation available on export lcs mit edu in the file contrib r xsun multi screen tar z kaleb keithley kaleb thyme jpl nasa gov the file was updated mar subject where can i get an x terminal server for my low end sun seth robertson seth ctr columbia edu has written xkernel the current version as of expected rsn is on sol ctr columbia edu in pub xkernel gamma it turns a sun into a pseudo x terminal most of the overhead of the operating system is side stepped so it is fairly fast and needs little disk space a similar approach is to run the regular x server by making etc init a shell script which does the minimal setup and then invokes xsun like this example script from mouse larry mcrcim mcgill edu bin sh exec dev console etc fsck p dev nd case in etc reboot q n echo nd fsck failed get help etc halt echo interrupted etc reboot echo unknown error in reboot fsck get help etc halt esac bin dd if tmp fs of dev nd bs count dev null etc mount dev nd tmp etc ifconfig le netmask broadcast etc mount o ro apollo u x lib local lib x etc route add default dev null set etc ifconfig le exec xsun once multidisp mux query sh vn local lib x xdm servers subject what terminal emulators other than xterm are available pcs has rewritten xterm from scratch using a multi widget approach that can be used by applications a version is on the r contrib tape and on export in contrib emu tar z for more information contact me dude pcs com mxterm a motif based xterm is available from the paderborner ftp server ftp uni paderborn de file unix x more contrib mxterm tar z the color terminal widget provides ansi terminal emulation compatible with the vtx series a version is on export in contrib ctw tar z a motif version is on ftp stna stna dgac fr in pub term tar z kterm is an x r based vt vt and tektronix terminal emulator that supports display of chinese japanese and korean text in vt mode also supported are ansi color sequences multi byte word selection limited compound text support and tab and newline preservation in selections kterm is also available from these anonymous ftp sites clr nmsu edu pub misc kterm tar z export lcs mit edu contrib kterm tar z kum kaist ac kr pub unix xstuffs kterm tar z courtesy of mark leisher mleisher nmsu edu kterm tar z is now on export mterm by mouse larry mcrcim mcgill edu is an x terminal emulator which includes ansi x and dec emulation modes mterm can be had by ftp to larry mcrcim mcgill edu in x mterm src mterm ball o wax cxterm is a chinese xterm which supports both gb and the so called big encoding hanzi input conversion mechanism is builtin in cxterm most input methods are stored in external files that are loaded at run time users can redefine any existing input methods or create their own ones the x r cxterm is the rewritten of cxterm version based on x r xterm it is in the r contrib software thanks to zhou ning zhou tele unit no and steinar bang uunet idt unit no steinarb xvt is available on export s contrib in xvt tar z and xvt readme it is designed to offer xterm s functionality with lower swap space and may be of particular use on systems driving many x terminals x is in x r contrib also ibm sells a emulator for the rs part it s based on motif century software sells a vt terminal emulator for x vt wyse and sco color console emulation are also available grafpoint s tgraf x provides emulation of tektronix and xx graphics terminals it s available for most major platforms information inc free demo copies fax uunet grafpnt sales ixi s x deskterm a package for integrating character based applications into an x environment includes a number of terminal emulation modules information pericom produces teem x a set of several emulation packages for a number of tek dec westward and data general terminals the software runs on sun sun apollo dec isc ibm aix information us uk sco s scoterm info sco com part of its open desktop environment is a motif compliant sco ansi color console emulator subject where can i get an x based editor or word processor you can ftp a version of gnu emacs the extensible customizable self documenting real time display editor including x support from prep ai mit edu pub gnu emacs tar z or informatik tu muenchen de pub gnu emacs emacs tar z epoch is a modified version of gnu emacs with additional facilities useful in an x environment current sources are on cs uiuc edu in ftp pub epoch files epoch the current version is in europe try unido informatik uni dortmund de there are two subdirectories epoch contains the epoch source and gwm contains the source to the programmable window manager gwm with which epoch works well you can get on the epoch mailing list by sending a request to epoch request cs uiuc edu lucid emacs is a version of gnu emacs derived from an early version of emacs version it currently requires x windows to run x support is greatly enhanced over gnu emacs version including support for multiple x windows input and display of all iso latin characters zmacs lispm style region highlighting a customizable motif like menubar more powerful keymap support flexible text attributes support on regional and screen local basis through x resources and or lisp and support for the x selection mechanism lucid emacs is free the latest version is and is available from labrea stanford edu in the pub gnu lucid directory the andrew system on the x contrib tapes has been described as one of the best word processing packages available it supports word processing with multi media embedded objects rasters tables spread sheets drawings style editor application builder embedded programming language c release became available june fred hansen wjh andrew cmu edu you may be able to use the remote andrew demo service to try this software try finger help atk itc cmu edu for help the interviews c toolkit contains a wysiwig editor called doc it saves and loads files in a latex like format not quite latex the package can also import idraw postscript drawings a simple editor axe by j k wight newcastle ac uk is available on export and arjuna newcastle ac uk as axe tar z it is based around the xaw text widget ted is a simple motif based text editor it is a wrapper around the motif text widget which offers search replace paragraph formatting and navigation features ted is available from ftp eos ncsu edu as pub bill tar z here are also executables there point by crowley unmvax cs unm edu charlie crowley is tcl tk based and offers dyanimic configuration and programming in the tcl macro language the editor is available from unmvax cs unm edu as pub point point tar z asedit by andrzej stochniol astoch ic ac uk is on export in contrib asedit tar z it is a simple text editor built around the motif text widget version was released also elan computer group mountain view ca has announced the avalon publisher an x open look wysiwyg electronic publishing system framemaker and framewriter are available as x based binary products for several machines frame is at ca wx formerly indepthedit is available from non standard logics requests nsl fr buzzwords international inc has an editor called professional edit that runs under x motif for various platforms info decwrite is available from dec for some dec hardware and sunwrite is available from sun islandwrite will soon be available from island graphics info island com for some hp apollo platforms interleaf is currently available from interleaf ma on all sun and dec platforms others are under development the aster x office integration tools from applix applix ma include a multi font wysiwg document composer for several systems arbortext inc provides an x version of its electronic publishing program called the publisher the publisher is available on sun hp and apollo workstations contact arbortext at iris computing laboratories offers the ie editor info or info spectro com bbn slate from bbn software products includes a menu driven word processor with multiple fonts and style sheets it supports x on multiple platforms or slate offer bbn com the powerful sam editor by rob pike is split into a host portion and a front end graphics portion which now has an x implementation sam is now available by anonymous ftp from research att com in dist sam bundle z watch that space for updated versions there is a mailing list for sam users requests to sam fans request hawkwind utcs toronto edu a set of extensions which augment the mouse activity with the keyboard is available from uxc cso uiuc edu in pub sam samx shar innovative solutions or brian zimbelman is brian bbx basis com publishes the user configurable motif based xamine editor qualix offers a product information info qualix com or unix typex is a motif based editor available for several systems information amcad research fax wordperfect offers an x based version of wordperfect for several workstations information or subject where can i get an x based mailer xmh an x interface to mh is distributed with the x release xmail is an x based window interface to berkeley style mail handlers it is styled primarily after the sunview mailtool application and builds on most unix systems the current release is available in the mit x r contrib tape and from export and uunet info jeff markham markham cadence com mmh my mail handler a motif interface to the mh mail handler is available from ftp eos ncsu edu in pub bill tar z it is bundled with the ted editor which it uses for composing messages motif is required if you don t have it look for dec and sparc executables in the same place information and problems to erik scott escott eos ncsu edu the andrew toolkit supports the andrew message system it is available from export and many other x archives and from emsworth andrew cmu edu or send email to susan andrew cmu edu release became available june you may be able to use the remote andrew demo service to try this software try finger help atk itc cmu edu for help xmailtool is an xaw based interface to a bsd style mail reader version was released information bob kierski bobo cray com or cem is a motif based mailer using standard mailbox formats it is on nelson tx ncsu edu in pub cem information sam moore sam moore ncsu edu also alfalfa software offers poste a unix based mailer that has motif and command based interfaces it includes support for multimedia enclosures and supports both the internet and x mail standards information info alfalfa com z code software offers z mail for most unix systems binaries support both tty and motif interfaces the mailer includes a csh like scripting language for customizing and extending mail capabilities information info z code com several vendors systems include x based mailers dec offers dxmail sun offers an x based mailtool sco info sco com includes scomail in its open desktop product several integrated office productivity tools include mailers the aster x office integration tools from applix applix ma include a mailer subject where can i get an x based paint draw program xpic is an object oriented drawing program it supports multiple font styles and sizes and variable line widths there are no rotations or zooms xpic is quite suitable as an interactive front end to pic though the xpic format produced can be converted into postscript the latest version is on the r contrib tape in clients xpic xfig by brian v smith bvsmith lbl gov is an object oriented drawing program supporting compound objects the xfig format can be converted to postscript or other formats recent versions are on the r contrib tape or on export in contrib r fixes version idraw supports numerous fonts and various line styles and arbitrary rotations it supports zoom and scroll and color draws and fills the file format is a postscript dialect it can import tiff files distributed as a part of the interviews c toolkit current release from interviews stanford edu a version of robert forsman s thoth lightning cis ufl edu xscribble an bit paint program for x is now on ftp cis ufl edu in pub thoth xpaint is available from ftp ee lbl gov as xpaint tar z a rewrite xpaint by david koblas koblas netcom com was released as xpaint pl tar z xpaint is a bitmap pixmap editing tool a new openwindows postscript based graphical editor named ice is now available for anonymous ftp from internet host lamont ldgo columbia edu ice image composition environment is an imaging tool that allows raster images to be combined with a wide variety of postscript annotations in wysiwyg fashion via x imaging routines and news postscript rasterizing it may require openwindows and sun c tgif by william cheng william oahu cs ucla edu is available from most uucp sites and also from export and from cs ucla edu it is frequently updated version patch was released the pixmap program info colas sa inria fr for creating pixmaps is on the r contrib tape it resembles the bitmap client version is now available although metacard is not generally classified as a paint program a full bit color image editor is built into the program which can be used for light image editing and for producing color icons info metacard com metacard is available via anonymous ftp from ftp metacard com csn org or pixt by j michael flanery produces xpm output also dxpaint is a bitmap oriented drawing program most like macpaint it s good for use by artists but commonly held to be bad for drawing figures or drafting dxpaint is part of dec s ultrix release framemaker has some draw capabilities bbn slate from bbn software products includes a full featured draw and paint program with object grouping and multiple patterns multiple x platforms or slate offer bbn com dux ta dah islandgraphics offers islanddraw islandpaint islandpresent info corel draw ported to x by prior data sciences arts letters composer ficor autograph openwindows includes the olpixmap editor sco odt includes the scopaint editor hp vue includes the vueicon editor several integrated office productivity tools include draw paint capabilities the aster x office integration tools from applix applix ma include draw paint capabilities thanks in part to stephen j byers af cobcs cummins com and to j daniel smith dsmith ann arbor applicon slb com david b lewis faq craft uunet uu net just the faqs ma am joe friday david b lewis temporarily at but not speaking for visual inc day dbl visual com evening david craft uunet uu net
2,843
comp.windows.x
re honors degrees do they mean anything tkld cogsci ed ac uk kevin davidson writes in my opinion a programming degree is still worth having yes but a cs degree is not a programming degree does anybody know of a computing course where programming is taught computer science is a branch of maths or the course i did was i ve also done a software engineering course much more practical and likely to be the sort of thing an employer really wants rather than what they think they want but also did not teach programming the ability to program was an entry requirement try the m sc computing science course at the real newcastle university it s a conversion course but at least they teach real programming in the space of months we were taught pascal simula prolog miranda also some basic low level stuff was covered as well they also did concurrent programming and operating systems some software engineering plus quite a few optional units including database theory and some stuff about comms the pascal is to be replaced by c c i think next year i learn t this and x windows programming as well anyway via a good selection of project over the final three months depending on your tastes the selection of skills learn t can be quite wide reaching the one critiscism i would level at the course which i would have thought invaluable is the lack of an option to do the project period in industry this would probably need a slightly longer project period say six months but would enhance the prestige and usefulness of an already excellent and thorough course yes i know this sounds like a plug for the course why not mackem ian
2,844
comp.windows.x
re cute x clients try this include stdio h include x xlib h include x xutil h display dpy int screen xcolor xclrs xclrp xid cmap int cells i j red green blue got main dpy xopendisplay null screen defaultscreen dpy cells displaycells dpy screen cmap xcreatecolormap dpy rootwindow dpy screen defaultvisual dpy screen xclrs xcolor malloc cells sizeof xclrs xclrp xclrs for i i cells i xclrp pixel i xclrp flags xclrp xquerycolors dpy defaultcolormap dpy screen xclrs cells xstorecolors dpy cmap xclrs cells xinstallcolormap dpy cmap got while got xclrp xclrs got for i i cells i if xclrp red xclrp red got if xclrp green xclrp green got if xclrp blue xclrp blue got xclrp xstorecolors dpy cmap xclrs cells xinstallcolormap dpy cmap got while got xclrp xclrs got for i i cells i if xclrp red xclrp red got if xclrp green xclrp green got if xclrp blue xclrp blue got xclrp xstorecolors dpy cmap xclrs cells xinstallcolormap dpy cmap it will work on any pseudocolor xserver hopefully o o o brain inside o o o o andre beck abpsoft mehl andre beck irs inf tu dresden de o o o
2,845
comp.windows.x
re trouble compiling x r on sunos i was having the same problems compiling x r on a ipc sunos if you compile with make k world it will not stop on the ld errors as was stated in another post the clients with the errors still run correctly victor martinez vic fajita saic com
2,846
comp.windows.x
fwd progressives happy hour forwarding begins here date wed apr edt from women s center women andrew cmu edu to dist afs andrew cmu edu usr women dlists happyhour announce dl andrew cmu edu subject progressives happy hour enjoy good food and interesting company at the progressives happy hour thursday april starting at pm at the women s center located next to the laundromat in the margaret morrison plaza kosher for passover food will be served all are welcome good things to drink will be there but paper cups won t please be progressive and bring a cup or mug with you co sponsored by the student government president and funded by the student activites fee end of forwarding
2,847
comp.windows.x
problems with open windows after having openwindows version for sunos or xwindows running continuously on my machine for days the following message appears when trying to open a new window or to run any program that needs to open windows xview error cannot open connection to window server server package i would greatly appreciate any suggestions to solve this problem yali amit department of statistics university of chicago chicago il
2,848
comp.windows.x
problems with openwindows after having openwindows version for sunos or xwindows running continuously on my machine for days the following message appears when trying to open a new window or to run any program that needs to open windows xview error cannot open connection to window server server package i would greatly appreciate any suggestions to solve this problem yali amit department of statistics university of chicago chicago il
2,849
comp.windows.x
re xv root with vue was re xloadimage onroot on apr pdt jan camhpp mdcbbs com jan vandenbrande said jan nntp posting host jan on a related note how can i use xv to display colored gifs on my jan root display with hp vue jan all i can do with vue is display xbm s through their jan backdrop style manager jan xv does not seem to be able to override whatever vue jan puts there i suspect this is because vue creates a window probably overrideredirect that is the size of or larger than the root window because the window manager does not know about this you cannot move resize etc it xv in the mean time is busy changing your root window to whatever you have requested but you never get to see it because vue s window is overlaid on top of the root window contact hp support and see whether vue can support coloured bitmap format such as xpm if they cant then they probably create all their coloured backdrops inside the code guy singh ixi internet guy x co uk vision park uucp guy ixi uucp cambridge bang uunet ixi guy cb zr uk tel
2,850
comp.windows.x
how can i rotate text hi i am programming in xview sunos openwindows i would like to rotate some text and display it i did read the faq in comp windows x but am not sure how do i translate it to xview i would appreciate if someone can give me tips on how to do it thanx mahendra ps as i am not a frequent news group reader i would appreciate if answers replies would be mailed to me i will post a follow up mahendra chheda mmc cs rit edu mmc ritvax isc rit edu office residence dept of computer science kimball drive rochester institute of tech rochester ny tel tel
2,851
comp.windows.x
re trouble compiling x r on sunos in article apr fwi uva nl casper fwi uva nl casper h s dik writes epstein trwacs fp trw com jeremy epstein writes dmm head cfa harvard edu david meleedy writes there s a bug in sunos which is alluded to in the faq although there it s talking about x r as being affected you need to force libxmu to be linked statically rather than dynamically which works around the linker error the simplest thing to do is edit each of the makefiles where there s a failure and change the line which reads xmulib l xmusrc lxmu to xmulib l xmusrc bstatic lxmu bdynamic no this is only relevant for openwindows x as shipped with sunos it is not relevant for mit r mit r should compile without problems casper i don t know how many hours you ve spent on this but the sun user group makes x r available on cd rom to its members the disk has both sources and binaries and it sells for i ve tagged a table of contents and an orderform on below if anyone s interested alex newman alex newman voice my life may be stressful troll sug org fax but at least it s not boring sun user group beacon st brookline ma sug cd is x r and gnu on a cdrom priced at to sug members including a caddy sug s emphasis has always been on supplying the greatest possible service and value added to our members last year the sug disk contained plug and play x r mb of additional essential binaries almost mb of sun patches fully indexed archives of sun related net postings priced at only our aim this year has been to reduce the price for disks which can be produced inexpensively but to continue to supply as much value added as possible to accomplish this we will be putting out a two disk set the first containing what s ready and needed now the second available later in containing more sparc binaries and other useful material not found on previous disks the sug disk which was assembled by robert a bruce contains a lot of essential source code and we decided it would be a great service to make it available right away to our members and this pricing makes this a good opportunity to become a member for per disk including one of those hard to find caddies if you are not a sug member you can become one for an additional if you live within the us or outside the sug cdrom is an iso disk which means it can be used by pc macintosh and other workstations as well and contains a total of mb of material including x r sources and core binaries for sparc as of several weeks after the initial distribution thus four fixes and the the mit contrib distribution are included mb of material binaries for x xsun xsunmono appres atobm auto box bdftopcf beach ball bitmap bmtoa constype editres fs fsinfo fslsfonts fstobdf ico imake kbd mode listres lndir makedepend maze mkdirhier mkfontdir oclock plbpex puzzle resize showfont showrgb startx twm viewres x perf x perfcomp xauth xbiff xcalc xclipboard xclock xcmsdb xcmstest xconsole xcutsel xditview xdm xdpr xdpyinfo xedit xev xeyes xfd xfontsel xgas xgc xhost xinit xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xman xmh xmkmf xmodmap xon xpr xprop xrdb xrefresh xset xsetroot xstdcmap xterm xwd xwininfo xwud copies of contributed x sources from export lcs mit edu contrib which were then uncompressed untarred into source directories mb these are sources only and some of them were after the date of production of this disk included in the mit contrib and contrib distributions gnu sources which were uncompressed untarred into source directories mb sparc binaries and needed libraries for these gnu programs a p ar as basename bash bison cat cc cc plus chgrp chmod chown ci cmp co comm compress cp cpio cpp ctags cut cvs date dd df diff diff dir dirname du egrep elvis emacs env etags expand expr fgrep find find perl flex fold g g dep g filt gawk gcc gdb ginstall gnuchess gnuchessn gnuchessr gnugo gnuplot gnuplot x gprof grep h ph head id ident indent ispell ld ld less ln locate logname ls m make merge mkdir mkfifo mkmodules mknod mt mv nice nm oleo paste pathchk perl pr printenv printf ranlib rcs rcsdiff rcsinfo rcsmerge rcstest ref refont rlog rm rmdir rmt s p screen sed size sleep split strip stty sum tac tail taintperl tar tee test time touch tput tty uname unexpand uniq vdir virec whoami xargs xchess yes zmore an archive of comp source x postings volume through volume mb parts are supplied just as posted you get to put together the pieces compile install etc cost sug members non members additional within the us elsewhere shipping handling inside the usa elsewhere mail to sun user group inc suite beacon street brookline ma usa voice fax the sun user group also accepts visa and mastercard via telephone or electronically cut here and return completed form the sugcd order form the price of the cd is shipping and handling add usa or intl if you are not a member of the sun user group add usa or international to the above sums for membership you must be a sug member to purchase the cd rom i enclose a us check for sug member in the usa sug member outside the usa includes membership inside the usa includes international membership name signature company name sug membership if known electronic mail address telephone number check enclosed mastercard visa credit card exp date card holder signature ship to bill to i hereby authorize the sun user group to renew my membership and charge my credit card automatically on an annual basis i do not wish my name to be included in non sun user group mailings i do not wish my name to be published in the sun user group member directory i wish to be added to the sun user group electronic mailing list members only outside the u s only individuals outside of the usa may find using their credit cards easier than purchasing us checks as this eliminates bank charges sun user group beacon street suite brookline ma voice fax email office sug org
2,852
comp.windows.x
problem with tek xterminal we have recently purchased a tektronix xterminal and i m having a problem with it we have a graphics widget that we wrote to display waveforms and it doesn t work on the xterminal the buttons etc all show up and it seems to take the right amount of time to draw but nothing is visible in the graphics window i have no clue as to where to start looking the program works fine on all our suns s and s color and b w could anyone suggest a line of attack for this problem tekxpress xp color xterminal running host is a sun ipx running sunos and x r pl ned danieley ndd sunbar mc duke edu basic arrhythmia laboratory box duke university medical center durham nc or
2,853
comp.windows.x
remapping return key in a dialog i am new to x programming so please bear with me i am trying to have a dialog box that returns it s value upon the user entering a new value and hitting the return key don t want to have a done button the piece of code below will work if i exclude the xtnvalue argument but will not work as is can someone shed some light on this or suggest a better way ultimately i will have several areas active at the same time to allow a user to modify parameters in the program thanks for your help karen rogers dupont rogerskm pluto es dupont com code starts here void doit printf entered the doit function n exit main argc argv int argc char argv widget toplevel widget outer xtappcontext app con widget samples arg args static xtactionsrec key actions doit doit toplevel xtvaappinitialize app con test null argc argv null null outer xtcreatemanagedwidget paned panedwidgetclass toplevel null zero xtappaddactions app con key actions xtnumber key actions xtsetarg args xtnlabel enter value xtsetarg args xtnvalue samples xtcreatemanagedwidget samples dialogwidgetclass outer args xtoverridetranslations samples xtparsetranslationtable key return doit xtrealizewidget toplevel xtappmainloop app con
2,854
comp.windows.x
joining the x consortium hi does anyone have any information on joining the x consortium what are the costs what are the benefits who should i contact thanks
2,855
comp.windows.x
re honors degrees do they mean anything justin kibell jck catt citri edu au wrote what has this got to do with comp windows x i agree that this is a side track but it is funny that i skip so many other articles threads but i couldn t resist reading this one my beliefs opinions and expressions are strictly my own and do not represent or reflect any official or unofficial policies or attitudes of any other person or organization but i have heard that ford motor company has had a recruiting bias toward engineers and away from computer science graduates the reasoning is supposedly to better meet long range personnel requirements this is evidenced by the large number of cs people who are employed via contracts and are not brought on board except in special circumstances this is a generalization which obviously doesn t always hold true but there are statistics furthermore most software engineering at ford gets done by electrical engineers i know of univerities that have merged the computer science department and the electrical engineering so that you can get a computer degree which qualifies you for much more than programming but since my beliefs and opinions are merely figments of my distorted imagination i suppose i should keep it to myself
2,856
comp.windows.x
large color monitors does anyone have any information advice on large color monitors to use with a system running x server software i maining looking for quality information and price but all information is welcomed thanks david it s all ball bearings fletch
2,857
comp.windows.x
re converting contents of x window to color postscript jeff haferman haferman icaen uiowa edu wrote can somebody point me to source code for dumping the contents of an x window into a color postscript file i have written an app which brings up an x window and i want at the click of the mouse to dump the window into a postscript file thanks jeff haferman internet haferman icaen uiowa edu department of mechanical engineering dod bmwmoa ama the university of iowa iowa city ia r s i use xwd and xwd ps to do it from within a program i use xwd id xxxxx where xxxxx is the window id obtained from xtwindow widget raju gurung i t i t building dept of electrical eng university of manchester oxford rd manchester u k
2,858
comp.windows.x
xremote into x r hi i remember reading or hallucinating that ncd s pc xremote functionality had been given by ncd to mit for inclusion in x r is this true if so set mode cheap can i just wait for x r to get compressed serial line x server support thanks terry lemons digital equipment corporation
2,859
comp.windows.x
any recent information on frescoe does anyone know of any recent information on the frescoe work being done by the consortium i ve seen the short description that was published in the x resource but am looking for something with a bit more depth to it
2,860
comp.windows.x
pointer xlib hi i am trying to implement a pointer feature in xlib i have multiple windows and all can take input and show output simultaneously on all other displays i want to implement a pointer feature i would like to get the pointer to come up on all windows once i choose pointer in the menu and every one should be able to see it can you give me some hints as to how i should proceed i am new to xlib replies will be greatly appreciated thank you prakash duvvuri cs odu edu
2,861
comp.windows.x
xterm and default text cursor color what i want to be able to do is to set the cursor color to the same as the forground color that is set for that xterm from the man page cr color this option specifies the color to use for text cur sor the default is to use the same foreground color that is used for text however this doesnt seem to be the case it appears to default to black or to whatever xterm cursorcolor is set to feel free to point me at the relevant fm or whatever cheers c
2,862
comp.windows.x
string to widget resource converter can anybody tell me how to use the xmu function xmucvtstringtowidget i want to specify a widget name in a resource file so that i can connect two widgets together on an xmform ie myproggy mylistsw topwidget maintextsw however when i run the program i get the message warning no type converter registered for string to window conversion just like the manual sez i have managed to find this bit of code which seems to be the correct way to go about this static xtconvertargrec parentcvtargs xtwidgetbaseoffset xtpointer xtoffsetof corerec core parent sizeof corewidget xtsettypeconverter xtrstring xtrwidget xmucvtstringtowidget parentcvtargs xtnumber parentcvtargs xtcacheall null however i haven t got a clue where to put it the example code i have seems to suggest i can only do this if i am creating my own widget but elsewhere it says that i can add it to a widget s class intialize function how what s one of those if anybody has any code to do this please let me know the trick i m sure this is a faq thanks in advance rik ps what are the header files corep h and intrinsicsp h should i use these or core h and intrinsics h ok i know rtfm richard turnbull dept computer science e mail university of liverpool rik compsci liverpool ac uk liverpool l bx england phone
2,863
comp.windows.x
re q how to avoid xopendisplay hang don t know how to avoid the xopendisplay hang but perhaps you could use something else such as zephyr perhaps rob
2,864
comp.windows.x
problem with mit shm i am trying to write an image display program that uses the mit shared memory extension the shared memory segment gets allocated and attached to the process with no problem but the program crashes at the first call to xshmputimage with the following message x error of failed request badshmseg invalid shared segment parameter major opcode of failed request mit shm minor opcode of failed request x shmputimage segment id in failed request x serial number of failed request current serial number in output stream like i said i did error checking on all the calls to shmget and shmat that are necessary to create the shared memory segment as well as checking xshmattach there are no problems if anybody has had the same problem or has used mit shm without having the same problem please let me know by the way i am running openwindows on a sun sparc thanks in advance john c
2,865
comp.windows.x
re q how to avoid xopendisplay hang in article c xr oy skates gsfc nasa gov andy ice stx com writes i m writing xwall a simple x version of wall and i want it to put a message up on each of a default list of displays the problem is that xopendisplay hangs if one of the displays is currently controlled by xdm login screen xdm does xgrabserver when it s running in secure mode so do some screen locks there s really no simple way to tell this is the case you can take xdm out of secure mode probably not too cool you can wrap your call to xopendisplay in some code which solicts a future sigalrm and longjmps past the xopendisplay from the signal handler an example of this can be seen in the xdm sources note that longjmping out of xopendisplay probably causes a memory leak any program functioning this way probably needs to exit regularly
2,866
comp.windows.x
re gui study in article apr kocrsv delcoelect com c xjfa kocrsv delcoelect com james f allman iii writes i m doing a study on what the following type of users would like to have on a unix manager basically i m looking for the unix commands and features on motif window interface which will help the different type of users make use of unix personally i can t stand motif i also can t stand gui command line interfaces for things like access to the commands i know command line and love i think you ll find that experience sic users command line der mouse a year and a half ago i felt the same way the i started using gooyies give me the command line when something out of the ordinary needs done and the gooy when i am doing normal or repative work note that most operations are repetative hackers love cls because what i like about gui s the ability to view and manipulate a group of objects files text directories etc and and manipulate them in some way such as delete copy paste rename the ability to have several applications screens visible and accessable at the same time being able to do a standard set of functions easily and quickly on an unfamiliar operating system i am familiar with the command lines of several operating systems but occasionally i will have to some work on a system that i almost never use if it has a gui i can usually accomplish what i want to do fairly easily the command line on the other hand often is a long and painful experience what i hate about gui s having to switch between the mouse and the keyboard i guess i have a strong one handed preference i like to use a computer with one hand and use the other for holding something like a piece of paper of a mug of tea i have configured my favorite editor so that most of the editing functions can be done with one hand such as navigating cutting pasting searching opening and saving files etc the main thing i need to use both hands for is entering text i guess i need to get one of those mice with like buttons or something and then i will have the best of both worlds brent
2,867
comp.windows.x
motif and interviews hi i am in the process of making the decision whether i should write c wrappers for motif myself or use motif or interviews though i have downloaded the tar files i fail to see any documentation i have two questions if you have used these or similar c sy toolkits what has been your experience where do i find reference books documentation for them any and all input will be greatly appreciated unmesh
2,868
comp.windows.x
re lost in tekhvc color space hi xtici worked for my system i m using x r pl clientside only on a dec on ultrix may be you have a serious floatingpoint compilation problem o o o brain inside o o o o andre beck abpsoft mehl andre beck irs inf tu dresden de o o o
2,869
comp.windows.x
books on i c c other than i c c m can anyone recomend a good book or article on inter client communications besides i c c m i ve looked everywhere i can and it seems everyone tells you how to do it but nobody shows you how o reilly has no examples iccm has no examples asente swick give no examples in fact most of the books i ve looked at if they discuss icc at all simply give a condensed version of the iccm and then refer you to the iccm i did find one example of how to use atoms and properties in young s book and five hours after i bought young s book i had my applications talking to each other i am not sure however if thats the best way i d like to stay independent of unix so pipes and or sockets probably aren t the way to go but within x one can also use messages the clipboard and perhaps window groups i need a text that discusses the various methods discusses which method is best for which purpose and gives examples without examples it s all just words thanks in advance ross
2,870
comp.windows.x
how to disable reverse video on xterm man well i am not sure if this is the right newsgroup to ask but let me try anyway i am running xterm and like all unix users i run man something recently i switched to solaris and their man pages are littered with i directives that are somehow translated into reverse video when displayed by man under xterm the resulting output admittedly a personal taste is very annoying to look at back when i was using sunos i remember their man pages have some keywords displayed with underlining so my question is how do i change the xterm s behaviour under i directives for nroff man pages to perhaps underlining or at least disabling it b directives are fine i like them and of course i don t want to go in and edit the man pages inputs somehow xterm allows one to specify both a normal font and a bold font but not an italic font any pointers suggestions are greatly appreciated thanks john p s running xterm rv won t work i tried
2,871
comp.windows.x
re teleuse uim x and c hubec ctp com hubert chou writes does anyone have any good ideas on how to integrate c code elegantly with teleuse uim x interface architect generated code source would be great but any suggestions are welcome alsys has produced a paper outlining how to use c with teleuse you can get a copy from your local sales rep or call us at as mentioned it is very straight forward using the dialog language similar to visual basic tom erickson alsys tne world std com south bedford street burlington ma
2,872
comp.windows.x
re gui toolkit for the sun sparc in article c m cuug ab ca winsorr sun robin winsor writes you are right to be going motif rather than openlook sun has just recently seen the light and dumped their commitment to openlook in the announcement they stated they have no future plans for devguide this is incorrect sun has made no such claim regarding devguide and as manager of the devguide engineering group i can state with authority that work on devguide is continuing apace we had quite a strong show of interest from the devguide user community at last week s solaris developer s conference devguide is being advocated not only as a valuable future builder tool but as an important bit of transition technology that will help sustain current customers and facilitate their migration to the cose desktop environment if you have specific questions about devguide availability etc you can contact tali aben our devguide product marketing person at david bryant devguide manager sunsoft
2,873
comp.windows.x
x for pc for those of you who couldn t find x appeal it is availible at the following sitex ascwide ascii co jp in the pub msdos xappeal dir wuarchive wustl edu in the mirrors garbo uwasa fi demo directory the three files are xap exe aip xap fon zip and drivers zip josh joshua weage u s snail spring rd baroda mi e mail cs freenet in a cwru edu ai yfn ysu edu fidonet joshua weage all ideas are my own and no one elses
2,874
comp.windows.x
widgets vs gadgets i ve been using the xmgraph widget that s been floating around and i noticed the performance is significantly better using gadgets perhaps even faster i had heard in an old programming course that gadgets were no longer any benefit to performance and that it s just as well to use widgets everywhere interesting i d like to know why but try it again on a single ethernet with x terminals on it and i think you ll find it much slower adrian nye o reilly and associates
2,875
comp.windows.x
help sunview on olwm xview x r hi i just compiled the x r distribution for a sun sunos i also compiled the public domain xview with olwm distribution i have some old rd party application binaries that are sunview programs how do i get them to work under xview and olwm i tried using the openwindows version svenv program but it did not work i do not have news access that s why i am mailing this directly also is there an email alias where my questions can get to comp windows x or comp windows open look please respond to fwr bv fin af mil thanks shash shash chatterjee email fwr bv fin af mil ec software phone lockheed fort worth company fax p o box mz ft worth tx
2,876
comp.windows.x
re i need source for splines in article ppvhtinn fmsrl srl ford com glang slee srl ford com gordon lang writes in the xlib programming manual o rielly associates it is pointed out that routines for drawing splines is not included in xlib but extensions are publicly available i need spline routines which work within the x environment i have previously posted a similar request and got two responses both directing me to the interviews package at interviews stanford edu i got it but it is too much it looks like too much work to try to identify extract and modify relevant components i am looking for code that is not encumbered by a complex and extensive framework which is beyond our needs we just need the spline extensions to the xlib look in xfig it has two types of spline algorithms and is relatively simple xfig is available from export lcs mit edu in contrib r fixes xfig patches xfig tar z brian v smith bvsmith lbl gov lawrence berkeley laboratory i don t speak for lbl they don t pay me enough for that
2,877
comp.windows.x
re honors degrees do they mean anything i hear george bush remember him will receive an honors degree from some kuwaiti university for contributing to certain kuwaiti interests not too long ago do you think it would add much to his resume
2,878
comp.windows.x
re converting contents of x window to color postscript in article apr jwminhh hanse de wieck jwminhh hanse de jan wieck writes mbheprg problem with inews gateway file raju gurung writes jeff haferman haferman icaen uiowa edu wrote can somebody point me to source code for dumping the contents of an x window into a color postscript file i have written an app which brings up an x window and i want at the click of the mouse to dump the window into a postscript file i use xwd and xwd ps to do it from within a program i use xwd id xxxxx where xxxxx is the window id obtained from xtwindow widget he asked for sources the portable bitmap tools from jef poskanzer jef well sf ca us include filters to do that and much more btw the x tools come as sources the sillyness of most vendors lets you stuck with binaries anyway have a look onto xgrab xgrabsc it does the imho best job for this including compression o o o brain inside o o o o andre beck abpsoft mehl andre beck irs inf tu dresden de o o o
2,879
comp.windows.x
comp windows x getting more performance out of x faq archive name x faq speedups last modified how to maximize the performance of x monthly posting compiled by art mulder art cs ualberta ca more ram faster cpu s more disk space faster ethernet these are the standard responses you hear when you ask how to improve the performance of your workstation well more hardware isn t always an option and i wonder if more hardware is always even a necessity this faq list is a collection of suggestions and ideas from different people on the net on how you can the best possible performance from x windows on your workstation without purchasing more hardware performance is a highly subjective issue the individual user must balance speed versus features in order to come to a personal decision therefore this document can be be expected to contain many subjective opinions in and amongst the objective facts this document is specifically concerned with x there are of course many other factors that can affect the performance of a workstation however they are outside the scope of this document people seriously interested in the whole area of system performance might want to look at the o reilly nutshell handbook system performance tuning by mike loukides i m about of the way through reading it and it looks like a well written comprehensive treatment of system performance i m unaware of any other similar books ed table of contents introduction administrivia what about the other x faq window managers the x server which server locking the server into ram starting your server fonts about the resources file define your display properly clients a better clock for x a better terminal emulator for x tuning your client miscellaneous suggestions pretty pictures a quicker mouse programming thoughts say what other sources of information author notes changed since last issue new since last issue introduction administrivia this document is posted each month on or around the th to the usenet news groups comp windows x news answers and comp answers if you are reading a copy of this faq which is more than a few months old see the last modified date above you should probably locate the latest edition since the information may be outdated if you do not know how to get those newsgroups and or your site does not receive them and or this article has already expired you can retrieve this faq from an archive site there exist several usenet faq archive sites to find out more about them and how to access them please see the introduction to the news answers newsgroup posting in news answers the main faq archive is at rtfm mit edu this document can be found there in pub usenet news answers x faq speedups if you do not have access to anonymous ftp you can retrieve it by sending a mail message to mail server pit manager mit edu with the command send usenet news answers x faq speedups in the message body what about the other x faq david b lewis faq craft uunet uu net maintains the informative and well written comp windows x frequently asked questions document its focus is on general x information while this faq concentrates on performance the comp windows x faq does address the issue of speed but only with regards to the x server the gist of that topic seems to be use x r it is faster than r please see the x faq for complete details window managers there are a lot of window managers out there with lots of different features and abilities the choice of which to use is by necessity a balancing act between performance and useful features at this point most respondents have agreed upon twm as the best candidate for a speedy window manager a couple of generic tricks you can try to soup up your window manger is turning off unnecessary things like zooming and opaque move also if you lay out your windows in a tiled manner you reduce the amount of cpu power spent in raising and lowering overlapping windows joe english joe trystero art com i ve found that a good font for tiling is x aka misc fixed medium r normal c iso it is the biggest font i know of that i can use on my sun x screen and still get two column terminal windows side by side on the display with no overlap other font suggestions will be accepted the x server which server make sure that your server is a proper match for your hardware if you have a monochrome monitor use a monochrome x server on my monochrome sun i haven t noticed much difference between the xsun colour server and xsunmono however it was pointed out to me that xsunmono is about k smaller and therefore should contribute to less paging thanks to jonny farringdon j farringdon psychol ucl ac uk michael salmon michael salmon eos ericsson se how your server was compiled can also make a difference jeff law law schirf cs utah edu advises us that on a sun system x should be compiled with gcc version or with the unbundled sun compiler you can expect to get very large speedups in the server by not using the bundled sunos compiler i assume that similar results would occur if you used one of the other high quality commercial compilers on the market locking the server into ram has anyone tried hacking the x server so that it is locked into ram and does not get paged eg via a call to plock does this help performance at all i ve had one inquiry on this topic and a few pointers to the plock function call but no hard evidence from someone who s tried it i am not in a position to give it a try thanks to eric c claeys ecc eperm att com danny backx db sunbim be juan d martin juando cnm us es starting your server joe english joe trystero art com if you start up a lot of clients in your xsession or whatever sleep for a second or two after launching each one after i changed my xclients script to do this logging in actually took less time we have a heavily loaded system without much core though this sounds crazy but i have confirmed that it works warner losh imp solbourne com provided me with a good explanation of why this works which i have summarized here when you start up an x server it takes a huge amount of time to start accepting connections a lot of initialization is done by the server when it starts this process touches a large number of pages any other process running at the same time would fight the server for use of the cpu and more importantly memory if you put a sleep in there you give the server a chance to get itself sorted out before the clients start up similarly there is also a lot of initialization whenever an x client program starts toolkits registering widgets resources being fetched programs initializing state and databases and so forth all this activity is typically memory intensive once this initialization is done the process has reached a steady state the memory usage typically settles down to using only a few pages by using sleeps to stagger the launching of your clients in your xinitrc you avoid them fighting each other for your workstation s limited resources this is most definitely a your mileage may vary situation as there are so many variables to be considered available ram local swap space load average number of users on your system which clients you are starting etc currently in my xinitrc i have a situation like sleep exec xclock sleep exec xbiff sleep exec xterm sleep exec xterm i ve experimented with sleep exec xclock sleep exec xbiff sleep exec xterm sleep exec xterm i ve even tried sleep exec start x clients script and then in start x clients script i had sleep exec xclock sleep exec xbiff sleep exec xterm sleep exec xterm the idea with this last one was to make sure that xinit had completely finished processing my xinitrc and had settled down into a steady state before the sleep expired and all my clients were launched all of these yielded fairly comparable results and so i just stuck with my current setup for its simplicity you will probably have to experiment a bit to find a setup which suits you fonts loading fonts takes time and ram if you minimize the number of fonts your applications use you ll get speed increases in load up time one simple strategy is to choose a small number of fonts one small one large one roman whatever suits you and configure all your clients or at least all your heavily used clients to use only those few fonts client programs should start up quicker if their font is already loaded into the server this will also conserve server resources since fewer fonts will be loaded by the server farrell mckay fbm ptcburp ptcbu oz au joe english joe trystero art com eg my main xterm font is x so i also have twm set up to use x in all it s menus and icons etc twm s default font is x since i don t normally use x i ve eliminated one font from my server oliver jones oj roadrunner pictel com keep fonts local to the workstation rather than loading them over nfs if you will make extensive use of r scalable fonts use a font server about the resources file keep your xresources xdefaults file small saves ram and saves on server startup time joe english joe trystero art com one suggestion in your xdefaults xresources file try putting only the minimum number of resources that you want to have available to all of your applications for example reversevideo true then separate your resources into individual client specific resource files for example home lib app defaults in your login file set the environment variable xuserfilesearchpath setenv xuserfilesearchpath home lib app defaults n the comp windows x frequently asked questions faq contains an excellent explanation of how these environment variables work ed so when xterm launches it loads its resources from app defaults xterm xdvi finds them in app defaults xdvi and so on and so forth note that not all clients follow the same xxxxx resource file naming pattern you can check in your system app defaults directory often usr x r lib x app defaults to find the proper name and then name your personal resource files with the same name this is all documented in the xt specification pg thanks to kevin samborn samborn mtkgc com michael urban urban cobra jpl nasa gov and mike long mikel ee cornell edu kevin is willing mail his setup files to inquirers this method of organizing your personal resources has the following benefits easier to maintain more usable fewer resources are stored in the x server in the resource manager property as a side benefit your server may start fractionally quicker since it doesn t have to load all your resources applications only process their own resources never have to sort through all of your resources to find the ones that affect them it also has drawbacks the application that you are interested in has to load an additional file every time it starts up this doesn t seem to make that much of a performance difference and you might consider this a huge boon to usability if you are modifying an application s resource database you just need to re run the application without having to xrdb again xrdb will by default run your xdefaults file through cpp when your resources are split out into multiple resource files and then loaded by the individual client programs they will not watch out for this i had c style comments in my xdefaults file which cpp stripped out when i switched to this method of distributed resource files i spent several frustrating days trying to figure out why my clients were not finding their resources xt did not provide any error message when it encountered the c style comments in the resource files it simply silently aborted processing the resource file the loss of preprocessing which can be very handy e g ifdef color is enough to cause some people to dismiss this method of resource management you may also run into some clients which break the rules for example neither emacs nor xvt will find their resources if they are anywhere other than in xdefaults when starting up a client on a machine that does not share files with the machine where your resources are stored your client will not find its resources loading all your resources into the server will guarantee that all of your clients will always find their resources casey leedom casey gauss llnl gov a possible compromise suggestion that i have and am planning on trying is to put resources for all my heavily used clients eg xterm into my xdefaults file and to use the separate resources files method for clients that i seldom use define your display properly client programs are often executed on the same machine as the server in that situation rather than setting your display environment variable to hostname where hostname is the name of your workstation you should set your display variable to unix or by doing this you access optimized routines that know that the server is on the same machine and use a shared memory method of transferring requests thanks to patrick j horgan pjh ras amdahl com see the display names section of the x man page for further explanation of how to properly set your display name i don t think it s stock mit but at least data general and hp have libraries that are smart enough to use local communication even when the display isn t set specially rob sartin opensi sartin uunet uu net jody goldberg jody algorithmics com sent me an xlib patch to change stock r to use local communication even if display is not properly set i don t want to get in the business of distributing or trying to juggle non mit patches and so have elected not to include it here hopefully mit will apply this minor lines patch themselves in the meantime if you want to try it yourself email jody ed clients if you only have a few megabytes of ram then you should think carefully about the number of programs you are running think also about the kind of programs you are running for example is there a smaller clock program than xclock unfortunately i haven t really noticed that programs advertise how large they are so the onus is on us to do the research and spread the word suggestions on better alternatives to the some of the standard clients eg xclock xterm xbiff are welcome ed i ve received some contradictory advice from people on the subject of x client programs some advocate the use of programs that are strictly xlib based since xt xaw and other toolkits are rather large others warn us that other applications which you are using may have already loaded up one or more of these shared libraries in this case using a non xt for example client program may actually increase the amount of ram consumed the upshot of all this seems to be don t mix toolkits that is try and use just athena clients or just xview clients or just motif clients etc if you use more than one then you re dragging in more than one toolkit library know your environment and think carefully about which client programs would work best together in that environment thanks to rob sartin opensi sartin uunet uu net duncan sinclair sinclair dcs gla ac uk sinclair uk ac gla dcs a better clock for x xcuckoo suggested by duncan sinclair sinclair dcs gla ac uk available on export lcs mit edu xcuckoo displays a clock in the title bar of another program saves screen real estate mclock suggested by der mouse mouse lightning mcrcim mcgill edu available larry mcrcim mcgill edu in x mclock shar non xt based extensively configurable it can be made to look very much like mit oclock or mostly like xclock purely by changing resources of course the ultimate clock one that consumes no resources and takes up no screen real estate is the one that hangs on your wall a better terminal emulator for x from the readme file distributed with xterm abandon all hope ye who enter here this is undoubtedly the most ugly program in the distribution ugly maybe but at my site it s still the most used i suspect that xterm is one of the most used clients at many if not most sites laziness isn t there a better terminal emulator available see below if you must use xterm you can try reducing the number of savelines to reduce memory usage oliver jones oj roadrunner pictel com jonny farringdon j farringdon psychol ucl ac uk xvt suggested by richard hesketh rlh ukc ac uk available export lcs mit edu in contrib xvt tar z if you don t need all the esoteric features of xterm then get hold of xvt it was written here just to save swap space as xterm is rather a hog this was written as a partial clone of xterm you don t have to rename your resources as xvt pretends to be xterm in it s current version you cannot bind keys as you can in xterm i ve heard that there are versions of xvt with this feature but i ve not found any yet update march i recently had a few email conversations with brian warkentin brian warkentine eng sun com regarding xvt he questions whether xvt really is at all faster than xterm for instance xvt may initialize slightly faster but compare scrolling speed try this quickie benchmark bin time dd if etc termcap bs and see which program can scroll faster also while xterm may be slightly larger in ram requirements we don t have any hard numbers here does anyone else shared libraries and shared text segments mean that xterm s paging requirements are not that major as an experiment he ripped out all the tek stuff from xterm but it made little difference since if you never use it it never gets brought into memory so here we stand with some conflicting reports on the validity of xvt over xterm in summary caveat emptor your mileage may vary if you can provide some hard data i d like to see it specifically how much ram each occupies how much swap each needs relative speed of each mterm suggested by der mouse mouse lightning mcrcim mcgill edu available larry mcrcim mcgill edu in x mterm src mterm ball o wax i also have my own terminal emulator its major lack is scrollback but some people like it anyway tuning your client suggestions on how you can tune your client programs to work faster from scott barman scott asd com comes a suggestion regarding motif text field widgets i noticed that during data entry into motif text field widgets i was getting a slight lag in response to some keystrokes particularly the initial one in the field examining the what was going on with xscope i found it it seems that when the resource xmnblinkrate is non zero and the focus is on a text field widget or even just a text widget the i beam cursor will blink every time the cursor appears or disappears in those widgets the widget code is making a request to the server copyarea the user can stop this by setting the resource xmnblinkrate to it is not noticeable on a mhz sparc but it does make a little difference on a slower system this specific suggestion can probably be applied in general to lots of areas consider your heavily used clients are there any minor embellishments that can be turned off and thereby save on server requests miscellaneous suggestions pretty pictures don t use large bitmaps gif s etc as root window backgrounds the more complicated your root window bitmap the slower the server is at redrawing your screen when you reposition windows or redraw etc these take up ram and cpu power i work on a sun sparc and i m conscious of performance issues i can t comprehend it when i see people with a mb sun running xphoon as their root window i ll let someone else figure out how much ram would be occupied by having a full screen root image on a colour workstation if you re anything like me you need all the screen real estate that you can get for clients and so rarely see the root window anyway thanks to qiang alex zhao azhao cs arizona edu for reminding me of this one ed a quicker mouse using xset you can adjust how fast your pointer moves on the screen when you move your mouse i use xset m in my xinitrc file which lets me send my pointer across the screen with just a flick of the wrist see the xset man page for further ideas and information hint sometimes you may want to slow down your mouse tracking for fine work to cover my options i have placed a number of different mouse setting commands into a menu in my window manager e g for twm menu mouse settings mouse settings f title very fast xset m normal fast xset m system default un accelerated xset m default glacial xset m programming thoughts joe english joe trystero art com to speed up applications that you re developing there are tons of things you can do some that stick out for motif programs don t set xmfontlist resources for individual buttons labels lists et al use the defaultfontlist or labelfontlist or whatever resource of the highest level manager widget again stick to as few fonts as possible better yet don t use motif at all it s an absolute pig don t create and destroy widgets on the fly try to reuse them this will avoid many problems with buggy toolkits too use a line width of in gcs on some servers this makes a huge difference compress and collapse multiple expose events this can make the difference between a fast application and a completely unusable one francois staes frans kiwi uia ac be just a small remark i once heard that using a better malloc function would greatly increase performance of xt based applications since they use malloc heavily they suggested trying out the gnuy malloc but i didn t find the time yet i did some tests on small programs just doing malloc and free and the differences were indeed very noticeable somewhat times faster any confirmation on this from anyone ed andre beck andre beck irs inf tu dresden de unnecessary noexpose events most people use xcopyarea xcopyplane as fastest blit routines but they forget to reset graphics exposures in the gc used for the blits this will cause a noexpose event every blit that in most cases only puts load onto the connection and forces the client to run through it s event loop again and again thousands of xchangegc requests this gfx context switching is also seen in most handcoded x apps where only one or few gcs are created and then heavily changed again and again xt uses a definitely better mechanism by caching and sharing a lot of gcs with all needed parameters this will remove the load of subsequent xchangegc requests from the connection by moving it toward the client startup phase say what some contributors proposed ideas that seem right off the wall at first david b lewis by day dbl osf org by night david craft uunet uu net how about this swap displays with someone else run all your programs on the other machine and display locally the other user runs off your machine onto the other display goal reduce context switches in the same operation between client and server i m not in a situation where i can easily try this but i have received the following confirmation michael salmon michael salmon eos ericsson se i regularly run programs on other machines and i notice a big difference i try to run on a machine where i will reduce net usage and usually with nice to reduce the impact of my intrusion this helps a lot on my poor little ss with only mb it was essential when i only had mb casey leedom casey gauss llnl gov the x server and the client are competing for the same cpu as your server when you run it on the same machine not really a major problem except that the x client and the server are in absolute synchronicity and are context thrashing timothy h panton thp westhawk uucp firstly it relies on the fact that most cpu s are mostly idle x s cpu usage is bursty so the chances of you and your teammate doing something cpu intensive at the same time is small if they are not then you get twice the cpu memory available for your action the second factor is that context switches are expensive using cpu s halves them you pay a price due to the overhead of going over the network but this is offset in most cases by the improved buffering of a network typically k vs k for a pipe allowing even fewer context switches other sources of information volume in o reilly s x window system series x window system administrator s guide is a book all x administrator s should read adrian nye adrian ora com a lot more tips on performance are in the paper improving x application performance by chris d peterson and sharon chang in issue of the x resource an earlier version of this paper appeared in the xhibition conference proceedings this paper is absolutely essential reading for x programmers author notes this list is currently maintained by art mulder art cs ualberta ca suggestions corrections or submission for inclusion in this list are gladly accepted layout suggestions and comments spelling mistak s too are also welcome currently i have listed all contributors of the various comments and suggestions if you do not want to be credited please tell me speedup x faq is copyright c by arthur e mulder you may copy this document in whole or in part as long as you don t try to make money off it or pretend that you wrote it art mulder art cs ualberta ca do not be conformed to this world department of computing science but be transformed by the renewal university of alberta edmonton canada of your mind romans
2,880
comp.windows.x
re app defaults files hello when starting bx if you recieve an error message saying cannot load app defaults file check your xapplresdir environment variable and then put the file builderxcessory this is the app defaults file for bx in the directory specified by the xuserfilesearchpath environment variable if you don t have an xuserfilesearchpath environment variable then set xuserfilesearchpath to be the directory where the builderxcessory file is you can do this using the setenv command under csh note that the name ends in ad so you will have to set xuserfilesearchpath to bx n ad to get the app defaults to load correctly to make sure the the app defaults file can be read by all the users make sure that a copy of or a link to the app defaults file exists in usr lib x app defaults or usr openwin lib app defaults depending on how your system is set up once you have taken care of this set the systemdirectory resource to be the directory in which you have installed bx for example let s say i ve installed bx in t then my system directory resource should be set like this systemdirectory t builderxcessory thanks ics tech support
2,881
comp.windows.x
re xcopyplane question i am trying to use xcopyplane to copy a single plane from a depth pixmap to a depth pixmap everytime i try this i see absolutely nothing displayed i know there is data in the depth pixmap becuase i have checked by doing an xcopyarea to the screen i have been successful getting xcopyplane to work if i use two pixmaps of depth is there a problem with what i am trying to do could someone please scan my code segment and let me know where i am going wrong i have created a xmdrawingarea widget called canvas w id xtwindow canvas display xtdisplay canvas screen defaultscreen display pixmap xcreatepixmap display rootwindow display screen w width w height defaultdepth display screen pixmap xcreatepixmap display rootwindow display screen w width w height w gc xcreategc display w id null w gc xcreategc display pixmap null code to read xwd image into pixmap is omitted have you set the foreground and background colors in w gc to something other than and the whitepixel and blackpixel macros on your server may not return values suitable for depth drawables copy one plane into the depth pixmap xcopyplane display pixmap pixmap w gc w width w height are you sure that the fifth plane of the data isn t all the same you could have different pixel values in the image but the fifth plane x might all be the same value using the depth pixmap as the clipmask copy it to the screen values foreground fg color values clip x origin values clip y origin values clip mask pixmap mask gcforeground gcclipmask xchangegc display w gc mask values xfillrectangle display w id w gc w width w height if you just want to see the plane of data and want better performance don t use clipmasks just use pixmap as the stipple in a stippled rectangle fill many servers are very stupid about handling complex clip lists and turn a bitmap clip region into hundreds and hundreds of little clipping rectangles and clips every drawing primitive against every one of these little triangles actually i must also ask the faq s most popular reason why graphics don t show up do you wait for an expose event before drawing your rectangle other info x r patchlevel motif sun sparc running sunos thanks in advance nancie p marin net nancie neko css gov ensco inc mail pineda ct melbourne fl fax kenneth whaley kubota pacific computer inc email whaley kpc com walsh avenue santa clara ca
2,882
comp.windows.x
re ms windows vs motif gui design differences was re future of unix in article ik apr sneaker ctt bellcore com ik sneaker ctt bellcore com ik su yoo writes aab andy burgess aab cichlid com writes aab in apr texhrc uucp pyeatt texaco com larry d pyeatt writes aab some deleted if you look closely at motif you will see that it is just ms windows with more eye pleasing color and texture the only real difference is that an ms application window can contain other toplevel children while a motif application window launches its children out onto the desktop aab to those of you familiar with both guis is this correct my experience aab with x makes me think that this msw behavior is easily duplicated aab with x but i don t know msw another important difference is that msw doesn t have any window that handle sophisticated geometry management like xmform also i believe that in windows x you re limited to k of resources windows menus icons etc imho this whole discussion named motif looks like ms windogs is totally stupid the only thing remotely influenced here can be the motif window manager that features an arrangement of buttons and menus somewhat similiar to this of the ms w windowmanaging agent however its name is but mwm is only a small part of motif in fact mwm and motif can work without each other and if one doesn t like mwms outfit for some reason he switches to another windowmanager all this doesn t influence motif which is a toolkit of widgets to write applications and this toolkit is imho uncomparable to ms w because it is much more wellorganized and features alot of goodies more than the ms w interface you cannot say a porsche looks like a vw k fer only because they have the wheel and the gear at the same position motif and ms w are complete different worlds only one element of the motif world has some gear and wheel at the same position as ms w o o o brain inside o o o o andre beck abpsoft mehl andre beck irs inf tu dresden de o o o
2,883
comp.windows.x
x version of whois has an x version of whois been written out there if so where can i ftp it from thanks jesse w asher varco pruden buildings poplar ave suite memphis tn internet jessea vpbuild vp com uucp vpbuild jessea
2,884
comp.windows.x
gui study do users want to build solutions let me point out that both gui based word processors and text based formatters both have a language one happens to be mouse and action based and the other symbol based true but that s beside the point this is a fact about an abstract model of what the gui users are doing not about what they actually are doing this abstract model is only apparent from the perpective of a programmer of the system nb some users may see it too but only when they put aside the work at hand and start thinking like a programmer i m not saying that the programmer s perspective is evil or stunted after all that s what i do too i am saying that ui designers must carefully distinguish between the user programmer conceptual models and they must ultimately serve the user of the system not the builder of the system i don t recall the actual stats but something like in people can be categorized as a symbol manipulator it would be interesting to know more about the meaning and basis for this claim at any rate i don t think this is evidence that of users think like programmers bankers financial analysts structural engineers these are all people whose work you could characterize as primarily symbol manipulation but what they do is not programming and programming is not required to do what they do to restate my previous point yes users want to build their own solutions no they do not want to do programming to accomplish this
2,885
comp.windows.x
re is xlib thread safe in article aa alex lcs mit edu gildea expo lcs mit edu stephen gildea writes no the r xlib is not thread safe but we are working on it see my article in the x resource issue consortium members will have a multi threaded version soon and it will be part of r there is a multi threaded xlib version written do an archie search for mt xlib host export lcs mit edu location contrib directory drwxr xr x jul mt xlib location contrib mt xlib file rw r r jan mt xlib xhib ps z file rw r r jan mt xlib tar z location contrib mt xlib file rw r r jul mt xlib xhib ps z file rw r r jul mt xlib tar z et al eric overhead without any fuss the stars were going out the nine billion names of god yes you re very smart shut up in the princess bride
2,886
comp.windows.x
system file in tmp what is the directory x unix for in tmp when i start x it is created by the system this directory wasn t created by root and it contains an empty file x that is owned by me for a lot of au music ftp sounds sdsu edu then cat file au dev audio ub library catalog telnet bison acsu buffalo edu when in doubt ask xarchie xgopher or xwais
2,887
comp.windows.x
how do i change the text cursor in xterm i have just finished building x r on a running interactive unix sysvr and i am having a problem with xterm on any font larger that x it messes up characters that are types the cursor seems to be too large or splits into a reverse video outline block which changes when the pointer is moved into the window i am trying to use monospaced fonts not p fonts is there any way of changing the appearence of the block cursor is an xterm thanks john f skoda windows nt os for the s electronic learning facilitators inc c cobol for the st century bethesda md use ada unix and other socially dsc jfs imc med navy mil unacceptable systems dsc jfs imc med navy mil and before you flame i m an expos fan need i say more with disclaimer package
2,888
comp.windows.x
xwd i am trying to run xwd on a sun sparcstation ipx with sunos and openwindows i am using the motif window manager i have been unsuccessful in using xwd under motif i get the following when doing xwd out xwd dmp x error of failed request baddrawable invalid pixmap or window parameter major opcode of failed request x getimage resource id in failed request x serial number of failed request current serial number in output stream does anyone have any insight to this
2,889
comp.windows.x
window manager i currently use a window manager called ctwm which is very similar to hp s vuewm i e it has multiple workspaces is there a motif based window manager that has this same feature and is not a memory pig like vue mike michael l coe a mind is a terrible thing laboratory of applied logic university of idaho coe leopard cs uidaho edu coe snake cs uidaho edu
2,890
comp.windows.x
re x r and open look in article apr aedc vax af mil bonds aedc vax af mil writes i am reposting this because i am not sure my first post ever made it out i have built and installed x r on my sparcstation my aim is to run the mit x server but retain the openlook window manager i am sure this is not uncommon but i just want to make sure that i change and or delete everything that i need to for instance i can start xdm in rc local but how do i get rid of xnews the openlook window manager source is available on the mit contrib tapes or from export lcs mit edu i would suggest building this too rather than using the version from openwindows it is olwm v regards richard gooch
2,891
comp.windows.x
problems using graphic context with athena widgets i am creating a graphics program using the athena widgets i use xlib routines to install a custom graphics contex by obtaining the display and window variables with the xtwindowofobject and xtdisplayofobject the object was one of the sub widgets the problem occurs that whenever a button is pressed or a menu is selected the graphic contex reverts to the orginal one i tried moving the allocation of the graphic context before the allocation of the buttons but nothing changed i am preforming all of this manipulation before calling xtappmainloop thank you for any help leslie donaldson donaldlf cs rose hulman edu donaldlf nextwork rose hulman edu
2,892
comp.windows.x
re c toolkit directions in article imp hellnet org devil loki hellnet org gil tene writes i am trying to figure out the current c toolkit directions more simply i d like to know which c toolkit to bet on for use in a new long term project i have the same problem i have looked at motif wwl interviews gina and a few variations on the above i ve also done a cursory examination of rogue wave s view h i like view h s abstractions best of all of the toolkits i mentioned but the resulting code looks little like motif and i have little confidence that this software will catch on or otherwise result in significant longevity for my code gina allows you to write code which looks a great deal like motif and also makes interesting use of inheritance but the resulting code is almost too motif like and is certainly not significantly less verbose than equivalent c code interviews looks promising but i haven t found a free version with motif support and i m not confident how widely interviews with motif support will be adopted and what if any specific motif support will be available over time the other libraries produce code which is less motif like but which does not make sufficient use of the features of c to simplify my coding task at this point my inclination is to write my motif manipulation routines in c and invoke those routines from my c code using simple abstractions suited to my specific task later if osf or some credible standards setting body comes up with a c interface to motif i will change to that it does me no goo to write in c if my choice of interfaces leaves me with code which leaves me tied to an abstraction which is not consistent with the industry directions it s better to take a standard if inferior solution for now than to go with a slgihtly superior approach which will leave me with both useless code and useless skills a few years from now views h is the only library i d consider right now but in our environment we d end up spending nearly to use it and i can t justify it when it s likely to cause short term productivity decreases as we learn the new abstraction and is unlikely to be a sufficiently long lived solution for us to reap the benefits at the high end of the j curve brad brad daniels if money can t buy happiness daniels neosoft com i guess i ll have to rent it i don t work for neosoft and weird al yenkovic don t speak for my employer
2,893
comp.windows.x
fresco status i ve been hearing rumblings about fresco and it sounds like it may be what i m looking for but how far is it from release or at least some kind of availability how similar is it to interviews if i code to interviews will my code work with fresco how about motif i ve heard some mention of versions of interviews which support motif will it be feasible to use motif with fresco any information would be much appreciated brad brad daniels if money can t buy happiness daniels neosoft com i guess i ll have to rent it i don t work for neosoft and weird al yenkovic don t speak for my employer
2,894
comp.windows.x
re iconize a running application in article c ifj f u csn org doomer teal csn org john dumais writes i ve been trying to figure a way to programmatically iconize an application running under a motif window manager i have tried several approaches includeing sending events to the application s border window but to no avail anyone done this before i tend to use xiconifywindow to achieve this effect have you tried that brad brad daniels if money can t buy happiness daniels neosoft com i guess i ll have to rent it i don t work for neosoft and weird al yenkovic don t speak for my employer
2,895
comp.windows.x
re iconize a running application it doesnt matter what window mgr you running under you can use the x routine xiconfiywindow display w screen number display display window w int screen number as in xiconifywindow xtdisplay w xtwindow w does that perform what you want in article c ifj f u csn org doomer teal csn org john dumais writes newsgroups comp windows x path shearson com uupsi psinntp uunet haven umd edu darwin sura net wupost zaphod mps ohio state edu magnus acs ohio state edu csn teal csn org doomer from doomer teal csn org john dumais sender news csn org news nntp posting host teal csn org organization colorado supernet inc x newsreader tin pl date thu apr gmt lines i ve been trying to figure a way to programmatically iconize an application running under a motif window manager i have tried several approaches includeing sending events to the application s border window but to no avail anyone done this before thanks doomer joe bore life is short code hard jbore shearson com uunet shearson com jbore beeper
2,896
comp.windows.x
compiling clients on a sun ipx i m trying to set up an ipx for another group i copied all the x stuff that i compiled on my which runs sunos using gcc and most things run just fine however i did find a couple of bugs and when i try to recompile those clients on the ipx which runs i get ld undefined symbol xshapequeryextension xshapecombinemask i know that i can include libxext and get rid of those messages but i can t figure out why i get them on the ipx and not on the any ideas ned danieley ndd sunbar mc duke edu basic arrhythmia laboratory box duke university medical center durham nc or
2,897
comp.windows.x
re motif vs athena etc berry durian citr uq oz au andrew berry writes my impression is that most people use motif because their os vendor supplies it with x sunos users excluded and because it is similar in look and feel to ms windows and os pm personally i also prefer the look and feel of motif no flames please just an opinion seeing as motif has been adopted by sun ibm hp can t remeber the other members in the recent announcement i m sure you ll see it on virtually every workstation ie sun ibm hp and dec must make up the vast majority of all hardware i am also concerned by this prevalence of motif particularly from the point of view of writing and obtaining free software as the linux and bsd communities grow however i think that motif will lose some of its grip at least in the non commercial marketplace ports of motif to both bsd and linux are available for a fee of about this is cost recovery for the person who bought the rights to redistribute the activity in both the bsd and linux news groups pertaining to motif has been high i just wonder if this will also cause a divergence between commercial and non commercial software ie you will only get free software using athena or openlook widget sets and only get commercial software using the motif widget sets i can t see why if just about every workstation will come with motif by default and you can buy it for under for the free unix platforms i can t see this causing major problems side note all the x based code i am writing and will distribute freely when completed is based on motif because from a programmatic and also look and feel point of view i like it the best no flames on this one please bambi david j hughes bambi bu oz au senior network programmer comms development operation australia
2,898
comp.windows.x
sunview x no doubt this is an old question but i didn t find the answer in the faqs i could find so here goes i have a sunview application that i want to convert to x openlook motiv whatever i remember hearing quite some time ago that there are tools to accomplish this task a is that so b are they public domain c any good i e d advantages over reimplementing the interface myself thanks alex
2,899
comp.windows.x
mouseless operation in ol v wm mouseless operation is documented in the man pages for olwm and olvwm however i can t get it to work in either i have this line in my xdefaults openwindows keyboardcommands full that should do it i haven t rebound the keys am i missing something d