diff --git a/DFINC.MAK b/DFINC.MAK deleted file mode 100644 index 08c8f9b16..000000000 --- a/DFINC.MAK +++ /dev/null @@ -1,87 +0,0 @@ -#+ -# DFINC.MAK - Visual Fortran application master NMAKE definitions file -# -# This software DFINC.MAK is part of the Visual Fortran kit. -# -# This file should be included at the top of all MAKEFILEs as follows: -# !include -# -# NMAKE Options: -# -# Use the table below to determine the additional options for NMAKE -# Application Information Type Invoke NMAKE -# ---------------------------- ------------ -# For Debugging Info nmake debug=1 -# For linker map nmake linkmap=1 -# For linking with the DLLs nmake linkdll=1 -#- - -# Set the defaults for all the MSVCxx versions - -crtimplib=msvcrt.lib - -!IFNDEF link -link = link -!ENDIF -!IFNDEF libr -libr = lib -!ENDIF - -# Define the compiler verbs. -FOR = df - -# Macros for the compiler -!IFDEF DEBUG -df_debug = /debug:full -lnk_debug = /debug:full /debugtype:both -!ELSE -df_debug = -lnk_debug = /debug:none -!ENDIF - -!IFDEF LINKDLL -df_dll = /call_dll -dflibs = dfordll.lib $(crtimplib) kernel32.lib -!ELSE -df_dll = -dflibs = dfor.lib libc.lib kernel32.lib -!ENDIF - -fflags = $(df_debug) $(df_dll) - -# Macros for the FPP Preprocesor -fppflags = -fpp = $(FOR) $(fflags) /fpp="$(fppflags)" - -# Macros for the linker. -!IFDEF LINKMAP -lflags = /map:$(*B).map $(lflags) -!ELSE -lflags = $(lflags) -!ENDIF - -# SUFFIXES list -.SUFFIXES: .exe .obj .asm .c .bas .cbl .fpp .for .f90 .pas .res .rc - -# Define the inference rules -.obj.exe: - $(FOR) $(df_dll) $(df_debug) /link $(lflags) $(lnk_debug) $*.obj - -.for.exe: - $(FOR) $(fflags) $*.for /link $(lflags) - -.f90.exe: - $(FOR) $(fflags) $*.f90 /link $(lflags) - -.fpp.exe: - $(fpp) $*.fpp /link $(lflags) - -.for.obj: - $(FOR) $(df_debug) $*.for /nolink /object:$@ - -.f90.obj: - $(FOR) $(df_debug) $*.f90 /nolink /object:$@ - -.fpp.obj: - $(FOR) $(df_debug) /nolink /object:$@ /fpp:"$(fppflags)" $*.fpp - diff --git a/GeoDist.f b/GeoDist.f deleted file mode 100644 index e896ded90..000000000 --- a/GeoDist.f +++ /dev/null @@ -1,102 +0,0 @@ - subroutine geodist(Eplat, Eplon, Stlat, Stlon, - + Az, Baz, Dist) - implicit none - real eplat, eplon, stlat, stlon, az, baz, dist - -C JHT: In actual fact, I use the first two arguments for "My Location", -C the second two for "His location"; West longitude is positive. - -c -c -c Taken directly from: -c Thomas, P.D., 1970, Spheroidal geodesics, reference systems, -c & local geometry, U.S. Naval Oceanographic Office SP-138, -c 165 pp. -c -c assumes North Latitude and East Longitude are positive -c -c EpLat, EpLon = End point Lat/Long -c Stlat, Stlon = Start point lat/long -c Az, BAz = direct & reverse azimuith -c Dist = Dist (km); Deg = central angle, discarded -c - - real BOA, F, P1R, P2R, L1R, L2R, DLR, T1R, T2R, TM, - + DTM, STM, CTM, SDTM,CDTM, KL, KK, SDLMR, L, - + CD, DL, SD, T, U, V, D, X, E, Y, A, FF64, TDLPM, - + HAPBR, HAMBR, A1M2, A2M1 - - real AL,BL,D2R,Pi2 - - data AL/6378206.4/ ! Clarke 1866 ellipsoid - data BL/6356583.8/ -c real pi /3.14159265359/ - data D2R/0.01745329251994/ ! degrees to radians conversion factor - data Pi2/6.28318530718/ - - BOA = BL/AL - F = 1.0 - BOA -c convert st/end pts to radians - P1R = Eplat * D2R - P2R = Stlat * D2R - L1R = Eplon * D2R - L2R = StLon * D2R - DLR = L2R - L1R ! DLR = Delta Long in Rads - T1R = ATan(BOA * Tan(P1R)) - T2R = ATan(BOA * Tan(P2R)) - TM = (T1R + T2R) / 2.0 - DTM = (T2R - T1R) / 2.0 - STM = Sin(TM) - CTM = Cos(TM) - SDTM = Sin(DTM) - CDTM = Cos(DTM) - KL = STM * CDTM - KK = SDTM * CTM - SDLMR = Sin(DLR/2.0) - L = SDTM * SDTM + SDLMR * SDLMR * (CDTM * CDTM - STM * STM) - CD = 1.0 - 2.0 * L - DL = ACos(CD) - SD = Sin(DL) - T = DL/SD - U = 2.0 * KL * KL / (1.0 - L) - V = 2.0 * KK * KK / L - D = 4.0 * T * T - X = U + V - E = -2.0 * CD - Y = U - V - A = -D * E - FF64 = F * F / 64.0 - Dist = AL*SD*(T -(F/4.0)*(T*X-Y)+FF64*(X*(A+(T-(A+E) - + /2.0)*X)+Y*(-2.0*D+E*Y)+D*X*Y))/1000.0 - TDLPM = Tan((DLR+(-((E*(4.0-X)+2.0*Y)*((F/2.0)*T+FF64* - + (32.0*T+(A-20.0*T)*X-2.0*(D+2.0)*Y))/4.0)*Tan(DLR)))/2.0) - HAPBR = ATan2(SDTM,(CTM*TDLPM)) - HAMBR = Atan2(CDTM,(STM*TDLPM)) - A1M2 = Pi2 + HAMBR - HAPBR - A2M1 = Pi2 - HAMBR - HAPBR - -1 If ((A1M2 .ge. 0.0) .AND. (A1M2 .lt. Pi2)) GOTO 5 - If (A1M2 .lt. Pi2) GOTO 4 - A1M2 = A1M2 - Pi2 - GOTO 1 -4 A1M2 = A1M2 + Pi2 - GOTO 1 -c -c all of this gens the proper az, baz (forward and back azimuth) -c - -5 If ((A2M1 .ge. 0.0) .AND. (A2M1 .lt. Pi2)) GOTO 9 - If (A2M1 .lt. Pi2) GOTO 8 - A2M1 = A2M1 - Pi2 - GOTO 5 -8 A2M1 = A2M1 + Pi2 - GOTO 5 - -9 Az = A1M2 / D2R - BAZ = A2M1 / D2R -c -c Fix the mirrored coords here. -c - az = 360.0 - az - baz = 360.0 - baz - end diff --git a/KVASD.EXE b/KVASD.EXE deleted file mode 100755 index 618af5b9c..000000000 Binary files a/KVASD.EXE and /dev/null differ diff --git a/KVASD_g95.EXE b/KVASD_g95.EXE deleted file mode 100644 index 81fbbdaac..000000000 Binary files a/KVASD_g95.EXE and /dev/null differ diff --git a/LICENSE.TXT b/LICENSE.TXT deleted file mode 100755 index a979d96ad..000000000 --- a/LICENSE.TXT +++ /dev/null @@ -1,344 +0,0 @@ -The source code for WSJT is made available under the GNU General -Public License. - -##################################################################### - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/LICENSE_WHEATLEY.TXT b/LICENSE_WHEATLEY.TXT new file mode 100644 index 000000000..8b0ce2498 --- /dev/null +++ b/LICENSE_WHEATLEY.TXT @@ -0,0 +1,30 @@ ++ + + This Software is released under the "Simplified BSD License" + + + +Copyright 2010 Moe Wheatley. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY Moe Wheatley ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL Moe Wheatley OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation +are those of the authors and should not be interpreted as representing +official policies, either expressed or implied, of Moe Wheatley. diff --git a/MAP65_Beta_Release.docx b/MAP65_Beta_Release.docx new file mode 100644 index 000000000..acdc02773 Binary files /dev/null and b/MAP65_Beta_Release.docx differ diff --git a/Makefile.CVF b/Makefile.CVF deleted file mode 100644 index 8972f6a86..000000000 --- a/Makefile.CVF +++ /dev/null @@ -1,96 +0,0 @@ -#Makefile for Windows -!include #Some definitions for Compaq Visual Fortran -gcc = cl -FC = df -#To do bounds checking (with useless reports) put "/check:all" in the -# --opt= line below (line 56, more or less ...) -#FFLAGS = /traceback /check:all -FFLAGS = /traceback /fast /nologo /check:all - -all: MAP65.EXE plrs.exe - -OBJS2C = init_rs.o encode_rs.o decode_rs.o jtaudio.o plrr_subs.o - -F2PYONLY = ftn_init ftn_quit audio_init getfile azdist0 astro0 spec - -SRCS2F90 = a2d.f90 astro0.f90 audio_init.f90 azdist0.f90 \ - decode1.f90 ftn_init.f90 ftn_quit.f90 wsjtgen.f90 \ - runqqq.f90 fivehz.f90 flushqqq.f90 \ - rfile.f90 rfile3a.f90 spec.f90 map65a.F90 display.F90 \ - getfile.f90 getfile2.f90 recvpkt.f90 savetf2.F90 \ - symspec.f90 sec_midn.F90 getdphi.f90 thcvf.f90 - -SRCSCOM = datcom.f90 gcom1.f90 gcom2.f90 gcom3.f90 gcom4.f90 spcom.f90 - -SRCS2F77 = indexx.f gen65.f chkmsg.f \ - gentone.f gencwid.f set.f db.f pctile.f sort.f ssort.f \ - avemsg65.f demod64a.f encode65.f extract.f four2a.f getpfx1.f \ - getpfx2.f graycode.f grid2k.f interleave63.f k2grid.f \ - deep65.f morse.f nchar.f packcall.f packgrid.f \ - packmsg.f packtext.f setup65.f unpackcall.f unpackgrid.f \ - unpackmsg.f unpacktext.f astro.f azdist.f coord.f dcoord.f \ - deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \ - moon2.f MoonDop.f sun.f toxyz.f pfxdump.f \ - ccf65.f trimlist.f chkhist.f decode1a.f \ - filbig.f fil6521.f twkfreq.f decode65b.f \ - afc65b.f fchisq.f ccf2.f - -SRCS2C = ptt.c igray.c wrapkarn.c rfile3.c - -MAP65.EXE: Audio.pyd map65.spec - python c:\python23\installer\Build.py map65.spec - -plrs.exe: plrs.f90 sec_midn.F90 plrs_subs_win.c - cl /c /Foplrs_subs.obj plrs_subs_win.c - df /fpp /define:CVF plrs.f90 sec_midn.F90 plrs_subs.obj \ - /link ws2_32.lib - -Audio.pyd: $(OBJS2C) $(SRCS2F90) $(SRCS2F77) $(SRCS2C) $(SRCSCOM) - python f2py.py -c \ - --quiet --"fcompiler=compaqv" \ - --opt="/nologo /traceback /warn:errors /fast /fpp /define:CVF \ - /define:USE_PORTAUDIO" \ - $(OBJS2C) \ - -lwinmm -lws2_32 -lpa -lfftw3single \ - -m Audio \ - only: $(F2PYONLY) : \ - $(SRCS2F90) $(SRCS2F77) $(SRCS2C) - -map65.spec: map65.py astro.py g.py options.py palettes.py smeter.py specjt.py - python c:\python23\installer\makespec.py --icon wsjt.ico \ - --tk --onefile map65.py - -jtaudio.o: jtaudio.c - $(CC) /nologo /c /DWin32 /Fojtaudio.o jtaudio.c - -init_rs.obj: init_rs.c - $(CC) /nologo /c /DBIGSYM=1 init_rs.c - -init_rs.o: init_rs.c - $(CC) /nologo /c /DBIGSYM=1 /Foinit_rs.o init_rs.c - -encode_rs.obj: encode_rs.c - $(CC) /nologo /c /DBIGSYM=1 encode_rs.c - -encode_rs.o: encode_rs.c - $(CC) /nologo /c /DBIGSYM=1 /Foencode_rs.o encode_rs.c - -decode_rs.obj: decode_rs.c - $(CC) /nologo /c /DBIGSYM=1 decode_rs.c - -decode_rs.o: decode_rs.c - $(CC) /nologo /c /DBIGSYM=1 /Ox /Zd /Fodecode_rs.o decode_rs.c - -wrapkarn.obj: wrapkarn.c - $(CC) /nologo /c /DCVF=1 wrapkarn.c - -igray.obj: igray.c - $(CC) /nologo /c /DCVF=1 igray.c - -plrr_subs.o: plrr_subs_win.c - $(CC) /nologo /c plrr_subs_win.c /Foplrr_subs.o - -.PHONY : clean - -clean: - -del *.o *.obj MAP65.EXE Audio.pyd map65.spec diff --git a/Makefile.MinGW b/Makefile.MinGW deleted file mode 100644 index 2eb667a53..000000000 --- a/Makefile.MinGW +++ /dev/null @@ -1,100 +0,0 @@ -#Makefile to compile MAP65.EXE for Windows. -#!include #Some definitions for Compaq Visual Fortran -CC = /mingw/bin/gcc -FC = g95 -CFLAGS = -I. -fPIC -FFLAGS = -Wall -Wno-precision-loss -fbounds-check -fPIC -fno-second-underscore - -.f.o: - ${FC} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.f=.o} $< - -all: MAP65.EXE - -OBJC1 = init_rs.o encode_rs.o decode_rs.o jtaudio.o plrr_subs.o deep65.o - -F2PYONLY = ftn_init ftn_quit audio_init getfile azdist0 astro0 spec - -SRCF90 = a2d.f90 astro0.f90 audio_init.f90 azdist0.f90 \ - decode1.f90 ftn_init.f90 ftn_quit.f90 wsjtgen.f90 \ - runqqq.f90 fivehz.f90 flushqqq.f90 \ - rfile.f90 rfile3a.f90 spec.f90 map65a.f90 display.f90 \ - getfile.f90 getfile2.f90 recvpkt.f90 savetf2.f90 \ - symspec.f90 sec_midn.f90 getdphi.f90 thnix.f90 msgtrim.f90 - -SRCCOM = datcom.f90 gcom1.f90 gcom2.f90 gcom3.f90 gcom4.f90 spcom.f90 - -SRCF77 = indexx.f gen65.f chkmsg.f \ - gentone.f gencwid.f set.f db.f pctile.f sort.f ssort.f \ - avemsg65.f demod64a.f encode65.f extract.f getpfx1.f \ - getpfx2.f graycode.f grid2k.f interleave63.f k2grid.f \ - morse.f nchar.f packcall.f packgrid.f \ - packmsg.f packtext.f setup65.f unpackcall.f unpackgrid.f \ - unpackmsg.f unpacktext.f astro.f azdist.f coord.f dcoord.f \ - deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \ - moon2.f MoonDop.f sun.f toxyz.f pfxdump.f \ - ccf65.f trimlist.f chkhist.f decode1a.f f77_wisdom.f \ - fil6521.f twkfreq.f decode65b.f afc65b.f fchisq.f ccf2.f - -SRC2F77 = four2a.f filbig.f - -SRCS2C = ptt.c igray.c wrapkarn.c cutil.c start_portaudio.c fthread.c - -OBJF77 = ${SRCF77:.f=.o} - -MAP65.EXE: Audio.pyd map65.spec - c:/python25/python c:/python25/pyinstaller-1.3/Build.py map65.spec - -Audio.pyd: $(OBJC1) $(OBJF77) $(SRCF90) $(SRC2F77) $(SRCS2C) $(SRCCOM) Makefile - c:/Python25/python C:/python25/scripts/f2py.py -c -I. \ - --quiet --fcompiler=g95 \ - --opt="-fbounds-check -O0 -cpp" \ - --compiler=mingw32 \ - $(OBJC1) $(OBJF77) libfftw3f_win.a \ - libportaudio.a libpthreadGC2.a -lwinmm -lws2_32 \ - -m Audio \ - only: $(F2PYONLY) : \ - $(SRCF90) $(SRC2F77) $(SRCS2C) - -map65.spec: map65.py astro.py g.py options.py palettes.py smeter.py specjt.py - C:/Python25/python C:/Python25/pyinstaller-1.3/makespec.py \ - --icon wsjt.ico --tk --onefile map65.py - -deep65.o: deep65.f - $(FC) -c -O0 -Wall -fPIC -fno-second-underscore deep65.f - -jtaudio.o: jtaudio.c - $(CC) -c -DWin32 -o jtaudio.o jtaudio.c - -init_rs.obj: init_rs.c - $(CC) -c -DBIGSYM=1 init_rs.c - -init_rs.o: init_rs.c - $(CC) -c -DBIGSYM=1 -o init_rs.o init_rs.c - -encode_rs.obj: encode_rs.c - $(CC) -c -DBIGSYM=1 encode_rs.c - -encode_rs.o: encode_rs.c - $(CC) -c -DBIGSYM=1 -o encode_rs.o encode_rs.c - -decode_rs.obj: decode_rs.c - $(CC) -c -DBIGSYM=1 decode_rs.c - -decode_rs.o: decode_rs.c - $(CC) -c -DBIGSYM=1 -o decode_rs.o decode_rs.c - -wrapkarn.obj: wrapkarn.c - $(CC) -c -DWin32=1 wrapkarn.c - -igray.obj: igray.c - $(CC) -c -DWin32=1 igray.c - -plrr_subs.o: plrr_subs_win.c - $(CC) -c plrr_subs_win.c -o plrr_subs.o - -.PHONY : clean - -clean: - rm -f *.o Audio.pyd map65.spec MAP65.EXE - - diff --git a/Makefile.ifort b/Makefile.ifort deleted file mode 100644 index a53d214dd..000000000 --- a/Makefile.ifort +++ /dev/null @@ -1,112 +0,0 @@ -MV ?= mv -CC ?= gcc -MKDIR ?= mkdir -INSTALL= install -FFLAGS = -O2 -C -threads -reentrancy threaded -traceback -static -LDFLAGS = -L/usr/lib -L/usr/local/lib -LIBS = -lpthread -lportaudio -lsamplerate -lfftw3f -CPPFLAGS = -I/usr/include -I/usr/local/include -CFLAGS = -Wall -O0 -g -PREFIX = /usr/local/ -# Map65 specific C flags -CFLAGS += -DBIGSYM=1 -fPIC -DEFS = -DPACKAGE_NAME=\"map65\" -DPACKAGE_TARNAME=\"map65\" -DPACKAGE_VERSION=\"0.9\" -DPACKAGE_STRING=\"map65\ 0.9\" -DPACKAGE_BUGREPORT=\"\" -DFC_LIB_PATH=\"/opt/g95-install/bin/../lib/gcc-lib/i686-pc-linux-gnu/4.1.3//\" -DFC=\"g95\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_SYSLOG_H=1 -DHAVE_STDDEF_H=1 -DHAVE_LIBGEN_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_WAIT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_LINUX_PPDEV_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DTIME_WITH_SYS_TIME=1 -DSTRING_WITH_STRINGS=1 -DNDEBUG=1 -DHAS_SAMPLERATE_H=1 -DHAS_PORTAUDIO=1 -DHAS_PORTAUDIO_H=1 -DHAS_PORTAUDIO_LIB=1 -DHAS_FFTW3_H=1 -DHAS_FFTW3FLIBS=1 -CFLAGS += ${DEFS} -CPPFLAGS += ${DEFS} -I. - -# MAP65 specific Fortran flags -# gfortran has no -Wno-precission-loss -#FFLAGS += -Wall -fbounds-check -fno-second-underscore -fPIC#FFLAGS += -Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC -#FFLAGS += -Wall -fbounds-check -fno-second-underscore -ffixed-line-length-none -fPIC -#FFLAGS += -Wall -fbounds-check -fno-second-underscore -fPIC -#FFLAGS += -cpp -fno-second-underscore - -all: Audio.so plrs plrr - -# The default rules -.c.o: - ${CC} ${CPPFLAGS} ${CFLAGS} -c -o ${<:.c=.o} $< - -.f.o: - ${FC} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.f=.o} $< - -.F90.o: - ${FC} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.F90=.o} $< - -OS=Linux -FC=ifort -FCV=intel -COMPILER += /opt/g95-install/bin/../lib/gcc-lib/i686-pc-linux-gnu/4.1.3// - -LDFLAGS += -L${COMPILER} - -PYTHON ?= /usr/bin/python -RM ?= /bin/rm -F2PY = /usr/bin/f2py - -### - -OBJS2C = init_rs.o encode_rs.o decode_rs.o plrr_subs.o loc.o deep65.o - -F2PYONLY = ftn_init ftn_quit audio_init getfile azdist0 astro0 spec - -SRCS2F90 = astro0.F90 audio_init.F90 azdist0.f90 \ - decode1.F90 ftn_init.F90 ftn_quit.f90 wsjtgen.F90 \ - runqqq.F90 fivehz.F90 flushqqq.F90 \ - rfile.f90 rfile3a.F90 spec.f90 map65a.F90 display.F90 \ - getfile.F90 getfile2.F90 recvpkt.F90 savetf2.F90 \ - symspec.f90 sec_midn.F90 getdphi.f90 thnix.f90 - -SRCS2F77 = indexx.f gen65.f chkmsg.f \ - gentone.f gencwid.f set.f db.f pctile.f sort.f ssort.f \ - avemsg65.f demod64a.f encode65.f extract.f four2a.f getpfx1.f \ - getpfx2.f graycode.f grid2k.f interleave63.f k2grid.f \ - morse.f nchar.f packcall.f packgrid.f \ - packmsg.f packtext.f setup65.f unpackcall.f unpackgrid.f \ - unpackmsg.f unpacktext.f astro.f azdist.f coord.f dcoord.f \ - deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \ - moon2.f MoonDop.f sun.f toxyz.f pfxdump.f \ - ccf65.f trimlist.f chkhist.f decode1a.f \ - filbig.f fil6521.f twkfreq.f decode65b.f \ - afc65b.f fchisq.f ccf2.f rfile2.f - -OBJS2F77 = ${SRCS2F77:.f=.o} - -SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c fthread.c -OBJS3C = ${SRCS3C:.c=.o} - -AUDIOSRCS = a2d.f90 jtaudio.c start_portaudio.c - -deep65.o: deep65.F - $(FC) -c -O0 -Wall -fno-second-underscore -fPIC deep65.F - -Audio.so: $(OBJS2C) $(OBJS3C) $(OBJS2F77) $(SRCS2F90) $(AUDIOSRCS) - ${F2PY} -c --quiet --opt="-O ${CFLAGS} \ - ${FFLAGS}" $(OBJS2C) $(OBJS2F77) -m Audio \ - --f77exec=${FC} --f90exec=${FC} ${CPPFLAGS} ${LDFLAGS} ${LIBS} \ - only: $(F2PYONLY) \ - : $(SRCS2F90) \ - ${SRCS3C} ${AUDIOSRCS} - - -init_rs_int.o: init_rs.c - $(CC) $(CFLAGS) -c -DBIGSYM=1 -o init_rs_int.o init_rs.c -encode_rs_int.o: encode_rs.c - $(CC) $(CFLAGS) -c -DBIGSYM=1 -o encode_rs_int.o encode_rs.c -decode_rs_int.o: decode_rs.c - $(CC) $(CFLAGS) -c -DBIGSYM=1 -o decode_rs_int.o decode_rs.c - -plrr: plrr.F90 sec_midn.F90 plrr_subs.c cutil.c - $(CC) -c plrs_subs.c cutil.c - $(FC) -o plrr -fno-second-underscore plrr.F90 sec_midn.F90 plrr_subs.o cutil.o - -plrs: plrs.F90 sec_midn.F90 plrs_subs.c cutil.c - $(CC) -c plrs_subs.c cutil.c - $(FC) -o plrs -fno-second-underscore plrs.F90 sec_midn.F90 plrs_subs.o cutil.o - -.PHONY : clean -clean: - ${RM} -f *.o *.pyc *.so *~ map65 map65.spec - -distclean: clean - ${RM} -f config.log config.status Makefile diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 16bdf431b..000000000 --- a/Makefile.in +++ /dev/null @@ -1,112 +0,0 @@ -MV ?= mv -CC ?= @CC@ -MKDIR ?= mkdir -INSTALL= install -FFLAGS = @FFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -PREFIX = @PREFIX@ -# Map65 specific C flags -CFLAGS += -DBIGSYM=1 -fPIC -DEFS = @DEFS@ -CFLAGS += ${DEFS} -CPPFLAGS += ${DEFS} -I. - -# MAP65 specific Fortran flags -# gfortran has no -Wno-precission-loss -#FFLAGS += -Wall -fbounds-check -fno-second-underscore -fPIC#FFLAGS += -Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC -#FFLAGS += -Wall -fbounds-check -fno-second-underscore -ffixed-line-length-none -fPIC -#FFLAGS += -Wall -fbounds-check -fno-second-underscore -fPIC -#FFLAGS += -cpp -fno-second-underscore - -all: Audio.so plrs plrr - -# The default rules -.c.o: - ${CC} ${CPPFLAGS} ${CFLAGS} -c -o ${<:.c=.o} $< - -.f.o: - ${FC} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.f=.o} $< - -.F90.o: - ${FC} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.F90=.o} $< - -OS=@OS@ -FC=@FC@ -FCV=@FCV@ -COMPILER += @FC_LIB_PATH@ - -LDFLAGS += -L${COMPILER} - -PYTHON ?= @PYTHON@ -RM ?= @RM@ -F2PY = @F2PY@ - -### - -OBJS2C = init_rs.o encode_rs.o decode_rs.o plrr_subs.o loc.o deep65.o - -F2PYONLY = ftn_init ftn_quit audio_init getfile azdist0 astro0 spec - -SRCS2F90 = astro0.F90 audio_init.F90 azdist0.f90 \ - decode1.F90 ftn_init.F90 ftn_quit.f90 wsjtgen.F90 \ - runqqq.F90 fivehz.F90 flushqqq.F90 \ - rfile.f90 rfile3a.F90 spec.f90 map65a.F90 display.F90 \ - getfile.F90 getfile2.F90 recvpkt.F90 savetf2.F90 \ - symspec.f90 sec_midn.F90 getdphi.f90 thnix.f90 - -SRCS2F77 = indexx.f gen65.f chkmsg.f \ - gentone.f gencwid.f set.f db.f pctile.f sort.f ssort.f \ - avemsg65.f demod64a.f encode65.f extract.f four2a.f getpfx1.f \ - getpfx2.f graycode.f grid2k.f interleave63.f k2grid.f \ - morse.f nchar.f packcall.f packgrid.f \ - packmsg.f packtext.f setup65.f unpackcall.f unpackgrid.f \ - unpackmsg.f unpacktext.f astro.f azdist.f coord.f dcoord.f \ - deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \ - moon2.f MoonDop.f sun.f toxyz.f pfxdump.f f77_wisdom.f \ - ccf65.f trimlist.f chkhist.f decode1a.f \ - filbig.f fil6521.f twkfreq.f decode65b.f \ - afc65b.f fchisq.f ccf2.f rfile2.f - -OBJS2F77 = ${SRCS2F77:.f=.o} - -SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c fthread.c -OBJS3C = ${SRCS3C:.c=.o} - -AUDIOSRCS = a2d.f90 jtaudio.c start_portaudio.c - -deep65.o: deep65.F - $(FC) -c -O0 -Wall -fno-second-underscore -fPIC deep65.F - -Audio.so: $(OBJS2C) $(OBJS3C) $(OBJS2F77) $(SRCS2F90) $(AUDIOSRCS) - ${F2PY} -c --quiet --noopt --debug \ - --f77flags="${FFLAGS}" --f90flags="${FFLAGS}" \ - $(OBJS2C) $(OBJS2F77) -m Audio \ - --fcompiler=${FCV} --f77exec=${FC} --f90exec=${FC} \ - ${CPPFLAGS} ${LDFLAGS} ${LIBS} \ - only: $(F2PYONLY) : $(SRCS2F90) \ - ${SRCS3C} ${AUDIOSRCS} - -init_rs_int.o: init_rs.c - $(CC) $(CFLAGS) -c -DBIGSYM=1 -o init_rs_int.o init_rs.c -encode_rs_int.o: encode_rs.c - $(CC) $(CFLAGS) -c -DBIGSYM=1 -o encode_rs_int.o encode_rs.c -decode_rs_int.o: decode_rs.c - $(CC) $(CFLAGS) -c -DBIGSYM=1 -o decode_rs_int.o decode_rs.c - -plrr: plrr.F90 sec_midn.F90 plrr_subs.c cutil.c - $(CC) -c plrs_subs.c cutil.c - $(FC) -o plrr -fno-second-underscore plrr.F90 sec_midn.F90 plrr_subs.o cutil.o - -plrs: plrs.F90 sec_midn.F90 plrs_subs.c cutil.c - $(CC) -c plrs_subs.c cutil.c - $(FC) -o plrs -fno-second-underscore plrs.F90 sec_midn.F90 plrs_subs.o cutil.o - -.PHONY : clean -clean: - ${RM} -f *.o *.pyc *.so *~ map65 map65.spec - -distclean: clean - ${RM} -f config.log config.status Makefile diff --git a/Makefile.linux.g95 b/Makefile.linux.g95 deleted file mode 100644 index 256ef3356..000000000 --- a/Makefile.linux.g95 +++ /dev/null @@ -1,121 +0,0 @@ -CC ?= gcc -FFLAGS = -g -O2 -LDFLAGS = -L/usr/local/lib -lpthread -lasound -CPPFLAGS = -I/usr/local/include -I/usr/include/alsa -CFLAGS = -Wall -O0 -g -Wall -O0 -g -# WSJT specific C flags -CFLAGS += -DBIGSYM=1 -DEFS = -DPACKAGE_NAME=\"wsjt\" -DPACKAGE_TARNAME=\"wsjt\" -DPACKAGE_VERSION=\"5.9.2\" -DPACKAGE_STRING=\"wsjt\ 5.9.2\" -DPACKAGE_BUGREPORT=\"\" -DG95_LIB_PATH=\"/u/g95/g95-install/bin/../lib/gcc-lib/i686-pc-linux-gnu/4.0.1//\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_SYSLOG_H=1 -DHAVE_STDDEF_H=1 -DHAVE_LIBGEN_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_WAIT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_LINUX_PPDEV_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DTIME_WITH_SYS_TIME=1 -DSTRING_WITH_STRINGS=1 -DSIZEOF_INT64_T=8 -DSIZEOF_LONG_LONG=8 -DNDEBUG=1 -DPREFIX=\"/usr/local/\" -DUSE_SERIAL=1 -DUSE_ALSA=1 -DHAS_ASOUNDLIB_H=1 -DHAS_SOUNDCARD_H=1 -DHAS_SAMPLERATE_H=1 -CFLAGS += ${DEFS} -CPPFLAGS += ${DEFS} - -# WSJT specific Fortran flags -#FFLAGS += -Wall -fbounds-check -fno-second-underscore -ffixed-line-length-none -FFLAGS += -Wall -fbounds-check -fno-second-underscore -#FFLAGS += -cpp -fno-second-underscore -# The default rules -.c.o: - ${CC} ${CPPFLAGS} ${CFLAGS} -c -o ${<:.c=.o} $< - -.f.o: - ${G95} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.f=.o} $< - -.F90.o: - ${G95} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.F90=.o} $< - -OS=Linux -G95=/usr/X11R6/bin/g95 -COMPILER=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6// -#COMPILER=/u/g95/g95-install/bin/../lib/gcc-lib/i686-pc-linux-gnu/4.0.1// -FC=/usr/X11R6/bin/g95 - -LDFLAGS += -L${COMPILER} -LDFLAGS += -lg2c - -PYTHON ?= /usr/X11R6/bin/python -RM ?= /usr/X11R6/bin/rm -F2PY = /usr/X11R6/bin/f2py - - -OBJS1 = JT65code.o nchar.o grid2deg.o packmsg.o packtext.o \ - packcall.o packgrid.o unpackmsg.o unpacktext.o unpackcall.o \ - unpackgrid.o deg2grid.o packdxcc.o chkmsg.o getpfx1.o \ - getpfx2.o k2grid.o grid2k.o interleave63.o graycode.o set.o \ - igray.o init_rs_int.o encode_rs_int.o decode_rs_int.o \ - wrapkarn.o - -F2PYONLY = ftn_init ftn_quit audio_init spec getfile azdist0 astro0 - -SRCS2F90 = abc441.F90 astro0.F90 audio_init.F90 azdist0.f90 \ - blanker.f90 decode1.F90 decode2.f90 decode3.F90 ftn_init.F90 \ - ftn_quit.f90 get_fname.F90 getfile.F90 horizspec.f90 hscroll.f90 \ - i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.F90 spec.f90 \ - wsjtgen.F90 runqqq.F90 fivehz.F90 -OBJS2F90 = ${SRCS2F90:.f90=.o} - -SRCS2F77 = wsjt1.f astro.f azdist.f coord.f dcoord.f deg2grid.f \ - dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f moon2.f \ - MoonDop.f sun.f toxyz.f pfxdump.f \ - avesp2.f bzap.f spec441.f spec2d.f mtdecode.f stdecode.f \ - indexx.f s2shape.f flat2.f gen65.f chkmsg.f gen6m.f gentone.f \ - syncf0.f syncf1.f synct.f decode6m.f avemsg6m.f \ - set.f flatten.f db.f pctile.f sort.f ssort.f ps.f smooth.f \ - ping.f longx.f peakup.f sync.f detect.f avemsg65.f decode65.f \ - demod64a.f encode65.f extract.f flat1.f four2.f rfile2.f \ - gencw.f getpfx1.f getpfx2.f getsnr.f graycode.f grid2k.f \ - interleave63.f k2grid.f limit.f lpf1.f deep65.f morse.f \ - nchar.f packcall.f packgrid.f packmsg.f packtext.f setup65.f \ - short65.f slope.f spec2d65.f sync65.f unpackcall.f \ - unpackgrid.f unpackmsg.f unpacktext.f xcor.f xfft.f xfft2.f wsjt65.f -OBJS2F77 = ${SRCS2F77:.f=.o} - -SRCS2C = init_rs.c encode_rs.c decode_rs.c -OBJS2C = ${SRCS2C:.c=.o} - -# ok, so far for now -# Windows start_alsa.c will be a2d.f90 jtaudio.c since it uses portaudio -# for *nix start_alsa.c will also be a2d.f90, jtaudio.c -# and start_portaudio.c for systems using portaudio -# for *nix start_alsa.c will be start_alsa.c for alsa -# for *nix start_alsa.c will be start_oss.c for oss -# -# ptt_unix.c vs. ptt.c I'll sort out later. -# ditto for cutil.c (only used on *nix) -# --db -# jtaudio.c/start_threads.c mess will have to be sorted out later -# to minimise #ifdef's -# --db -# and mostly sorted -# --db -# -SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c -OBJS3C = ${SRCS3C:.c=.o} -AUDIOSRCS = start_alsa.c - -all: wsjt6 -JT65code: $(OBJS1) - $(FC) -o JT65code $(OBJS1) - -wsjt6: Audio.so #wsjt.spec -# ${PYTHON} c:\python23\installer\Build.py wsjt.spec -# ${RM} wsjt6 - -# -# -Audio.so: $(OBJS2C) $(OBJS3C) $(OBJS2F77) $(SRCS2F90) $(AUDIOSRCS) - ${F2PY} -c --quiet --opt="-O -D${CFLAGS} \ - -fno-second-underscore" $(OBJS2C) $(OBJS2F77) -m Audio \ - --f77exec=${G95} --f90exec=${G95} ${CPPFLAGS} ${LDFLAGS} \ - only: $(F2PYONLY) \ - : $(SRCS2F90) \ - ${SRCS3C} ${AUDIOSRCS} - -wsjt.spec: wsjt.py astro.py g.py options.py palettes.py smeter.py specjt.py -# ${PYTHON} c:\python23\installer\makespec.py --icon wsjt.ico \ -# --tk --onefile wsjt.py - - -.PHONY : clean -clean: - ${RM} -f *.o *.so *~ JT65code wsjt6 - diff --git a/Makefile.linux.gfortran b/Makefile.linux.gfortran deleted file mode 100644 index bd9608559..000000000 --- a/Makefile.linux.gfortran +++ /dev/null @@ -1,120 +0,0 @@ -CC ?= gcc -FFLAGS = -g -O2 -fPIC -LDFLAGS = -L/usr/local/lib -lpthread -lasound -CPPFLAGS = -I/usr/local/include -I/usr/include/alsa -I. -CFLAGS = -Wall -O0 -g -Wall -O0 -g -fPIC -# WSJT specific C flags -CFLAGS += -DBIGSYM=1 -DEFS = -DPACKAGE_NAME=\"wsjt\" -DPACKAGE_TARNAME=\"wsjt\" -DPACKAGE_VERSION=\"5.9.2\" -DPACKAGE_STRING=\"wsjt\ 5.9.2\" -DPACKAGE_BUGREPORT=\"\" -DG95_LIB_PATH=\"/usr/lib/gcc/x86_64-linux-gnu/4.0.3/\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_SYSLOG_H=1 -DHAVE_STDDEF_H=1 -DHAVE_LIBGEN_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_WAIT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_LINUX_PPDEV_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DTIME_WITH_SYS_TIME=1 -DSTRING_WITH_STRINGS=1 -DSIZEOF_INT64_T=8 -DSIZEOF_LONG_LONG=8 -DNDEBUG=1 -DPREFIX=\"/usr/local/\" -DUSE_SERIAL=1 -DUSE_ALSA=1 -DHAS_ASOUNDLIB_H=1 -DHAS_SOUNDCARD_H=1 -CFLAGS += ${DEFS} -CPPFLAGS += ${DEFS} - -# WSJT specific Fortran flags -FFLAGS += -Wall -fbounds-check -fno-second-underscore -ffixed-line-length-none -#FFLAGS += -Wall -fbounds-check -fno-second-underscore -#FFLAGS += -cpp -fno-second-underscore -# The default rules -.c.o: - ${CC} ${CPPFLAGS} ${CFLAGS} -c -o ${<:.c=.o} $< - -.f.o: - ${G95} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.f=.o} $< - -.F90.o: - ${G95} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.F90=.o} $< - -OS=Linux -G95=/usr/bin/g95 -COMPILER=/usr/lib/gcc/x86_64-linux-gnu/4.0.3/ -FC=/usr/bin/g95 - -LDFLAGS += -L${COMPILER} -LDFLAGS += -lg2c - -PYTHON ?= /usr/bin/python -RM ?= /bin/rm -F2PY = /usr/bin/f2py - - -OBJS1 = JT65code.o nchar.o grid2deg.o packmsg.o packtext.o \ - packcall.o packgrid.o unpackmsg.o unpacktext.o unpackcall.o \ - unpackgrid.o deg2grid.o packdxcc.o chkmsg.o getpfx1.o \ - getpfx2.o k2grid.o grid2k.o interleave63.o graycode.o set.o \ - igray.o init_rs_int.o encode_rs_int.o decode_rs_int.o \ - wrapkarn.o - -F2PYONLY = ftn_init ftn_quit audio_init spec getfile azdist0 astro0 - -SRCS2F90 = abc441.F90 astro0.F90 audio_init.F90 azdist0.f90 \ - blanker.f90 decode1.F90 decode2.f90 decode3.F90 ftn_init.F90 \ - ftn_quit.f90 get_fname.F90 getfile.F90 horizspec.f90 hscroll.f90 \ - i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.F90 spec.f90 \ - wsjtgen.F90 runqqq.F90 fivehz.F90 -OBJS2F90 = ${SRCS2F90:.f90=.o} - -SRCS2F77 = wsjt1.f astro.f azdist.f coord.f dcoord.f deg2grid.f \ - dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f moon2.f \ - MoonDop.f sun.f toxyz.f pfxdump.f \ - avesp2.f bzap.f spec441.f spec2d.f mtdecode.f stdecode.f \ - indexx.f s2shape.f flat2.f gen65.f chkmsg.f gen6m.f gentone.f \ - syncf0.f syncf1.f synct.f decode6m.f avemsg6m.f \ - set.f flatten.f db.f pctile.f sort.f ssort.f ps.f smooth.f \ - ping.f longx.f peakup.f sync.f detect.f avemsg65.f decode65.f \ - demod64a.f encode65.f extract.f flat1.f four2.f rfile2.f \ - gencw.f getpfx1.f getpfx2.f getsnr.f graycode.f grid2k.f \ - interleave63.f k2grid.f limit.f lpf1.f deep65.f morse.f \ - nchar.f packcall.f packgrid.f packmsg.f packtext.f setup65.f \ - short65.f slope.f spec2d65.f sync65.f unpackcall.f \ - unpackgrid.f unpackmsg.f unpacktext.f xcor.f xfft.f xfft2.f wsjt65.f -OBJS2F77 = ${SRCS2F77:.f=.o} - -SRCS2C = init_rs.c encode_rs.c decode_rs.c -OBJS2C = ${SRCS2C:.c=.o} - -# ok, so far for now -# Windows start_alsa.c will be a2d.f90 jtaudio.c since it uses portaudio -# for *nix start_alsa.c will also be a2d.f90, jtaudio.c -# and start_portaudio.c for systems using portaudio -# for *nix start_alsa.c will be start_alsa.c for alsa -# for *nix start_alsa.c will be start_oss.c for oss -# -# ptt_unix.c vs. ptt.c I'll sort out later. -# ditto for cutil.c (only used on *nix) -# --db -# jtaudio.c/start_threads.c mess will have to be sorted out later -# to minimise #ifdef's -# --db -# and mostly sorted -# --db -# -SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c -OBJS3C = ${SRCS3C:.c=.o} -AUDIOSRCS = start_alsa.c - -all: wsjt6 -JT65code: $(OBJS1) - $(FC) -o JT65code $(OBJS1) - -wsjt6: Audio.so #wsjt.spec -# ${PYTHON} c:\python23\installer\Build.py wsjt.spec -# ${RM} wsjt6 - -# -# -Audio.so: $(OBJS2C) $(OBJS3C) $(OBJS2F77) $(SRCS2F90) $(AUDIOSRCS) - ${F2PY} -c --opt="-O ${CFLAGS} -fPIC \ - -fno-second-underscore" $(OBJS2C) $(OBJS2F77) -m Audio \ - --f77exec=${G95} --f90exec=${G95} ${CPPFLAGS} ${LDFLAGS} \ - only: $(F2PYONLY) \ - : $(SRCS2F90) \ - ${SRCS3C} ${AUDIOSRCS} - -wsjt.spec: wsjt.py astro.py g.py options.py palettes.py smeter.py specjt.py -# ${PYTHON} c:\python23\installer\makespec.py --icon wsjt.ico \ -# --tk --onefile wsjt.py - - -.PHONY : clean -clean: - ${RM} -f *.o *.so *~ JT65code wsjt6 - diff --git a/Pmw.py b/Pmw.py deleted file mode 100644 index dfc3f7334..000000000 --- a/Pmw.py +++ /dev/null @@ -1,9233 +0,0 @@ - -import PmwColor -Color = PmwColor -del PmwColor - -import PmwBlt -Blt = PmwBlt -del PmwBlt - - -### Loader functions: - -_VERSION = '1.2' - -def setversion(version): - if version != _VERSION: - raise ValueError, 'Dynamic versioning not available' - -def setalphaversions(*alpha_versions): - if alpha_versions != (): - raise ValueError, 'Dynamic versioning not available' - -def version(alpha = 0): - if alpha: - return () - else: - return _VERSION - -def installedversions(alpha = 0): - if alpha: - return () - else: - return (_VERSION,) - - -###################################################################### -### File: PmwBase.py -# Pmw megawidget base classes. - -# This module provides a foundation for building megawidgets. It -# contains the MegaArchetype class which manages component widgets and -# configuration options. Also provided are the MegaToplevel and -# MegaWidget classes, derived from the MegaArchetype class. The -# MegaToplevel class contains a Tkinter Toplevel widget to act as the -# container of the megawidget. This is used as the base class of all -# megawidgets that are contained in their own top level window, such -# as a Dialog window. The MegaWidget class contains a Tkinter Frame -# to act as the container of the megawidget. This is used as the base -# class of all other megawidgets, such as a ComboBox or ButtonBox. -# -# Megawidgets are built by creating a class that inherits from either -# the MegaToplevel or MegaWidget class. - -import os -import string -import sys -import traceback -import types -import Tkinter - -# Special values used in index() methods of several megawidgets. -END = ['end'] -SELECT = ['select'] -DEFAULT = ['default'] - -# Constant used to indicate that an option can only be set by a call -# to the constructor. -INITOPT = ['initopt'] -_DEFAULT_OPTION_VALUE = ['default_option_value'] -_useTkOptionDb = 0 - -# Symbolic constants for the indexes into an optionInfo list. -_OPT_DEFAULT = 0 -_OPT_VALUE = 1 -_OPT_FUNCTION = 2 - -# Stacks - -_busyStack = [] - # Stack which tracks nested calls to show/hidebusycursor (called - # either directly or from activate()/deactivate()). Each element - # is a dictionary containing: - # 'newBusyWindows' : List of windows which had busy_hold called - # on them during a call to showbusycursor(). - # The corresponding call to hidebusycursor() - # will call busy_release on these windows. - # 'busyFocus' : The blt _Busy window which showbusycursor() - # set the focus to. - # 'previousFocus' : The focus as it was when showbusycursor() - # was called. The corresponding call to - # hidebusycursor() will restore this focus if - # the focus has not been changed from busyFocus. - -_grabStack = [] - # Stack of grabbed windows. It tracks calls to push/popgrab() - # (called either directly or from activate()/deactivate()). The - # window on the top of the stack is the window currently with the - # grab. Each element is a dictionary containing: - # 'grabWindow' : The window grabbed by pushgrab(). The - # corresponding call to popgrab() will release - # the grab on this window and restore the grab - # on the next window in the stack (if there is one). - # 'globalMode' : True if the grabWindow was grabbed with a - # global grab, false if the grab was local - # and 'nograb' if no grab was performed. - # 'previousFocus' : The focus as it was when pushgrab() - # was called. The corresponding call to - # popgrab() will restore this focus. - # 'deactivateFunction' : - # The function to call (usually grabWindow.deactivate) if - # popgrab() is called (usually from a deactivate() method) - # on a window which is not at the top of the stack (that is, - # does not have the grab or focus). For example, if a modal - # dialog is deleted by the window manager or deactivated by - # a timer. In this case, all dialogs above and including - # this one are deactivated, starting at the top of the - # stack. - - # Note that when dealing with focus windows, the name of the Tk - # widget is used, since it may be the '_Busy' window, which has no - # python instance associated with it. - -#============================================================================= - -# Functions used to forward methods from a class to a component. - -# Fill in a flattened method resolution dictionary for a class (attributes are -# filtered out). Flattening honours the MI method resolution rules -# (depth-first search of bases in order). The dictionary has method names -# for keys and functions for values. -def __methodDict(cls, dict): - - # the strategy is to traverse the class in the _reverse_ of the normal - # order, and overwrite any duplicates. - baseList = list(cls.__bases__) - baseList.reverse() - - # do bases in reverse order, so first base overrides last base - for super in baseList: - __methodDict(super, dict) - - # do my methods last to override base classes - for key, value in cls.__dict__.items(): - # ignore class attributes - if type(value) == types.FunctionType: - dict[key] = value - -def __methods(cls): - # Return all method names for a class. - - # Return all method names for a class (attributes are filtered - # out). Base classes are searched recursively. - - dict = {} - __methodDict(cls, dict) - return dict.keys() - -# Function body to resolve a forwarding given the target method name and the -# attribute name. The resulting lambda requires only self, but will forward -# any other parameters. -__stringBody = ( - 'def %(method)s(this, *args, **kw): return ' + - 'apply(this.%(attribute)s.%(method)s, args, kw)') - -# Get a unique id -__counter = 0 -def __unique(): - global __counter - __counter = __counter + 1 - return str(__counter) - -# Function body to resolve a forwarding given the target method name and the -# index of the resolution function. The resulting lambda requires only self, -# but will forward any other parameters. The target instance is identified -# by invoking the resolution function. -__funcBody = ( - 'def %(method)s(this, *args, **kw): return ' + - 'apply(this.%(forwardFunc)s().%(method)s, args, kw)') - -def forwardmethods(fromClass, toClass, toPart, exclude = ()): - # Forward all methods from one class to another. - - # Forwarders will be created in fromClass to forward method - # invocations to toClass. The methods to be forwarded are - # identified by flattening the interface of toClass, and excluding - # methods identified in the exclude list. Methods already defined - # in fromClass, or special methods with one or more leading or - # trailing underscores will not be forwarded. - - # For a given object of class fromClass, the corresponding toClass - # object is identified using toPart. This can either be a String - # denoting an attribute of fromClass objects, or a function taking - # a fromClass object and returning a toClass object. - - # Example: - # class MyClass: - # ... - # def __init__(self): - # ... - # self.__target = TargetClass() - # ... - # def findtarget(self): - # return self.__target - # forwardmethods(MyClass, TargetClass, '__target', ['dangerous1', 'dangerous2']) - # # ...or... - # forwardmethods(MyClass, TargetClass, MyClass.findtarget, - # ['dangerous1', 'dangerous2']) - - # In both cases, all TargetClass methods will be forwarded from - # MyClass except for dangerous1, dangerous2, special methods like - # __str__, and pre-existing methods like findtarget. - - - # Allow an attribute name (String) or a function to determine the instance - if type(toPart) != types.StringType: - - # check that it is something like a function - if callable(toPart): - - # If a method is passed, use the function within it - if hasattr(toPart, 'im_func'): - toPart = toPart.im_func - - # After this is set up, forwarders in this class will use - # the forwarding function. The forwarding function name is - # guaranteed to be unique, so that it can't be hidden by subclasses - forwardName = '__fwdfunc__' + __unique() - fromClass.__dict__[forwardName] = toPart - - # It's not a valid type - else: - raise TypeError, 'toPart must be attribute name, function or method' - - # get the full set of candidate methods - dict = {} - __methodDict(toClass, dict) - - # discard special methods - for ex in dict.keys(): - if ex[:1] == '_' or ex[-1:] == '_': - del dict[ex] - # discard dangerous methods supplied by the caller - for ex in exclude: - if dict.has_key(ex): - del dict[ex] - # discard methods already defined in fromClass - for ex in __methods(fromClass): - if dict.has_key(ex): - del dict[ex] - - for method, func in dict.items(): - d = {'method': method, 'func': func} - if type(toPart) == types.StringType: - execString = \ - __stringBody % {'method' : method, 'attribute' : toPart} - else: - execString = \ - __funcBody % {'forwardFunc' : forwardName, 'method' : method} - - exec execString in d - - # this creates a method - fromClass.__dict__[method] = d[method] - -#============================================================================= - -def setgeometryanddeiconify(window, geom): - # To avoid flashes on X and to position the window correctly on NT - # (caused by Tk bugs). - - if os.name == 'nt' or \ - (os.name == 'posix' and sys.platform[:6] == 'cygwin'): - # Require overrideredirect trick to stop window frame - # appearing momentarily. - redirect = window.overrideredirect() - if not redirect: - window.overrideredirect(1) - window.deiconify() - if geom is not None: - window.geometry(geom) - # Call update_idletasks to ensure NT moves the window to the - # correct position it is raised. - window.update_idletasks() - window.tkraise() - if not redirect: - window.overrideredirect(0) - else: - if geom is not None: - window.geometry(geom) - - # Problem!? Which way around should the following two calls - # go? If deiconify() is called first then I get complaints - # from people using the enlightenment or sawfish window - # managers that when a dialog is activated it takes about 2 - # seconds for the contents of the window to appear. But if - # tkraise() is called first then I get complaints from people - # using the twm window manager that when a dialog is activated - # it appears in the top right corner of the screen and also - # takes about 2 seconds to appear. - - #window.tkraise() - # Call update_idletasks to ensure certain window managers (eg: - # enlightenment and sawfish) do not cause Tk to delay for - # about two seconds before displaying window. - #window.update_idletasks() - #window.deiconify() - - window.deiconify() - if window.overrideredirect(): - # The window is not under the control of the window manager - # and so we need to raise it ourselves. - window.tkraise() - -#============================================================================= - -class MegaArchetype: - # Megawidget abstract root class. - - # This class provides methods which are inherited by classes - # implementing useful bases (this class doesn't provide a - # container widget inside which the megawidget can be built). - - def __init__(self, parent = None, hullClass = None): - - # Mapping from each megawidget option to a list of information - # about the option - # - default value - # - current value - # - function to call when the option is initialised in the - # call to initialiseoptions() in the constructor or - # modified via configure(). If this is INITOPT, the - # option is an initialisation option (an option that can - # be set by the call to the constructor but can not be - # used with configure). - # This mapping is not initialised here, but in the call to - # defineoptions() which precedes construction of this base class. - # - # self._optionInfo = {} - - # Mapping from each component name to a tuple of information - # about the component. - # - component widget instance - # - configure function of widget instance - # - the class of the widget (Frame, EntryField, etc) - # - cget function of widget instance - # - the name of the component group of this component, if any - self.__componentInfo = {} - - # Mapping from alias names to the names of components or - # sub-components. - self.__componentAliases = {} - - # Contains information about the keywords provided to the - # constructor. It is a mapping from the keyword to a tuple - # containing: - # - value of keyword - # - a boolean indicating if the keyword has been used. - # A keyword is used if, during the construction of a megawidget, - # - it is defined in a call to defineoptions() or addoptions(), or - # - it references, by name, a component of the megawidget, or - # - it references, by group, at least one component - # At the end of megawidget construction, a call is made to - # initialiseoptions() which reports an error if there are - # unused options given to the constructor. - # - # After megawidget construction, the dictionary contains - # keywords which refer to a dynamic component group, so that - # these components can be created after megawidget - # construction and still use the group options given to the - # constructor. - # - # self._constructorKeywords = {} - - # List of dynamic component groups. If a group is included in - # this list, then it not an error if a keyword argument for - # the group is given to the constructor or to configure(), but - # no components with this group have been created. - # self._dynamicGroups = () - - if hullClass is None: - self._hull = None - else: - if parent is None: - parent = Tkinter._default_root - - # Create the hull. - self._hull = self.createcomponent('hull', - (), None, - hullClass, (parent,)) - _hullToMegaWidget[self._hull] = self - - if _useTkOptionDb: - # Now that a widget has been created, query the Tk - # option database to get the default values for the - # options which have not been set in the call to the - # constructor. This assumes that defineoptions() is - # called before the __init__(). - option_get = self.option_get - _VALUE = _OPT_VALUE - _DEFAULT = _OPT_DEFAULT - for name, info in self._optionInfo.items(): - value = info[_VALUE] - if value is _DEFAULT_OPTION_VALUE: - resourceClass = string.upper(name[0]) + name[1:] - value = option_get(name, resourceClass) - if value != '': - try: - # Convert the string to int/float/tuple, etc - value = eval(value, {'__builtins__': {}}) - except: - pass - info[_VALUE] = value - else: - info[_VALUE] = info[_DEFAULT] - - def destroy(self): - # Clean up optionInfo in case it contains circular references - # in the function field, such as self._settitle in class - # MegaToplevel. - - self._optionInfo = {} - if self._hull is not None: - del _hullToMegaWidget[self._hull] - self._hull.destroy() - - #====================================================================== - # Methods used (mainly) during the construction of the megawidget. - - def defineoptions(self, keywords, optionDefs, dynamicGroups = ()): - # Create options, providing the default value and the method - # to call when the value is changed. If any option created by - # base classes has the same name as one in , the - # base class's value and function will be overriden. - - # This should be called before the constructor of the base - # class, so that default values defined in the derived class - # override those in the base class. - - if not hasattr(self, '_constructorKeywords'): - # First time defineoptions has been called. - tmp = {} - for option, value in keywords.items(): - tmp[option] = [value, 0] - self._constructorKeywords = tmp - self._optionInfo = {} - self._initialiseoptions_counter = 0 - self._initialiseoptions_counter = self._initialiseoptions_counter + 1 - - if not hasattr(self, '_dynamicGroups'): - self._dynamicGroups = () - self._dynamicGroups = self._dynamicGroups + tuple(dynamicGroups) - self.addoptions(optionDefs) - - def addoptions(self, optionDefs): - # Add additional options, providing the default value and the - # method to call when the value is changed. See - # "defineoptions" for more details - - # optimisations: - optionInfo = self._optionInfo - optionInfo_has_key = optionInfo.has_key - keywords = self._constructorKeywords - keywords_has_key = keywords.has_key - FUNCTION = _OPT_FUNCTION - - for name, default, function in optionDefs: - if '_' not in name: - # The option will already exist if it has been defined - # in a derived class. In this case, do not override the - # default value of the option or the callback function - # if it is not None. - if not optionInfo_has_key(name): - if keywords_has_key(name): - value = keywords[name][0] - optionInfo[name] = [default, value, function] - del keywords[name] - else: - if _useTkOptionDb: - optionInfo[name] = \ - [default, _DEFAULT_OPTION_VALUE, function] - else: - optionInfo[name] = [default, default, function] - elif optionInfo[name][FUNCTION] is None: - optionInfo[name][FUNCTION] = function - else: - # This option is of the form "component_option". If this is - # not already defined in self._constructorKeywords add it. - # This allows a derived class to override the default value - # of an option of a component of a base class. - if not keywords_has_key(name): - keywords[name] = [default, 0] - - def createcomponent(self, componentName, componentAliases, - componentGroup, widgetClass, *widgetArgs, **kw): - # Create a component (during construction or later). - - if self.__componentInfo.has_key(componentName): - raise ValueError, 'Component "%s" already exists' % componentName - - if '_' in componentName: - raise ValueError, \ - 'Component name "%s" must not contain "_"' % componentName - - if hasattr(self, '_constructorKeywords'): - keywords = self._constructorKeywords - else: - keywords = {} - for alias, component in componentAliases: - # Create aliases to the component and its sub-components. - index = string.find(component, '_') - if index < 0: - self.__componentAliases[alias] = (component, None) - else: - mainComponent = component[:index] - subComponent = component[(index + 1):] - self.__componentAliases[alias] = (mainComponent, subComponent) - - # Remove aliases from the constructor keyword arguments by - # replacing any keyword arguments that begin with *alias* - # with corresponding keys beginning with *component*. - - alias = alias + '_' - aliasLen = len(alias) - for option in keywords.keys(): - if len(option) > aliasLen and option[:aliasLen] == alias: - newkey = component + '_' + option[aliasLen:] - keywords[newkey] = keywords[option] - del keywords[option] - - componentPrefix = componentName + '_' - nameLen = len(componentPrefix) - for option in keywords.keys(): - if len(option) > nameLen and option[:nameLen] == componentPrefix: - # The keyword argument refers to this component, so add - # this to the options to use when constructing the widget. - kw[option[nameLen:]] = keywords[option][0] - del keywords[option] - else: - # Check if this keyword argument refers to the group - # of this component. If so, add this to the options - # to use when constructing the widget. Mark the - # keyword argument as being used, but do not remove it - # since it may be required when creating another - # component. - index = string.find(option, '_') - if index >= 0 and componentGroup == option[:index]: - rest = option[(index + 1):] - kw[rest] = keywords[option][0] - keywords[option][1] = 1 - - if kw.has_key('pyclass'): - widgetClass = kw['pyclass'] - del kw['pyclass'] - if widgetClass is None: - return None - if len(widgetArgs) == 1 and type(widgetArgs[0]) == types.TupleType: - # Arguments to the constructor can be specified as either - # multiple trailing arguments to createcomponent() or as a - # single tuple argument. - widgetArgs = widgetArgs[0] - widget = apply(widgetClass, widgetArgs, kw) - componentClass = widget.__class__.__name__ - self.__componentInfo[componentName] = (widget, widget.configure, - componentClass, widget.cget, componentGroup) - - return widget - - def destroycomponent(self, name): - # Remove a megawidget component. - - # This command is for use by megawidget designers to destroy a - # megawidget component. - - self.__componentInfo[name][0].destroy() - del self.__componentInfo[name] - - def createlabel(self, parent, childCols = 1, childRows = 1): - - labelpos = self['labelpos'] - labelmargin = self['labelmargin'] - if labelpos is None: - return - - label = self.createcomponent('label', - (), None, - Tkinter.Label, (parent,)) - - if labelpos[0] in 'ns': - # vertical layout - if labelpos[0] == 'n': - row = 0 - margin = 1 - else: - row = childRows + 3 - margin = row - 1 - label.grid(column=2, row=row, columnspan=childCols, sticky=labelpos) - parent.grid_rowconfigure(margin, minsize=labelmargin) - else: - # horizontal layout - if labelpos[0] == 'w': - col = 0 - margin = 1 - else: - col = childCols + 3 - margin = col - 1 - label.grid(column=col, row=2, rowspan=childRows, sticky=labelpos) - parent.grid_columnconfigure(margin, minsize=labelmargin) - - def initialiseoptions(self, dummy = None): - self._initialiseoptions_counter = self._initialiseoptions_counter - 1 - if self._initialiseoptions_counter == 0: - unusedOptions = [] - keywords = self._constructorKeywords - for name in keywords.keys(): - used = keywords[name][1] - if not used: - # This keyword argument has not been used. If it - # does not refer to a dynamic group, mark it as - # unused. - index = string.find(name, '_') - if index < 0 or name[:index] not in self._dynamicGroups: - unusedOptions.append(name) - if len(unusedOptions) > 0: - if len(unusedOptions) == 1: - text = 'Unknown option "' - else: - text = 'Unknown options "' - raise KeyError, text + string.join(unusedOptions, ', ') + \ - '" for ' + self.__class__.__name__ - - # Call the configuration callback function for every option. - FUNCTION = _OPT_FUNCTION - for info in self._optionInfo.values(): - func = info[FUNCTION] - if func is not None and func is not INITOPT: - func() - - #====================================================================== - # Method used to configure the megawidget. - - def configure(self, option=None, **kw): - # Query or configure the megawidget options. - # - # If not empty, *kw* is a dictionary giving new - # values for some of the options of this megawidget or its - # components. For options defined for this megawidget, set - # the value of the option to the new value and call the - # configuration callback function, if any. For options of the - # form _