XNetMine/004070000626430021617000000000000564151630000135705ustar00bauermndritt9300000000000000XNetMine/Makefile000060000626430021617000000001450564152203000152230ustar00bauermndritt9300000000000000OBJ= OPTIONS= -lX11 LIBPATH= XNetMine: gcc $(OPTIONS) XNetMine.c -lX11 -o XNetMine XNetMine/README000060000626430021617000000010040563373603500144530ustar00bauermndritt9300000000000000 ********************************************************************************* if there are any questions, write an e-mail to: MARTIN_BAUER@S2.MAUS.DE or a letter to: (i will answer, if the letter is in English/French/German) Martin Bauer Zeppelinstr. 97 70193 Stuttgart ********************************************************************************* Hint: Tell your root that you are using the PortNmberxxxxxxx for Sockets ! If your system does not allow a speciall PortNumber try any others ! ****************************************************************************** if there are any questions, write an e-mail to: MARTIN_BAUER@S2.MAUS.DE or a letter to: (i will answer, if the letter is in English/French/German) Martin Bauer Zeppelinstr. 97 70193 Stuttgart ********************************************************************************* Hint: Tell your root that you are using the PortNmberxxxxxxx for Sockets ! If your system does not allow a speciall PortNumber try any others XNetMine/XNetMine000071100626430021617000001713440564151630000152150ustar00bauermndritt9300000000000000 @@@ l?0))XGo(@@P 92453-07A09.74. 92453-07A08.56.05*H 82$Header: crt0.s,v 70.8 92/05/19 15:52:46 ssa Exp $@  X"@iiLX FlltX MX MX MzzX 8LjX @ʈX Hʈ((X IʰX Xʰ8>(@`>(@L>( @`>(@,>(Ј @ x>(֨T@T>(@>(@>(&@ >((@>(P@>(R@h>>Y @? @>P@ $PRIVATE$$DLT$$PLT$ $SHLIB_DATA$$TEXT$ $SHLIB_INFO$ $DATA_START$ $MILLICODE$$LIT$ $LITSTATIC$$CODE$$UNWIND_START$$UNWIND$MILLICODE$$UNWIND$ $UNWIND_END$$RECOVER_START$$RECOVER$MILLICODE$ $RECOVER$ $RECOVER_END$ $PFA_COUNTER$$PFA_COUNTER_END$$DATA$ $STATICDATA$ $SHORTDATA$$SHORTSTATICDATA$$GLOBAL$ $SHORTBSS$$BSS$ $GDB_DEBUG$ $GDB_STRINGS$ $GDB_SYMBOLS$00$ 08 @0@0 0 @U( L0 0 0 $0 40 H0 X0 l 0 @0 @0 @0@0 @0 @ \@ p@ @ @ @ @ @  @0@ @ Q( P8  D" AP"G \" h#p x" " " # #3 #S0@P0@0$@04@0D@ T@$0T@d0h@0|@0@0@XU#0Q(U#@U#U$Ux$U$00A)U P$HU$` d*U($x p*U4$U@$ |*ULh$0X+'Uh$Up$0,o0@%U% -LU% U %8U0%P000-W0 @ X0 @%`U $X%h /0@ 0/U%U P`%0 `0 p00 @/  1(U 0%0A < 1pU @% 1xU H%UD% 10 10 @0H0 @p0 @$0 $@0 ,@0 8@0 D@.U P&U `&(0@ lk0 |r0 40 @0 @$0 @$0 @U  &@U P&X0 @/(0 @0 @/U $&U 0@&pU <&0 H=?0 \@$ D E4 Ex E E  F, FL $F0 dF 0GxU l& <G| HG TGU x& `G lG xG G G H  H0 HX0@ H{0 @0 @.0 @/80 @U H& ML0 MS M M M N N0 NHU ' NpU 'U 8'0  NU (8'HU DX'`U T'xU h'U |h'U ' ,NU 'U 'U (( 8N DN PN \N hN tN N NU ( U (8U (PU (h0 ,ts0 <j N OU P`( O@ OD Oh O O O0 \eG O0AO0 t@0@0 @)0 @)0 @0 @)0 @%0 @00 @0 @0 @0 @0 @0 @0@0 @ 0@(0@0(@04@.0@@0(0P@0\@00l@0x@/00@00@000@00@0@0@ 80@0@Up(Ux(0a e, td0@ |0,@0  ~804~S0L@ @0T@.U\( ( 4 @T L X d p8 ||0l@80@/0@ P0@%0@$0@$0@$0@.0@080@/0@%0@h0@00@ H ( @P  @  0l@00@0@U d 0 @0 _ ,  @  @  < T 0@ ,  @  @ < T0 @0t @ 0o 0o 0 0 0 0    0 0  0 0$7 L 04g 0D  08   0T , 0d? 0tS ` 0k 0w  0   0  $ , 8 @  H P$ `L h\ 0g 0 p 0 0 | 0 0x 0X ( 8 L 0H x  0( 0 0$@00@0P08 0D@0P@0P0 04((h((( ( 0( ( ( $( P(L((( <((((( (@( l( x(( `(PD(( P(((( $( T(\( ( ( ( (( ( ( ( D( P( |((( ( ( ( ( ( ( ( h( (0AO#0 MP#0kmain __text_start ___stack_zero __data_start $START_RTN$ $str_lit_sym$ $THIS_DATA$$THIS_SHORTDATA$ $THIS_BSS$$THIS_SHORTBSS$$THIS_STATICDATA$$THIS_SHORTSTATICDATA$ $THIS_LIT$$THIS_LITSTATIC$$$stat_0 __map_dlderrorstrlenitoa__exitsyserroropenclosereadwritelseekmmap$global$$START$$ARGV _fp_status_start_mcount_clear_counters _sr4export $UNWIND_START $UNWIND_END$RECOVER_START $RECOVER_END __dld_flags __dld_hook __dld_list __SYSTEM_ID _SYSTEM_ID $PFA_C_START $PFA_C_ENDerrno_etext_end __dld_loc $$dyncall $$divI_10$$remInet_bitsLC$0000LC$0001LC$0002LC$0003LC$0004LC$0005LC$0006LC$0007LC$0008LC$0009LC$0010LC$0011LC$0012LC$0013LC$0014LC$0015LC$0016LC$0017LC$0018LC$0019LC$0020LC$0021LC$0022LC$0023LC$0024LC$0025LC$0026LC$0027LC$0028LC$0029LC$0030LC$0031LC$0032LC$0033LC$0034LC$0035LC$0037LC$0038LC$0039LC$0040LC$0041LC$0042LC$0043LC$0044LC$0045LC$0046LC$0047LC$0048LC$0049LC$0050LC$0051LC$0052LC$0053LC$0054LC$0055LC$0036LC$0056LC$0057LC$0058LC$0059LC$0060LC$0061LC$0062LC$0063LC$0064LC$0065LC$0066LS$START_001_000$LS$START_002_000$LS$START_001_001$LS$START_002_001$LS$START_001_002$fontname Display_namehswindow lock_bitsnew_bitscopyright_bits covered_bits gray_bits mine_bits smiley_bitsreads gethostbynamebzerobcopysocketconnect call_socket gethostnameperrorexitbindprintflisten establishfflush__iobfreealte_verbindung_loeschennextstrcpymemsetselect KillKanalSende_to_Client Feld_Visible Feld_Internmallocneue_verbindung_einfuegenXPending getXeventPlay_Server_GamedisplayXSetForegroundgetcolorXFillRectangle XDrawStringother_player_win spiel_laeufttext foregroundgcwindowwinnerServer getsocknameaccept draw_item male_gitterget_connectionhighest_kanal_numberyx Feld_Backup XParseColor XAllocColordepthcmap exact_defsrandtimerandspielfeld_inittEstrcmpstrncmp check_commandClientPort ServerNameUsersignalsigi__main XOpenDisplayXCreateSimpleWindowsprintfXSetStandardProperties XCreateGCXSetBackground XSelectInputXLoadQueryFontfprintf XQueryFontXGContextFromGCXSetFontXCreatePixmapFromBitmapDataXSetWindowBackgroundPixmap XMapRaisedXFlush draw_screen CheckforEventsscanfCheckForClientEvent weiter_msgmsgscreen backgroundbghint highlightgc xfontinfob1b2b3b4b5b6b7b8blackgraywhite smileypixgraypix coveredpixlockpixminepixnetpix copyrightpixnewpix HighScore minepix_a sock_servers1s2 XCopyArea XDrawLineshow_endFuellexxClient_to_Servermaxerr XNextEventevent$$divIyyizuvw sock_clienthsgcheightwidthkeypatbgpatfg Ltext$0000initialized___6 Ltext_endLS$START_009_000$LS$START_009_001$ __DTOR_LIST____do_global_dtors_exit_dummy_decl_exit_dummy_ref __CTOR_LIST__atexit__do_global_ctors_iobLIBC//Mdiv_const.o0HPUX Precision Architecture vers PA2.0 assembler92453A.08.12 (sllic PA1.1)$neg3$pos$neg$neg5$neg6 $pos_for_17$neg10 $neg_for_17$neg12$neg15$neg17$u17$neg7$7$pos7$1$2$8 $neg7_shift$3$4$neg9$neg14$$divide_by_constant$$divI_2$$divI_4$$divI_8 $$divI_16$$divI_3$$divU_3$$divI_5$$divU_5$$divI_6$$divU_6 $$divU_10 $$divI_12 $$divU_12 $$divI_15 $$divU_15 $$divI_17 $$divU_17$$divI_7$$divU_7$$divI_9$$divU_9 $$divI_14 $$divU_14 LIBC//MdivI.o negative1 small_divisornormal$$divoI LIBC//MremI.ot1finishLIBC//MdyncallU.onoshlibsetextedataend_etext_edata_end __SYSTEM_ID _fp_statusetextedataend_etext_edata_end Xd Xdd Xd XdN0p; ; %>X e@k@Uv@U{@0PU@U#U#U@U hU@U  $*16=DP^ekq#7R_{XNetMine/usr/lib/Motif1.2//libXm.sl/usr/lib/X11R5//libXt.sl/usr/lib/X11R5//libX11.sl/lib/libc.slerrno_SYSTEM_ID_iob_end__iobatexitbindbcopyfflushselect_startwritesprintftimesignalgethostnamemallocsscanflistenfreesocketrandconnectexitperrorfprintfstrcmpstrncmpbzeroacceptreadstrlenstrcpygetsocknamegethostbynamememsetclosesrandXSetBackgroundXNextEventXParseColorXSetFontXSetForegroundXSetStandardPropertiesXFillRectangleXDrawStringXAllocColorXCreateGCXPendingXLoadQueryFontXCopyAreaXDrawLineXCreateSimpleWindowXSetWindowBackgroundPixmapXOpenDisplayXCreatePixmapFromBitmapDataXGContextFromGCXQueryFontXMapRaisedXSelectInputXFlushmainsigi__do_global_dtorsXZ]XZ]XZ]XZ]d@"Z]> ZZ]> ZZ]9 Z8 =@Y :Z @Z@ ZZZ] ZZ @"ZY :ZZ@= ZZZ@= Z ZY :Z]ya: =]: =]  : =@]ZBu ZZZZ ZZ]ya: =]: =]  : = @]ZB ZZZM ZZY :}@]Be]yZZ5@*Z@ya AZ@ya AZ]ya A @Z@] Z]: =] y a: =]Y(ZYY8Z@] Z]: =] y a: =]Y(Z YY8Z]Y Z @*Z@YA AZ@YA AZ]YA A @ ZZmZ?#Z>B @V   @  A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  :R @@@ @]@@@W@@@_@/@@ @V7@ @V@w@ @ : @V   @A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A  !A ˡF ! !V @JJ k?KuDEFYXZ#0+BZYX^k?#0*B@@@@ BK?@ @@k?ok= k=k=k=!k=)k=1k=9k=Ak=Ik=Qk=Y+DCGE4:PY#%`BF 04 ?4h4Y#!B7>I4ZX#%B *44Y#!BG>M4] BG>I4t *4YX#!BK>ZX#&`B7=4`ZX#%B G= *4(YX#!BK=K> K>K>)k?k?4 4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!4 6@H +`45 TFfuH Tt!4 6 H +`45 TFfuH Tt!4 6t Fҳ4, t(:H Tt!4 6t 4&fH 6Th _+`43@Jth8H8`0+`43@Jt0ZH8Btғ4 t( 4h04PZY4_ @H8Jt҃ES֓B4 t6@TִB4 6@H8J>v@֢J Ujuh(H8Ju64P4@k?ZYXW_ @hH` :H84PJzYH0_ @h(H(H0 t8H8@@H8Jth8H8Jth8_H?H4O?@ Error, no memory k?ADoh Ch?`4_ @hH` 2"a6z_@4?_U@HH?jtH+`44@JjuH@bt+`43@HjtH?H 4O?@k?ADoh?H?Jz_ }@H?_=@H?4O?@k?ADo+` 43 pJz_ -@S`0 B@H?4O?@Another Player win the game. Serverplayer will restart the game now.grayblueAnother Player win the game. Please RESTART NOW the game.k?ADoh?H?` +` 43j`+`4:"a 6yP_@+`43" 6Jy@@S+` 44 p+`45JJX_@+` 43 p+`44+`454k?4k?4 k?JzJJ4_}@+`4:0+`49_@+`43" 6Jy@@S+` 44 p+`45JJX_@+`4:_@S+` 44 p+`45+`464k?+`47k?k?JJJ4_m@"+` 43j`+`4:"a 6y_=@+`4:0+`49_ @+`43" 6Jy@@S+` 44 p+`45JJX_@+` 43 p+`44+`454k?4k?4 k?JzJJ4_u@+`43" 6Jy@@S+` 44 p+`45JJX_@+`4:_@S+` 44 p+`45+`464k?+`47k?k?JJJ4_@+`434ftH+` 43 Jt  _@H?4O?@k?ADohhhh?4ZY4_@4h4 h4 4H?YX_@_@h4hH?cES֓B4 t6TִB4 6H?>v@֢J Uju+`43Jt644k?ZYXW_@ShH?ғETtB4 6H?Ҵ>u@ւJu `0H`@4 h4 4H?YX_a@4 4H?YX_Y@Sh+`43HJs h"+`43H6juH`'4?_a@H`74h4ZY4_Y@HeES֓B4 t6TִB4 6H>v@֢J Uju4hh4hH644k?ZYXW_i@ShH` :4HYH_e@ShHH t(@xғ4 t(4H_@@xғ4 t(4H_@_ }@+`43@Jth4ZY4_@h4hhH`0 HBtғ4 t(4hHJt҆ES֓B4 t6TִB4 6HJ>v@֢J UjuHJth4?hHؒ` b+`4344k?JzYXW_)@ShH`0+`43@JthH`0b+`43@Jt0:HJtғETtB4 6HJҴ>u@ւJu `0r4hH4JzYH_@ShHH t8H_ U@HH t(4h4HU֕! Ftғ4 t(*+` 43j`4_@@hHH tXHTt!4 6tFҳ4$ t(H+`44 SFtғ4" t(:H+`44 S4$ft4hH6ThH`0HJthH` _u@+`43 4jt+`43 Jt4 X:+`434jt+`43Jt4< X+`43 JtUu +`45J +`44 S+`44 JV֖ +`46J +`45 TFuҳFҴ t8:+`43+`44 JzJA@+`43+`43+`44J6Uju7+`43 +`43 +`44 J6UjuA @hH?HHH4O?@k?ADoh?h?+` 43 Jt0+` 43 p+`44JzJH?+` 47 P_@+` 43 p+`44JzJ+` 48 P_@+` 43 PJ| H?H?4O?@k?ADo+` 434jth H 4" tXrhH4> tX"H U֕ tH +`44 Sf`H U֕ tH +`44 S4"ftH U֕ tH +`44 S4*ftH6ThH 6Th g+`43f`H+`434"ftH+`434*ftH+`43f`L+`434"ftL+`434*ftLh H 4" tXH U֕ tt!+`44 4$ftH U֕ tUu!+`444|  4$fH 6Th @hH4> tXH+`44 S4$ftHTt!+`444<  4$fH6Th7Z_ @SZ_ @+`434jt+`43Jt4 8_ @SZ4<@ST6d_ i@STp6ҔdU֕ T6dDғDҴVֶ  u+`44 S4&ft+`43+`43+`44J6UjuG@4h H 4 tXj4hH4> tXH U֕ tH +`44 SFtғ4& t8z+`43j`H U֕ tH Tt!+`444?  Fҳ4& t(J+`43+`43+`44J6UjuH U֕ tH Tt!+`444?  Fҳ4& t(J+`43+`43+`44J6UjuH U֕ tH Tt!+`444x  Fҳ4& t(J+`43+`43+`44J6UjuH U֕ tH Tt!+`444?  Fҳ4& t(J+`43+`43+`44J6UjuH U֕ tH Tt!+`444  Fҳ4& t(J+`43+`43+`44J6UjuH U֕ tH Tt!+`444  Fҳ4& t(J+`43+`43+`44J6UjuH U֕ tH Tt!+`444|  Fҳ4& t(J+`43+`43+`44J6UjuH U֕ tH Tt!+`444?  Fҳ4& t(J+`43+`43+`44J6UjuH U֕ tH +`44 S+`44FfuH6ThH 6Th oH?4O?@ Parameters are: -Server -Client -Name.... -PortNumber.... -ServerName.... -NoNet (1) if you are the server : -Server -PortNumber..... -Name..... (2) if you are the client : -Client -PortNumber..... -ServerName..... -Name..... Server-Programm MUST be running ! (3) for a single user game: -NoNet -Name.... .... stands for a string (C) by Martin Bauer if you want to contact me write a email to: Internet-Adress: Martin_Bauer@S2.MAUS.DE k?ADo"b6z ^@"b6z h^}@"b6z ^]@"b6z ^=@"b6z ^@"b6z X^@"b6z ^@"b6z ^@+4:`^@4?^%@H?4O?@-Server-Client-NoNet-PortNumber-Name-ServerName ERROR - not enough paramters ERROR -Client or -Server flag is missing ! ERROR - UserName is missing ! Server:%d Client:%d PortNum:%s Name:"%s" ServerName:"%s" k?ADoh?h?+` 43 4jt+`434jt+` 4: `"b6y^@+` 4: "b6y^U@+`4:0"b6y^%@H?`@+`43j`+`43H?6?Js tx+`44JTtBH? 6"6Jy^@S` 2+` 43 4jt+`43j`+`44JTtBH? 6"6Jy^@S` 2+` 43 j`+`434jt+`44JTtBH? 6"6Jy^E@S` *+` 43 j`+`43j`+`44JTtBH? 6"6(Jy4^@S` +`44JTtBH? 6t4J^@4&+` 4: `Y^@+`44JTtBH? 6"6@Jy4 ^@S` +`44JTtBH? 6t4J^@4+`4:0Y^m@+`44JTtBH? 6"6PJy4^@S` +`44JTtBH? 6t4J^@4&+` 4: Y^U@+`43+`43+`44J6UjuJ"b6zh^@+4:`^U@_ @+`43Jt R+` 43 Jt *"b6z^u@_@+`43Jt +` 43 Jt r+`4:0"b6y^@S` *"b6z^@_@+` 43 +`44"6`JyJ+` 47 `^=@"b6z+`490+` 48 ^@+4:`^=@H?4O?@@k?ADo4"6 Jy^@H?4O?@it's not a sony, it's freeware :=)May your children and mine live in peaceThis is not a fault, this is a feature !If you are female... write me ... soon !Dont hit any mines !Please write me if you enjoy this gameError: can't open display XNetMines [%s]Can't find font '%s' greenredorangeviolettcyanwhitemagentablack ERROR - PortNumber is missing ! ERROR - UserName is missing ! %ld ERROR - PortNumber is wrong ! ERROR - ServerName is missing ! Error: Socketerror Error: Server-Timeout V1.0 Error: Server-Timeout V2.0 @k?ADohhh?h?B@+`43@j`+`4:0"b6y ^ @+` 43j`+` 4:"b6y X^ m@+` 4:"b6y ^ =@+` 4:"b6y ^ @+` 4:"b6y `^@+` 4:"b6y ^@4"6Jy^ =@+`434(jtH?H?_@_@+43pJz^ @S+` 44 pjJ` 2"b6z ^@4^u@+` 43+` 45 pJJju+` 43 +` 45 pJ+` 45JUֵB J JHju+`43+` 45 pJ+` 45JUֵB J J`ju+`43+` 45 pJ+` 45JUֵB J Jhju+`43+` 45 pJ+` 45JUֵB J Jpju+`43" 6Jy_1@S+` 44j+`43`j`+`43`j`+`43`4jt+`43`4 jt +`43`4jt+` 43 p+` 45 pJ+` 46 pJJUֵB J +`46`6+`47`6+`47`6Kk?+`47`6K k?4 k?+`47Jk?+`47Jk?yJzJJJ^@S+`44j4"b6y +`480^@+` 43 p+`44k?H?k?H?k?+`45`k?JzJ44^@+` 43 p+`44JzJXW^u@S+`44j+` 43 p+`44+`45JzJJ^-@+` 43 p+`44+`45JzJJ^E@+` 43 p+`44JzJXW^U@S+`44j+` 43 p+`44JzJ"d6x^E@+` 43 pJz+49^=@S+`44jJ` +4:"b6y 8+48^@+`43Jz^@S+` 44 pJY^@S+`44j+` 43 p+`44+`46JJzJJ^@+`43" 6Jy_ y@S+`44j+`43"6 hJy_ !@S+`44 j+`43"6 xJy_ @S+`440j+`43"6 Jy_ q@S+`44@j+`43"6 Jy_ @S+`44Pj+`43"6 Jy_ @S+`44`j+`43"6 Jy_ i@S+`44pj+`43"6 Jy_ @S+`44j+`43"6 Jy_ @S+`44 j+`43" 6Jy_ a@S+`44j+`43"6 Jy_ @S+` 44 j+` 43 p+`444(k?+`45Jk?+`45Jk?+` 45 Jk?JzJ+48 4(^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 43 p+`44+`45k?4 k?4vk?JzJJW]u@+` 43 p+`44+`45k?4k?4k?JzJJW]@+` 43 p+`44+`45k?4@k?4k?JzJJ4]a@+` 43 p+`44+`454k?4@k?4k?JzJJW]@+` 43 p+`44+`45JzJJ]I@4h0H04 tXz4h(H(4< tX"H(SsB ֓B6?hH0SsB ֓B6Th +` 43 p+`44+`45H k?4$k?4$k?JzJJH]@H(6Th(H06Th0_@4h0H04 tX 4h(H(4< tXH0U֕ tH( +`44 SFtғ4" t8H(H0_M@H(6Th('H06Th0+` 43 p+`44+`45 JzJJ]@+` 43 p+` 44+`45+`46k?k?4xk?4Pk?4k?y4k?qJzJJJ] @+` 43 p+` 440+`45+`46k?k?4xk?4Pk?4Lk?y4k?qJzJJJ]I@+`43Jt0+` 43 p+` 44@+`45+`46k?k?4xk?4Pk?4k?y4k?qJzJJJ]a@_}@+` 43Jt _@+`43+`4:" 6Jx]@+`43" 6Jy^@S+` 44 p+`45JJX]y@+` 43 p+`44+`45k?4xk?4dk?JzJJ4]!@+`43" 6Jy^y@S+` 44 p+`45JJX]i@+`4:]@S+` 44 p+`45+`464@O?+H3 hk?َ` 74_-h3 hK?Y@7?lXXH 0 """@"D""""""""# ##,#0#L#P#l#p#())*+$,h ,l-H-T/`/00001$144<<=8=<DFGtHxMHPMPMOaae(eDj`jkkrrt`tp||~4~P8`HX\ # # Jh  @m@m /lib/dld.slERROR couldn't open dld.slERROR reading dld.slERROR bad magic number/system id for dld.slERROR bad dld.sl hpux aux header (text) (data) (bss)crt0: errno: 8x13bold??????;σ!!σ!3σ""σ$vσ$Tσ(̀σ0!á?"""""""DDDDDDDDDDDDDD"""""""""""D@@@DDDD"""D3BD!BD@BD"@B"@B!B D3fD<DD"`"" D@DDD@@D"" """"""""""DDDDDDDDDDDDDD""""""""""""""DDDDDDD~b@05 TU TU TU TU TU TU TU TU UU UU UU UU UU UU UU UU UU UU O??q~q~ ??O  a0 @ E    % ɘ @ a0   @$Header: mapdld.c,v 70.3 92/02/05 16:07:02 ssa Exp $ERROR: mmap failed for dld$$$%8%P'0&p&$H%h($$$&$0$x$`'$&&#&(#%%&#% %&'x(&@(%'H%%&X'`%'(('(8'( ''(P'(h#h/src1/Gnu/gcc-2.5.7/ ./libgcc2.c!int:t1=r1;-2147483648;2147483647;char:t2=r2;0;127;&long int:t3=r1;-2147483648;2147483647;unsigned int:t4=r1;0;-1;long unsigned int:t5=r1;0;-1;Clong long int:t6=r1;01000000000000000000000;0777777777777777777777;Clong long unsigned int:t7=r1;0000000000000;01777777777777777777777;short int:t8=r1;-32768;32767;!short unsigned int:t9=r1;0;65535;signed char:t10=r1;-128;127;unsigned char:t11=r1;0;255;float:t12=r1;4;0;double:t13=r1;8;0;long double:t14=r1;8;0;,complex int:t15=s8real:1,0,32;imag:1,32,32;;complex float:t16=r16;4;0;complex double:t17=r17;8;0; complex long double:t18=r18;8;0; void:t19=194cmp_type:T20=eCMP_SI:0,CMP_SF:1,CMP_DF:2,CMP_MAX:3,;reg_class:T21=eNO_REGS:0,R1_REGS:1,GENERAL_REGS:2,FP_REGS:3,GENERAL_OR_FP_REGS:4,HI_SNAKE_FP_REGS:5,SNAKE_FP_REGS:6,GENERAL_OR_SNAKE_FP_REGS:7,FP_OR_SNAKE_FP_REGS:8,NON_SHIFT_REGS:9,SHIFT_REGS:10,ALL_REGS:11,LIM_REG_CLASSES:12,;Bmachine_mode:T22=eVOIDmode:0,QImode:1,HImode:2,PSImode:3,SImode:4,PDImode:5,DImode:6,TImode:7,OImode:8,QFmode:9,HFmode:10,SFmode:11,DFmode:12,XFmode:13,TFmode:14,SCmode:15,DCmode:16,XCmode:17,TCmode:18,CQImode:19,CHImode:20,CSImode:21,CDImode:22,CTImode:23,COImode:24,BLKmode:25,CCmode:26,CCFPmode:27,MAX_MACHINE_MODE:28,;mode_class:T23=eMODE_RANDOM:0,MODE_INT:1,MODE_FLOAT:2,MODE_PARTIAL_INT:3,MODE_CC:4,MODE_COMPLEX_INT:5,MODE_COMPLEX_FLOAT:6,MAX_MODE_CLASS:7,; ptrdiff_t:t1 size_t:t4 wchar_t:t4 UQItype:t11 SItype:t1 USItype:t4 DItype:t6 UDItype:t7 SFtype:t12 DFtype:t13 word_type:t1(DIstruct:T24=s8high:1,0,32;low:1,32,32;;#DIunion:t25=u8s:24,0,64;ll:6,0,64;;func_ptr:t26=*27=f19__do_global_dtors:F19_exit_dummy_ref:G28=*1__do_global_ctors:F19 __main:F19 end_file./src1/Gnu/gcc-2.5.7/ ./libgcc2.c!int:t1=r1;-2147483648;2147483647;char:t2=r2;0;127;&long int:t3=r1;-2147483648;2147483647;unsigned int:t4=r1;0;-1;long unsigned int:t5=r1;0;-1;Clong long int:t6=r1;01000000000000000000000;0777777777777777777777;Clong long unsigned int:t7=r1;0000000000000;01777777777777777777777;short int:t8=r1;-32768;32767;!short unsigned int:t9=r1;0;65535;signed char:t10=r1;-128;127;unsigned char:t11=r1;0;255;float:t12=r1;4;0;double:t13=r1;8;0;long double:t14=r1;8;0;,complex int:t15=s8real:1,0,32;imag:1,32,32;;complex float:t16=r16;4;0;complex double:t17=r17;8;0; complex long double:t18=r18;8;0; void:t19=194cmp_type:T20=eCMP_SI:0,CMP_SF:1,CMP_DF:2,CMP_MAX:3,;reg_class:T21=eNO_REGS:0,R1_REGS:1,GENERAL_REGS:2,FP_REGS:3,GENERAL_OR_FP_REGS:4,HI_SNAKE_FP_REGS:5,SNAKE_FP_REGS:6,GENERAL_OR_SNAKE_FP_REGS:7,FP_OR_SNAKE_FP_REGS:8,NON_SHIFT_REGS:9,SHIFT_REGS:10,ALL_REGS:11,LIM_REG_CLASSES:12,;Bmachine_mode:T22=eVOIDmode:0,QImode:1,HImode:2,PSImode:3,SImode:4,PDImode:5,DImode:6,TImode:7,OImode:8,QFmode:9,HFmode:10,SFmode:11,DFmode:12,XFmode:13,TFmode:14,SCmode:15,DCmode:16,XCmode:17,TCmode:18,CQImode:19,CHImode:20,CSImode:21,CDImode:22,CTImode:23,COImode:24,BLKmode:25,CCmode:26,CCFPmode:27,MAX_MACHINE_MODE:28,;mode_class:T23=eMODE_RANDOM:0,MODE_INT:1,MODE_FLOAT:2,MODE_PARTIAL_INT:3,MODE_CC:4,MODE_COMPLEX_INT:5,MODE_COMPLEX_FLOAT:6,MAX_MODE_CLASS:7,; ptrdiff_t:t1 size_t:t4 wchar_t:t4 UQItype:t11 SItype:t1 USItype:t4 DItype:t6 UDItype:t7 SFtype:t12 DFtype:t13 word_type:t1(DIstruct:T24=s8high:1,0,32;low:1,32,32;;#DIunion:t25=u8s:24,0,64;ll:6,0,64;;func_ptr:t26=*27=f19_exit_dummy_decl:G1 end_file.d d0Xp(p0L4 hW 03@4P5`6p789El .($D `$|$\ddȀ4Tx  , T x Ȁ  8 X ̀ W Ȁ3 ؀4 5 678(98EL|l. $\ddȀ4Tx  , T x Ȁ  8 X XNetMine/XNetMine.c000060000626430021617000001411150564151616000154300ustar00bauermndritt9300000000000000#include #include #include #include #include #include #include #include /*** Sockets include *****/ #include /* obligatory includes */ #include #include #include #include #include #include #include #include #include #define X_MAX 31 /* wert+1 = maximale anzahl steine in x */ #define Y_MAX 17 /* dto. nur fuer y */ #define BOMB_MAX 80 /* wieviele Steine maximal auf dem Spielfeld sind */ #define LEER 0 #define SHOW 18 #define LOCK 20 #define HIDE 17 #define NIX 21 #define BOMB 19 #define EXBOMB 22 #define max_msg 4 #define SWIDTH 20 #define SHEIGHT 20 #define bigx 20 #define bigy 20 #define BWIDTH 14 #define XOFFSET 10 #define YOFFSET 60 #define BHEIGHT 14 struct verbindungen { /* struktur der verbindungsliste */ int kanal_nummer; /* Kanal-nummer */ struct verbindungen *nextptr; /* zeiger auf naechstes element */ char Was; /* ='W' write to server ='R' read to server */ }; short int Feld_Intern[X_MAX+X_MAX*Y_MAX+10]; short int Feld_Visible[X_MAX+X_MAX*Y_MAX+10]; short int Feld_Backup[X_MAX+X_MAX*Y_MAX+10]; struct AnfragePaket { short int Feld_Visible[X_MAX+X_MAX*Y_MAX+10]; short int Feld_Intern[X_MAX+X_MAX*Y_MAX+10]; char UserName[100]; char Was; /* ='W' write to server ='R' read to server */ }; int t,i,z,u,v,w,x,y,xx,yy,weiter_msg; int spiel_laeuft,err; Display *display; Window window; struct verbindungen *next; char fontname[80] = "8x13bold"; char *Display_name = NULL; unsigned long bg; int sock_server,sock_client,screen; int s1,s2,max,HighScore; Window hswindow = 0; XEvent event; XSizeHints hint; GC gc,hsgc; GC highlightgc; XFontStruct *xfontinfo; int height; int highest_kanal_number ; int width; int Server,Client; char msg[max_msg+5][120]; char ServerName[200],User[200],Port[200],text[100],winner[100]; KeySym key; Colormap cmap; XColor exact_def; unsigned long foreground, background,patbg,patfg,b1,b2,b3,b4,b5,b6,b7,b8,gray,white,black; int depth; Pixmap graypix; Pixmap minepix; Pixmap minepix_a; Pixmap coveredpix; Pixmap smileypix; Pixmap copyrightpix; Pixmap netpix; Pixmap newpix; Pixmap lockpix; char lock_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0x3f, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x00, 0xc0, 0x1f, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0x3f, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; char new_bits[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x0f, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x0f, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x0f, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x0f, 0xcf, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x0f, 0xcf, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x0f, 0xcf, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x0f, 0xcf, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x0f, 0xcf, 0xc3, 0xf0, 0xbf, 0x3b, 0x87, 0xcf, 0x0f, 0xcf, 0x83, 0x21, 0x21, 0x11, 0x82, 0xcf, 0x0f, 0xcf, 0x83, 0x21, 0x01, 0x33, 0x82, 0xcf, 0x0f, 0xcf, 0x83, 0x22, 0x11, 0x22, 0x81, 0xcf, 0x0f, 0xcf, 0x83, 0x24, 0x1f, 0x76, 0x81, 0xcf, 0x0f, 0xcf, 0x83, 0x24, 0x11, 0x54, 0x81, 0xcf, 0x0f, 0xcf, 0x83, 0x28, 0x01, 0xcc, 0x80, 0xcf, 0x0f, 0xcf, 0x83, 0x30, 0x21, 0x88, 0x80, 0xcf, 0x0f, 0xcf, 0xc3, 0xa1, 0x3f, 0x88, 0x80, 0xcf, 0x0f, 0xcf, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x0f, 0xcf, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x0f, 0xcf, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x0f, 0xcf, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x0f, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x0f, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x0f, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x0f, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, }; static unsigned char net_bits[] = { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x01, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x02, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x88, 0x88, 0x88, 0x08, 0x88, 0x88, 0x88, 0x08, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x22, 0x22, 0x22, 0x22, 0x02, 0x22, 0x22, 0x02, 0x11, 0x11, 0x01, 0x11, 0x11, 0x10, 0x11, 0x01, 0x22, 0x02, 0x22, 0x22, 0x22, 0x02, 0x22, 0x02, 0x44, 0x04, 0x40, 0x40, 0x40, 0x44, 0x44, 0x04, 0x80, 0x00, 0x80, 0x00, 0x08, 0x80, 0x88, 0x08, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x02, 0x11, 0x01, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x22, 0x02, 0x1e, 0xe7, 0xf7, 0x07, 0x22, 0x02, 0x44, 0x00, 0x33, 0x42, 0x92, 0x04, 0x44, 0x04, 0x88, 0x00, 0x21, 0x42, 0x82, 0x00, 0x88, 0x08, 0x44, 0x80, 0x40, 0x42, 0x82, 0x00, 0x44, 0x04, 0x22, 0x80, 0x40, 0x42, 0x82, 0x00, 0x22, 0x02, 0x11, 0x80, 0x40, 0x42, 0x82, 0x00, 0x11, 0x01, 0x00, 0x02, 0x21, 0x42, 0x82, 0x00, 0x20, 0x02, 0x44, 0x00, 0x33, 0x66, 0x82, 0x00, 0x44, 0x04, 0x88, 0x00, 0x1e, 0x3c, 0xc7, 0x01, 0x88, 0x08, 0x44, 0x04, 0x18, 0x00, 0x00, 0x00, 0x44, 0x04, 0x22, 0x00, 0x60, 0x00, 0x00, 0x00, 0x22, 0x02, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x22, 0x02, 0x00, 0x00, 0x00, 0x20, 0x02, 0x02, 0x44, 0x04, 0x00, 0x00, 0x00, 0x40, 0x44, 0x04, 0x88, 0x00, 0x00, 0x00, 0x00, 0x80, 0x88, 0x08, 0x44, 0x44, 0x00, 0x40, 0x00, 0x40, 0x44, 0x04, 0x22, 0x22, 0x20, 0x20, 0x22, 0x22, 0x22, 0x02, 0x11, 0x01, 0x01, 0x11, 0x11, 0x10, 0x11, 0x01, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x02, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x88, 0x08, 0x88, 0x88, 0x80, 0x88, 0x88, 0x08, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x02, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x01, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x02, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x08, }; char copyright_bits[] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0xff, 0xff, 0x7f, 0xfb, 0xf8, 0xff, 0xff, 0x0f, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0x7e, 0x62, 0x40, 0xff, 0xff, 0x0f, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0xff, 0xff, 0x1a, 0x01, 0x00, 0xfa, 0xff, 0x0f, 0x01, 0x01, 0x01, 0xe0, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0xb0, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x18, 0x02, 0x00, 0x01, 0x01, 0xff, 0xff, 0x03, 0x08, 0x00, 0xf8, 0xff, 0x0f, 0x10, 0x10, 0x00, 0x08, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x08, 0x02, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x18, 0x02, 0x10, 0x10, 0x00, 0xff, 0xff, 0x05, 0x30, 0x03, 0xff, 0xff, 0x0f, 0x01, 0x01, 0x01, 0xe0, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0xff, 0xff, 0x35, 0x01, 0x00, 0xf9, 0xff, 0x0f, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, }; char covered_bits[] = { 0x00, 0x00, 0x08, 0x00, 0x00, 0x0c, 0x54, 0x55, 0x0d, 0xa8, 0xaa, 0x0e, 0x54, 0x55, 0x0d, 0xa8, 0xaa, 0x0e, 0x54, 0x55, 0x0d, 0xa8, 0xaa, 0x0e, 0x54, 0x55, 0x0d, 0xa8, 0xaa, 0x0e, 0x54, 0x55, 0x0d, 0xa8, 0xaa, 0x0e, 0x54, 0x55, 0x0d, 0xa8, 0xaa, 0x0e, 0x54, 0x55, 0x0d, 0xa8, 0xaa, 0x0e, 0x54, 0x55, 0x0d, 0xa8, 0xaa, 0x0e, 0xfe, 0xff, 0x0f, 0xff, 0xff, 0x0f}; char gray_bits[] = { 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x05, 0xaa, 0xaa, 0x0a}; char mine_bits[] = { 0xff, 0xff, 0x0f, 0x01, 0x00, 0x08, 0x01, 0x02, 0x08, 0x01, 0x02, 0x08, 0x91, 0x4f, 0x08, 0xe1, 0x3f, 0x08, 0xe1, 0x3f, 0x08, 0x71, 0x7e, 0x08, 0x71, 0x7e, 0x08, 0xfd, 0xff, 0x09, 0xf1, 0x7f, 0x08, 0xf1, 0x7f, 0x08, 0xe1, 0x3f, 0x08, 0xe1, 0x3f, 0x08, 0x91, 0x4f, 0x08, 0x01, 0x02, 0x08, 0x01, 0x02, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0xff, 0xff, 0x0f}; char smiley_bits[] = { 0xff, 0xff, 0x0f, 0x01, 0x00, 0x0c, 0x81, 0x0f, 0x0c, 0x61, 0x30, 0x0c, 0x11, 0x40, 0x0c, 0x09, 0x80, 0x0c, 0x09, 0x80, 0x0c, 0x45, 0x10, 0x0d, 0x05, 0x00, 0x0d, 0x05, 0x00, 0x0d, 0x05, 0x00, 0x0d, 0x25, 0x20, 0x0d, 0xc9, 0x98, 0x0c, 0x09, 0x87, 0x0c, 0x11, 0x40, 0x0c, 0x61, 0x30, 0x0c, 0x81, 0x0f, 0x0c, 0x01, 0x00, 0x0c, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f}; void draw_screen(); void male_gitter(); void draw_item(); unsigned long getcolor(); /***********************************/ int reads(socket,ptr,size) int socket; char *ptr; int size; { int s,t,r; r=0; t=0; s=0; for (;1==1;) { t++; if (t>(size+3)) return(r); s=read(socket,ptr,size-r); ptr=ptr+s; r=r+s; if (r==-1) { return(0); } if (r==size) return(size); } } int call_socket(hostname, portnum) char *hostname; long portnum; { struct sockaddr_in sa; struct hostent *hp; int a, s; if ((hp= gethostbyname(hostname)) == NULL) { /* do we know the host's */ errno= ECONNREFUSED; /* address? */ return(-1); /* no */ } bzero(&sa,sizeof(sa)); bcopy(hp->h_addr,(char *)&sa.sin_addr,hp->h_length); /* set address */ sa.sin_family= hp->h_addrtype; sa.sin_port= htons((u_short)portnum); if ((s= socket(hp->h_addrtype,SOCK_STREAM,0)) < 0) /* get socket */ return(-1); if (connect(s,(struct sockaddr *)&sa,sizeof sa) < 0) /* connect */ return(-1); return(s); } int establish(portnum) /* funktion stellt einen socket zur */ u_short portnum; /* zur verfuegung */ { char myname[100]; /* diverse variablen */ int s; struct sockaddr_in sa; struct hostent *hp; bzero(&sa,sizeof(struct sockaddr_in)); /* strukutr saubermachen */ gethostname(myname,99); /* unserer eigener hostname */ hp= gethostbyname(myname); /* ... infos ueber uns bekommen */ if (hp == NULL) /* gib es uns wirklich ? */ {perror("Keine Hostadresse gefunden"); exit(-1); }; /* nein, scream and die .... */ sa.sin_family= hp->h_addrtype; /* unsere host addresse */ sa.sin_port= htons(portnum); /* unsere port nummer */ if ((s= socket(AF_INET,SOCK_STREAM,0)) < 0) /* und einen socket machen */ {perror("Socket not installed"); exit(-1);}; /* kein socket => scream and die */ if (bind(s,(struct sockaddr *) &sa,sizeof sa) < 0) /* adresse dem socket mitteilen */ { printf("\n XNetBomb-Server is already running !\n"); exit(-1);}; /* binde addresse zum socket */ listen(s, 5 ); /* warteschlagne = 5 plaetze */ return(s); /* und unseren socket zurueckgeben */ } alte_verbindung_loeschen(verbindung_next) /* loescht einen Kanal aus der Verbindungs-liste */ struct verbindungen *verbindung_next; { verbindung_next->Was=9; return; fflush(stdout); if (verbindung_next==next) /* sind wir erstes element ? */ { /* ja,wir sind erstes element */ next=verbindung_next->nextptr; free(verbindung_next); } else /* nein, wir sind nicht erstes element */ { struct verbindungen *Ptr; for (Ptr=next;Ptr!=NULL;) { if (Ptr->nextptr==verbindung_next) { Ptr->nextptr=verbindung_next->nextptr; free(verbindung_next); return; } Ptr=Ptr->nextptr; } } } void Sende_to_Client() { long res,max,t,err,size; struct verbindungen *verbindung_next; struct timeval timeout; fd_set writefds; struct AnfragePaket Anfrage; Anfrage.Was=0; strcpy( Anfrage.UserName,"SERVER"); max=X_MAX*Y_MAX+6; timeout.tv_sec=0; timeout.tv_usec=900; for (t=0;t<=max;t++) { Anfrage.Feld_Visible[t]=Feld_Visible[t]; Anfrage.Feld_Intern[t]=Feld_Intern[t]; if (Anfrage.Feld_Intern[t]==EXBOMB) Anfrage.Feld_Intern[t]=BOMB; } verbindung_next=next; /* listenstart setzen */ for (;(verbindung_next!=NULL)&&(next!=NULL);) /* und bis zum letzten element machen ... */ { if (verbindung_next->Was=='R') { size=sizeof(struct AnfragePaket); FD_ZERO(&writefds); FD_SET(verbindung_next->kanal_nummer,&writefds); err=0; res = select(verbindung_next->kanal_nummer+10,0,&writefds,0,&timeout); if (res==1) { err=write(verbindung_next->kanal_nummer,&Anfrage,size); } if (err!=size) {KillKanal(verbindung_next); } verbindung_next=verbindung_next->nextptr; } else { verbindung_next=verbindung_next->nextptr; } } } void neue_verbindung_einfuegen(wert,kanal_nummer) /* fuegt ein Kanal in die Verbindungsliste ein */ char wert; int kanal_nummer; { struct verbindungen *Ptr; Ptr=(struct verbindungen *)malloc(sizeof(struct verbindungen)); if (Ptr==NULL) { printf("\n Error, no memory "); exit(-1); } Ptr->kanal_nummer=kanal_nummer; Ptr->nextptr=next; Ptr->Was=wert; next=Ptr; } KillKanal(Ptr) struct verbindungen *Ptr; { close ((int) Ptr->kanal_nummer); alte_verbindung_loeschen(Ptr); } void Play_Server_Game() { if (XPending(display)) { getXevent(); /* bearbeite event */ } } void other_player_win(a) int a; { if (a==0) { /* client zeigt an */ spiel_laeuft=0; strcpy(text,"Another Player win the game. Serverplayer will restart the game now."); XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,4,385,625,400); strcpy(winner,text); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,10,395 ,text,strlen(text)); } else { /* Server zeigt an */ spiel_laeuft=0; strcpy(text,"Another Player win the game. Please RESTART NOW the game."); strcpy(winner,text); XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,4,385,625,400); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,10,395 ,text,strlen(text)); Feld_Visible[X_MAX*Y_MAX+3]=77; if (Server==1) Sende_to_Client(); } } int get_connection(s) /* warte auf eine verbindungsversuch und verwalte die */ int s; /* restlichen Lese/schreibaufforderungen .... */ { struct verbindungen *verbindung_next; struct verbindungen *verbindung_neu; struct sockaddr_in isa; /* addresse des sockets */ char *buffer[10]; int size,i,err,change; /* i=groesse der adresse */ int res,t,new_socket; /* new_socket = socket of connection */ fd_set readfds; fd_set writefds; int nfds,okk; struct timeval timeout; FD_ZERO(&readfds); change=1; i = sizeof(isa); /* socket addresse finden */ getsockname(s,(struct sockaddr *) &isa,&i); /* */ while (1==1) /* endlos machen */ { Play_Server_Game(); timeout.tv_sec=0; timeout.tv_usec=500; FD_SET(s ,&readfds ); res=select(highest_kanal_number+10,&readfds,0,0,&timeout); /* warte auf connect bzw. 100usec */ if ((FD_ISSET(s ,&readfds)) && (res>0)) /* war da ein connect ? */ { /* ok, hier haben wir einen neuen requester */ i = sizeof(isa); /* socket addresse finden */ getsockname(s,(struct sockaddr *) &isa,&i); new_socket =accept(s ,(struct sockaddr *) &isa ,&i ); /* neuer socket in die liste aufnehmen */ if (new_socket>=highest_kanal_number) {highest_kanal_number=new_socket+10;}; /* gleiche obergrenze fuer fd-files an */ if (new_socket==-1) { exit(-1); } if (new_socket != -1) { struct AnfragePaket Anfrage; size=sizeof(struct AnfragePaket); FD_ZERO(&readfds); FD_SET(new_socket ,&readfds ); timeout.tv_sec=10; err=0; timeout.tv_usec=900; res = select(new_socket+3, &readfds, 0, 0, &timeout); if (res==1) { err=reads(new_socket,&Anfrage,size); } if (err==size) { if (Anfrage.Was=='W') neue_verbindung_einfuegen('W',new_socket); if (Anfrage.Was=='R') neue_verbindung_einfuegen('R',new_socket); Sende_to_Client(); } } } verbindung_next=next; FD_ZERO(&readfds); timeout.tv_sec=0; timeout.tv_usec=500; okk=0; while (verbindung_next!=NULL) { if (verbindung_next->Was=='W') { okk=1; FD_SET(verbindung_next->kanal_nummer,&readfds); } verbindung_next=verbindung_next->nextptr; } res=-1; if (okk==1) { res = select(highest_kanal_number, &readfds, 0, 0, &timeout); } if (res) { verbindung_next=next; while ((verbindung_next!=NULL)&&(next!=NULL)) { if (FD_ISSET(verbindung_next->kanal_nummer,&readfds)) { struct AnfragePaket Anfrage; size=sizeof(struct AnfragePaket); err=reads(verbindung_next->kanal_nummer,&Anfrage,size); if (err!=size) { KillKanal(verbindung_next); } if (err==size) { long max,t; max=X_MAX*Y_MAX; if (Anfrage.Feld_Visible[max+3]==77) { spiel_laeuft=0; other_player_win(1); } for (t=0;t<=max;t++) { if ((Anfrage.Feld_Visible[t]==SHOW) && (Feld_Visible[t]==HIDE)) { Feld_Visible[t]=SHOW; change=1; } } } } if (verbindung_next!=NULL) verbindung_next=verbindung_next->nextptr; } } if (change==1) { Sende_to_Client(); for (y=1;(y1) { for (t=0;t<(argc-1);t++) { if (strcmp("-Server",argv[t+1])==0) { Server=1; Client=0; } if (strcmp("-Client",argv[t+1])==0) { Server=0; Client=1; } if (strcmp("-NoNet",argv[t+1])==0) { Server=0; Client=0; } if (strncmp("-PortNumber",argv[t+1],11)==0) { char text[500]; strcpy(text,argv[t+1]); strcpy(Port,&text[11]); } if (strncmp("-Name",argv[t+1],5)==0) { char text[500]; strcpy(text,argv[t+1]); strcpy(User,&text[5]); } if (strncmp("-ServerName",argv[t+1],11)==0) { char text[500]; strcpy(text,argv[t+1]); strcpy(ServerName,&text[11]); } } } else { printf("\n ERROR - not enough paramters\n\n"); fflush(stdout); E(); } if ((Client==1) && (Server==1)) { printf("\n ERROR -Client or -Server flag is missing ! \n\n"); E(); } if ((Client==0) && (Server==0)) { if (strcmp(User,"")==0) {printf("\n ERROR - UserName is missing ! \n\n"); E(); } } printf("\n Server:%d Client:%d PortNum:%s \n",Server,Client,Port); printf(" Name:\"%s\" ServerName:\"%s\"\n",User,ServerName);fflush(stdout); } void CheckForClientEvent(); void sigi() { signal(SIGPIPE,sigi); } main(argc,argv) int argc; char *argv[]; { char into[600]; next=NULL; strcpy(winner,"it's not a sony, it's freeware :=)"); weiter_msg=0; strcpy(msg[0],"May your children and mine live in peace"); strcpy(msg[1],"This is not a fault, this is a feature !"); strcpy(msg[2],"If you are female... write me ... soon !"); strcpy(msg[3],"Dont hit any mines !"); strcpy(msg[4],"Please write me if you enjoy this game"); signal(SIGPIPE,sigi); highest_kanal_number=20; check_command(argc,argv); spielfeld_init(); if(!(display = XOpenDisplay(Display_name))) { printf("Error: can't open display\n"); exit(1); } screen = DefaultScreen(display); depth = DefaultDepth(display,screen) ; cmap = DefaultColormap(display,screen); background = WhitePixel(display,screen); foreground = BlackPixel(display,screen); bg = getcolor("gray",background); hint.x = 0; hint.y = 0; hint.width = 622; hint.height = 400; hint.flags = PPosition | PSize; window = XCreateSimpleWindow (display, DefaultRootWindow(display), hint.x, hint.y, hint.width, hint.height, 5, foreground, background); sprintf(into,"XNetMines [%s]",User); XSetStandardProperties(display, window,into, into, None, argv, argc, &hint); gc = XCreateGC(display, window, 0, 0); XSetBackground(display, gc, background); XSetForeground(display, gc, foreground); highlightgc = XCreateGC(display, window, 0, 0); XSelectInput(display, window, Button1MotionMask | Button2MotionMask | Button3MotionMask | ButtonPressMask | ButtonReleaseMask | KeyPressMask | ExposureMask); if((xfontinfo = XLoadQueryFont(display,fontname)) == NULL) { fprintf(stderr,"Can't find font '%s'\n",fontname); xfontinfo = XQueryFont(display,XGContextFromGC(gc)); } XSetFont(display,gc,xfontinfo->fid); b1=getcolor("blue",foreground); b2=getcolor("green",foreground); b3=getcolor("red",foreground); b4=getcolor("orange",foreground); b5=getcolor("violett",foreground); b6=getcolor("cyan",foreground); b7=getcolor("white",foreground); b8=getcolor("magenta",foreground); black=getcolor("black",foreground); gray =getcolor("gray",foreground); white=getcolor("white",foreground); smileypix = XCreatePixmapFromBitmapData(display,window, smiley_bits,SWIDTH,SHEIGHT,foreground, background, depth); graypix = XCreatePixmapFromBitmapData(display,window, gray_bits,SWIDTH,SHEIGHT,foreground, background, depth); coveredpix = XCreatePixmapFromBitmapData(display,window, covered_bits,SWIDTH,SHEIGHT,foreground, background, depth); lockpix = XCreatePixmapFromBitmapData(display,window, lock_bits,SWIDTH,SHEIGHT,foreground, background, depth); minepix = XCreatePixmapFromBitmapData(display,window, mine_bits,SWIDTH,SHEIGHT,foreground, background, depth); netpix = XCreatePixmapFromBitmapData(display,window, net_bits,60,40,b1, background, depth); copyrightpix = XCreatePixmapFromBitmapData(display,window, copyright_bits,60,40,b1, background, depth); newpix = XCreatePixmapFromBitmapData(display,window, new_bits,60,40,b1, background, depth); HighScore=0; if(depth == 1) { XSetWindowBackgroundPixmap(display,window,graypix); } minepix_a = XCreatePixmapFromBitmapData(display,window, mine_bits,SWIDTH,SHEIGHT,foreground, b3, depth); XMapRaised(display, window); XFlush(display); draw_screen(); if ((Server==0) && (Client==0)) { CheckforEvent(); } if (Server==1) { long PortNumber; if (strcmp(Port,"")==0) {printf("\n ERROR - PortNumber is missing ! \n\n"); E(); } if (strcmp(User,"")==0) {printf("\n ERROR - UserName is missing ! \n\n"); E(); } if (0==sscanf(Port,"%ld",&PortNumber)) { printf("\n ERROR - PortNumber is wrong ! \n\n"); E(); } sock_server=establish(PortNumber); get_connection(sock_server); /* und endlosschleife */ } if (Client==1) { long PortNumber; fd_set readfds; struct timeval timeout; if (strcmp(ServerName,"")==0) {printf("\n ERROR - ServerName is missing ! \n\n"); E(); } if (strcmp(Port,"")==0) {printf("\n ERROR - PortNumber is missing ! \n\n"); E(); } if (strcmp(User,"")==0) {printf("\n ERROR - UserName is missing ! \n\n"); E(); } if (0==sscanf(Port,"%ld",&PortNumber)) { printf("\n ERROR - PortNumber is wrong ! \n\n"); E(); } s1=call_socket(ServerName,PortNumber); if (s1==-1) { printf("\nError: Socketerror\n"); E(); } { long max,t; struct AnfragePaket Anfrage; strcpy( Anfrage.UserName,User); max=X_MAX*Y_MAX; for (t=0;t<=max;t++) { Anfrage.Feld_Visible[t]=Feld_Visible[t]; Anfrage.Feld_Intern[t] =Feld_Intern[t]; } Anfrage.Was='W'; /* s1 ist der kanal ZUM SCHREIBEN */ timeout.tv_sec=10; timeout.tv_usec=0; FD_ZERO(&readfds); FD_SET(s1,&readfds); if (1==select(s1+1,0,&readfds,0,&timeout)) { write(s1,&Anfrage,sizeof(struct AnfragePaket)); } else { printf("Error: Server-Timeout V1.0\n"); exit(-1); } Anfrage.Was='R'; /* s2 ist der kanal zum LESEN */ s2=call_socket(ServerName,PortNumber); timeout.tv_sec=10; timeout.tv_usec=0; FD_ZERO(&readfds); if (s2==-1) {printf("\nError: Socketerror\n"); E(); } FD_SET(s2,&readfds); if (1==select(s2+1,0,&readfds,0,&timeout)) { write(s2,&Anfrage,sizeof(struct AnfragePaket)); } else { printf("Error: Server-Timeout V2.0\n"); exit(-1); } CheckForClientEvent(); } } } void show_end() { int xx,yy,nr,x,y; for (y=1;(ymax_msg) weiter_msg=0; strcpy(winner,msg[weiter_msg]); spiel_laeuft=1;HighScore=0; for (t=0;t<=(max+4);t++) { Feld_Visible[t]=HIDE; Feld_Intern[t]=0; } draw_screen(); } for (t=0;t<=max;t++) { if (spiel_laeuft==1) { if ((SHOW==Anfrage.Feld_Visible[t])&&(Feld_Intern[t]!=BOMB)) Feld_Visible[t]=SHOW; if (Feld_Intern[t]!=EXBOMB) Feld_Intern[t]=Anfrage.Feld_Intern[t]; } } for (y=1;(y nur wenn wir noch was machen wollen */ { getXevent(); } } } void draw_item(x,y) int x,y; { char a; int xx,yy,nr; a='.'; xx=x*bigx; yy=y*bigy; nr=x+y*X_MAX; XSetForeground(display, gc, gray); XFillRectangle(display,window,gc,xx-10,40+yy,20,20); Feld_Backup[nr]=Feld_Visible[nr]; if (Feld_Visible[nr]==SHOW) { if (Feld_Intern[nr]==0) { a='.'; } if (Feld_Intern[nr]==1) { a='1'; XSetForeground(display, gc, b1); } if (Feld_Intern[nr]==2) { a='2'; XSetForeground(display, gc, b2); } if (Feld_Intern[nr]==3) { a='3'; XSetForeground(display, gc, b3); } if (Feld_Intern[nr]==4) { a='4'; XSetForeground(display, gc, b4); } if (Feld_Intern[nr]==5) { a='5'; XSetForeground(display, gc, b5); } if (Feld_Intern[nr]==6) { a='6'; XSetForeground(display, gc, b6); } if (Feld_Intern[nr]==7) { a='7'; XSetForeground(display, gc, b7); } if (Feld_Intern[nr]==8) { a='8'; XSetForeground(display, gc, b8); } if (Feld_Intern[nr]==EXBOMB) { a='.'; XCopyArea(display,minepix_a,window,gc,0,0,SWIDTH,SHEIGHT,xx-10,40+yy); } if (Feld_Intern[nr]==BOMB) { XCopyArea(display,minepix,window,gc,0,0,SWIDTH,SHEIGHT,xx-10,40+yy); a='.'; } if (a!='.') { char text[4]; text[0]=a; text[1]=0; XDrawString(display,window,gc,xx-4,54+yy,text,1); } } if (Feld_Visible[nr]==HIDE) { xx=x*bigx-8; yy=y*bigy+42; XSetForeground(display, gc, white); XFillRectangle(display,window,gc,xx-2,yy-2,20,20); XSetForeground(display, gc, gray); XFillRectangle(display,window,gc,xx,yy,18,18); } if (Feld_Visible[nr]==LOCK) { XCopyArea(display,lockpix,window,gc,0,0,SWIDTH,SHEIGHT,x*bigx-10,39+y*bigy); } } void male_gitter() { int i,x,y,xx,yy; XSetForeground(display, gc, black); for (i=0;i<2;i++) { for (y=0;y<(Y_MAX);y++) { yy=y*bigy; XDrawLine(display,window,gc,bigx-12,yy+58+i,X_MAX*bigx-bigx+9,58+yy+i); } for (x=0;x<(X_MAX);x++) { xx=x*bigx; XDrawLine(display,window,gc,i+xx+8,60,i+xx+8,38+Y_MAX*bigy); } } } void draw_screen() { long dir,xx,yy,x,y,a,b,c,d; GC highlightgc,shadowgc; XSetForeground(display, gc, white); XFillRectangle(display,window,gc,9,60,bigx*X_MAX-bigx,bigy*Y_MAX); XSetBackground(display, gc, gray); XSetForeground(display, gc, gray); XFillRectangle(display,window,gc,0,0,1280,59); XFillRectangle(display,window,gc,0,0,9,1000); XFillRectangle(display,window,gc,8+(X_MAX-1)*bigx,0,800,1000); XFillRectangle(display,window,gc,0,60+(Y_MAX-1)*bigy,800,1000); XSetForeground(display, gc, gray); for (y=1;y=10) && (yy<=40)) { if ((xx>10) && (xx<70)) { /* Copyright angeklickt */ char text[120]; XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,4,383,625,400); XSetForeground(display, gc, getcolor("red",foreground)); strcpy(text,"(c) 1994 by Martin Bauer to contact me: Martin_Bauer@S2.MAUS.DE"); strcpy(winner,text); XDrawString(display,window,gc,10,395,text,strlen(text)); } if ((xx>270) && (xx<330) && (Client!=1)) { /* new angeklickt */ spielfeld_init(); weiter_msg++; if (weiter_msg>max_msg) weiter_msg=0; strcpy(winner,msg[weiter_msg]); HighScore=0; draw_screen(); Feld_Intern[Y_MAX*X_MAX+4]=99; Sende_to_Client(); Feld_Intern[Y_MAX*X_MAX+4]=0; } if ((xx>550) && (xx<610)) { /* net-config angeklickt */ if (Server==1) close(sock_server); if (Client==1) close(s1); if (Client==1) close(s2); exit(-1); } } if ((x>=0) && (x<(X_MAX-1)) && (y>=0) && (y<(Y_MAX-1)) && (spiel_laeuft==1)) { /* spieler hat im Spielfeld geklickt ! */ x++; y++; if (event.xbutton.button==Button1) { /* taste 1 im spielfeld geklickt ! */ xx=x+y*X_MAX; if (Feld_Visible[xx]==HIDE) { /* hat auf verstecktes feld getippt */ Feld_Visible[xx]=SHOW; if (Feld_Intern[xx]==0) { Fuelle(x,y); } if ((Feld_Intern[xx]!=BOMB) && (Client==1)) { /* ok, jetzt dem server mitteilen */ long max,t,err,size; struct AnfragePaket Anfrage; Anfrage.Was='W'; strcpy( Anfrage.UserName,User); max=X_MAX*Y_MAX; for (t=0;t<=max;t++) { Anfrage.Feld_Visible[t]=Feld_Visible[t]; Anfrage.Feld_Intern[t]=Feld_Intern[t]; } err=write(s1,&Anfrage,sizeof(struct AnfragePaket)); if (err!=sizeof(struct AnfragePaket)) { printf("\n socket-write fehler \n"); exit(-1); } } if ((Feld_Intern[xx]!=BOMB) && (Server==1)) { /* ok, jetzt den clients mitteilen */ Sende_to_Client(); } if (Feld_Intern[xx]==BOMB) { char text[80]; spiel_laeuft=0; Feld_Intern[xx]=EXBOMB; strcpy(text,"Booooooommmmmm , you lost the game. Please restart the game now."); if (Client==1) strcpy(text,"You lost the game. This game will be restart after one Player is left"); if (Server==1) strcpy(text,"You lost the game. Please DO NOT restart the Game NOW. "); if ((Server==1) && (next==NULL)) strcpy(text,"You lost the game. Please RESTART the Game NOW. "); strcpy(winner,text); XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,4,385,625,400); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,10,395 ,text,strlen(text)); show_end(); } if ((Feld_Intern[xx]!=BOMB)) { /* user hat ein zahlenfeld/space aufgedeckt ! */ int k; k=0; if (Feld_Intern[xx]<=8) HighScore=HighScore+Feld_Intern[xx]; sprintf(text,"Score: %d",HighScore); XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,75,0,80,55); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,75,30 ,text,strlen(text)); max=X_MAX*Y_MAX; for (t=0;t<=max;t++) { if ((Feld_Visible[t]==HIDE)) k=1; if ((Feld_Intern[t]!=BOMB) && (Feld_Visible[t]==LOCK)) k=1; } if (k==0) {/* spiel beendet und gewonnen ! */ spiel_laeuft=0; strcpy(text,"You win the game. Please RESTART NOW the game "); if (Client==1) strcpy(text,"You win the game. This game will be restart by the Serverplayer now"); if (Server==1) strcpy(text,"You win the game. Please RESTART NOW the game "); strcpy(winner,text); Feld_Visible[X_MAX*Y_MAX+3]=77; XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,4,385,625,400); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,10,395 ,text,strlen(text)); if (Server==1) Sende_to_Client(); if (Client==1) { Client_to_Server(); } } } draw_item(x,y); male_gitter(); } } else { /* taste 2/3 im spielfeld geklickt ! */ xx=x+y*X_MAX; if (Feld_Visible[xx]==HIDE) { /* hat auf verstecktes feld getippt */ Feld_Visible[xx]=LOCK; draw_item(x,y); male_gitter(); } else { if (Feld_Visible[xx]==LOCK) { /* hat auf gelocktes feld getippt */ Feld_Visible[xx]=HIDE; draw_item(x,y); male_gitter(); } } { /* user hat ein zahlenfeld/space aufgedeckt ! */ int k; k=0; sprintf(text,"Score: %d",HighScore); XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,75,0,80,55); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,75,30 ,text,strlen(text)); max=X_MAX*Y_MAX; for (t=0;t<=max;t++) { if ((Feld_Visible[t]==HIDE)) k=1; if ((Feld_Intern[t]!=BOMB) && (Feld_Visible[t]==LOCK)) k=1; } if (k==0) {/* spiel beendet und gewonnen ! */ spiel_laeuft=0; strcpy(text,"You win the game."); strcpy(text,"You win the game. Please RESTART NOW the game "); if (Client==1) strcpy(text,"You win the game. This game will be restart by the Serverplayer now"); if (Server==1) strcpy(text,"You win the game. Please RESTART NOW the game "); strcpy(winner,text); Feld_Visible[X_MAX*Y_MAX+3]=77; XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,4,385,625,400); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,10,395 ,text,strlen(text)); if (Server==1) Sende_to_Client(); if (Client==1) { Client_to_Server(); } } } } } } break; } } w,gc,4,385,625,400); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,10,395 ,text,strlen(text)); if (Server==1) Sende_to_Client(); if (Client==1) { Client_to_Server(); } } } XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,4,383,625,400); XSetForeground(display, gc, getcolor("red",foreground)); strcpy(text,"(c) 1994 by Martin Bauer to contact me: Martin_Bauer@S2.MAUS.DE"); strcpy(winner,text); XDrawString(display,window,gc,10,395,text,strlen(text)); } if ((xx>270) && (xx<330) && (Client!=1)) { /* new angeklickt */ spielfeld_init(); weiter_msg++; if (weiter_msg>max_msg) weiter_msg=0; strcpy(winner,msg[weiter_msg]); HighScore=0; draw_screen(); Feld_Intern[Y_MAX*X_MAX+4]=99; Sende_to_Client(); Feld_Intern[Y_MAX*X_MAX+4]=0; } if ((xx>550) && (xx<610)) { /* net-config angeklickt */ if (Server==1) close(sock_server); if (Client==1) close(s1); if (Client==1) close(s2); exit(-1); } } if ((x>=0) && (x<(X_MAX-1)) && (y>=0) && (y<(Y_MAX-1)) && (spiel_laeuft==1)) { /* spieler hat im Spielfeld geklickt ! */ x++; y++; if (event.xbutton.button==Button1) { /* taste 1 im spielfeld geklickt ! */ xx=x+y*X_MAX; if (Feld_Visible[xx]==HIDE) { /* hat auf verstecktes feld getippt */ Feld_Visible[xx]=SHOW; if (Feld_Intern[xx]==0) { Fuelle(x,y); } if ((Feld_Intern[xx]!=BOMB) && (Client==1)) { /* ok, jetzt dem server mitteilen */ long max,t,err,size; struct AnfragePaket Anfrage; Anfrage.Was='W'; strcpy( Anfrage.UserName,User); max=X_MAX*Y_MAX; for (t=0;t<=max;t++) { Anfrage.Feld_Visible[t]=Feld_Visible[t]; Anfrage.Feld_Intern[t]=Feld_Intern[t]; } err=write(s1,&Anfrage,sizeof(struct AnfragePaket)); if (err!=sizeof(struct AnfragePaket)) { printf("\n socket-write fehler \n"); exit(-1); } } if ((Feld_Intern[xx]!=BOMB) && (Server==1)) { /* ok, jetzt den clients mitteilen */ Sende_to_Client(); } if (Feld_Intern[xx]==BOMB) { char text[80]; spiel_laeuft=0; Feld_Intern[xx]=EXBOMB; strcpy(text,"Booooooommmmmm , you lost the game. Please restart the game now."); if (Client==1) strcpy(text,"You lost the game. This game will be restart after one Player is left"); if (Server==1) strcpy(text,"You lost the game. Please DO NOT restart the Game NOW. "); if ((Server==1) && (next==NULL)) strcpy(text,"You lost the game. Please RESTART the Game NOW. "); strcpy(winner,text); XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,4,385,625,400); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,10,395 ,text,strlen(text)); show_end(); } if ((Feld_Intern[xx]!=BOMB)) { /* user hat ein zahlenfeld/space aufgedeckt ! */ int k; k=0; if (Feld_Intern[xx]<=8) HighScore=HighScore+Feld_Intern[xx]; sprintf(text,"Score: %d",HighScore); XSetForeground(display, gc, getcolor("gray",foreground)); XFillRectangle(display,window,gc,75,0,80,55); XSetForeground(display, gc, getcolor("blue",foreground)); XDrawString(display,window,gc,75,30 ,text,strlen(text)); max=X_MAX*Y_MAX; for (t=0;t<=max;t++) { if ((Feld_Visible[t]==HIDE)) k=1; if ((Feld_Intern[t]!=BOMB) && (Feld_Visible[t]==LOCK)) k=1; } if (k==0) {/* spiel beendet und gewonnen ! */ spiel_laeuft=0; strcpy(text,"You win the game. Please RESTART NOW the game "); if (Client==1) strcpy(text,"You win the gam