From f.darbyshire at gmail.com Wed Sep 3 11:58:13 2008 From: f.darbyshire at gmail.com (Fiona Darbyshire) Date: Wed, 3 Sep 2008 14:58:13 -0400 Subject: [SAC-HELP] SAC suggestion In-Reply-To: <08227668-5039-4174-A882-901E38BDACFF@geoazur.unice.fr> References: <08227668-5039-4174-A882-901E38BDACFF@geoazur.unice.fr> Message-ID: <256ff3740809031158u2f0b3d78vffb56789b81a983c@mail.gmail.com> That reminds me: if I mistype a "read" command such that no data is read into SAC, it then crashes (Segmentation Fault) at the next command. Can this be fixed? (This is in a Linux version.) Fiona Darbyshire Universit? du Qu?bec ? Montr?al, Canada On Sat, Aug 30, 2008 at 12:40 PM, Guust Nolet wrote: > This is in response to Brian Savage's request for > input to the next SAC release. > > One thing that I hope can be improved is that SAC crashes > when one mistypes an argument to the help command. At > least in my Linux and Mac OSX versions. Should be a simple > fix I would think. > > Guust Nolet > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From savage at uri.edu Thu Sep 4 09:00:46 2008 From: savage at uri.edu (Brian Savage) Date: Thu, 4 Sep 2008 12:00:46 -0400 Subject: [SAC-HELP] SAC suggestion In-Reply-To: <256ff3740809031158u2f0b3d78vffb56789b81a983c@mail.gmail.com> References: <08227668-5039-4174-A882-901E38BDACFF@geoazur.unice.fr> <256ff3740809031158u2f0b3d78vffb56789b81a983c@mail.gmail.com> Message-ID: <95D9CEEF-B2D9-4804-AF3E-B6D9762DF2D1@uri.edu> Fiona This bug is known about and will is fixed in the upcoming release, 101.2 Version 101.2 should be out very soon. Cheers Brian On Sep 3, 2008, at 2:58 PM , Fiona Darbyshire wrote: > That reminds me: if I mistype a "read" command such that no data is > read into SAC, it then crashes (Segmentation Fault) at the next > command. Can this be fixed? (This is in a Linux version.) > > Fiona Darbyshire > Universit? du Qu?bec ? Montr?al, Canada > > On Sat, Aug 30, 2008 at 12:40 PM, Guust Nolet > wrote: > This is in response to Brian Savage's request for > input to the next SAC release. > > One thing that I hope can be improved is that SAC crashes > when one mistypes an argument to the help command. At > least in my Linux and Mac OSX versions. Should be a simple > fix I would think. > > Guust Nolet > > > _______________________________________________ > sac-help mailing list > sac-help at iris.washington.edu > http://www.iris.washington.edu/mailman/listinfo/sac-help -------------- next part -------------- An HTML attachment was scrubbed... URL: From icrazy at gmail.com Fri Sep 5 22:49:45 2008 From: icrazy at gmail.com (Kuang He) Date: Sat, 6 Sep 2008 01:49:45 -0400 Subject: [SAC-HELP] Fwd: How to tell the endianness of a sac file In-Reply-To: References: Message-ID: > Ying Cal > There is currently no easy way to check the endianness of a sac file > directly, but > > What you can do is something like > % od -j 304 -N 4 -t d4 sacfile > 0000460 6 > 0000464 > > % od -j 304 -N 4 -t d4 sacfile.swap > 0000460 100663296 > 0000464 > > It outputs the header version number, which should be 6. If it is > not 6 (100663296 or anything else) > then you either have a byte swapped sac file or the file is not a > sacfile. This will only tell you if > the file you are looking at is the same endianness as your system. Together with the little program below (which was take from the C FAQ), we are able to tell the endianness of the sac file! :-) /* * Determine whether an Operating System is big-endian or little endian */ #include int main() { int x = 1; printf("This computer is "); if(*(char *)&x == 1) printf("little-endian\n"); else printf("big-endian\n"); return 0; } Best regards, -- Kuang He Department of Physics University of Connecticut Storrs, CT 06269-3046 Tel: +1.860.486.4919 Web: http://www.phys.uconn.edu/~he/ > The current version of SAC (v101.1) can read and write both types of > sac files. > > Cheers, > Brian From icrazy at gmail.com Fri Sep 5 23:43:33 2008 From: icrazy at gmail.com (Kuang He) Date: Sat, 6 Sep 2008 02:43:33 -0400 Subject: [SAC-HELP] Feature proposal -- saving command history to a disk file for later use Message-ID: Dear SAC users and devs, There is a useful feature in softwares like bash, which can save command history to a disk file and load it the next time they run. In this way, people can use hotkeys like Up Arrow, Down Arrow, Alt+P, Alt+N, etc. to access the commands they've used not only in the current session but also in the previous sessions. I hope that SAC can have the same feature so as to make our lives a bit easier. The feature should not be difficult to implement, and if people (hopefully both users and devs) think it is desirable, I'll start to do it. :-) Best regards, -- Kuang He Department of Physics University of Connecticut Storrs, CT 06269-3046 Tel: +1.860.486.4919 Web: http://www.phys.uconn.edu/~he/ From savage at uri.edu Sun Sep 7 13:47:00 2008 From: savage at uri.edu (Brian Savage) Date: Sun, 7 Sep 2008 16:47:00 -0400 Subject: [SAC-HELP] [sac-dev] Feature proposal -- saving command history to a disk file for later use In-Reply-To: References: Message-ID: <4DBE3F09-8391-47A4-97C9-F5B493066258@uri.edu> Kuang He, This feature (saving the command history) will be available in the next version. Cheers Brian On Sep 6, 2008, at 2:43 AM, Kuang He wrote: > Dear SAC users and devs, > > There is a useful feature in softwares like bash, which can save > command history to a disk file and load it the next time they run. In > this way, people can use hotkeys like Up Arrow, Down Arrow, Alt+P, > Alt+N, etc. to access the commands they've used not only in the > current session but also in the previous sessions. I hope that SAC can > have the same feature so as to make our lives a bit easier. > > The feature should not be difficult to implement, and if people > (hopefully both users and devs) think it is desirable, I'll start to > do it. :-) > > Best regards, > > -- > Kuang He > Department of Physics > University of Connecticut > Storrs, CT 06269-3046 > > Tel: +1.860.486.4919 > Web: http://www.phys.uconn.edu/~he/ > _______________________________________________ > sac-dev mailing list > sac-dev at iris.washington.edu > http://www.iris.washington.edu/mailman/listinfo/sac-dev From stubailo at moho.ess.ucla.edu Tue Sep 9 13:48:13 2008 From: stubailo at moho.ess.ucla.edu (Igor Stubailo) Date: Tue, 9 Sep 2008 13:48:13 -0700 (PDT) Subject: [SAC-HELP] jpeg/gif output from sac Message-ID: Hello all, I was wondering if there is an easy way to save the plots I get in sac? Saving an image in png/gif/jpeg would work but I couldn't find such options in the sac's help. Thanks, Igor From icrazy at gmail.com Tue Sep 9 14:10:22 2008 From: icrazy at gmail.com (Kuang He) Date: Tue, 9 Sep 2008 17:10:22 -0400 Subject: [SAC-HELP] jpeg/gif output from sac In-Reply-To: References: Message-ID: Hi Igor, SAC does not have that capability by itself. It can be done using SAC and Imagemagick, which provides a tool called convert. Take a look at this: http://www.iris.washington.edu/pipermail/sac-help/2007-May/000259.html Best regards, -- Kuang He Department of Physics University of Connecticut Storrs, CT 06269-3046 Tel: +1.860.486.4919 Web: http://www.phys.uconn.edu/~he/ On Tue, Sep 9, 2008 at 4:48 PM, Igor Stubailo wrote: > Hello all, > > I was wondering if there is an easy way to save the plots I get in sac? > Saving an image in png/gif/jpeg would work but I couldn't find such options > in the sac's help. > > Thanks, > Igor > _______________________________________________ > sac-help mailing list > sac-help at iris.washington.edu > http://www.iris.washington.edu/mailman/listinfo/sac-help > From stubailo at moho.ess.ucla.edu Tue Sep 9 14:14:35 2008 From: stubailo at moho.ess.ucla.edu (Igor Stubailo) Date: Tue, 9 Sep 2008 14:14:35 -0700 (PDT) Subject: [SAC-HELP] jpeg/gif output from sac In-Reply-To: References: Message-ID: Kuang, Thanks a lot. I am going to try that. -Igor On Tue, 9 Sep 2008, Kuang He wrote: > Hi Igor, > > SAC does not have that capability by itself. It can be done using SAC > and Imagemagick, which provides a tool called convert. > > Take a look at this: > > http://www.iris.washington.edu/pipermail/sac-help/2007-May/000259.html > > Best regards, > > -- > Kuang He > Department of Physics > University of Connecticut > Storrs, CT 06269-3046 > > Tel: +1.860.486.4919 > Web: http://www.phys.uconn.edu/~he/ > > > > On Tue, Sep 9, 2008 at 4:48 PM, Igor Stubailo > wrote: >> Hello all, >> >> I was wondering if there is an easy way to save the plots I get in sac? >> Saving an image in png/gif/jpeg would work but I couldn't find such options >> in the sac's help. >> >> Thanks, >> Igor >> _______________________________________________ >> sac-help mailing list >> sac-help at iris.washington.edu >> http://www.iris.washington.edu/mailman/listinfo/sac-help >> > _______________________________________________ > sac-help mailing list > sac-help at iris.washington.edu > http://www.iris.washington.edu/mailman/listinfo/sac-help > From snoke at vt.edu Tue Sep 9 14:49:44 2008 From: snoke at vt.edu (Arthur Snoke) Date: Tue, 09 Sep 2008 17:49:44 -0400 Subject: [SAC-HELP] jpeg/gif output from sac In-Reply-To: References: Message-ID: <48C6EF78.4050807@vt.edu> If I understand your question correctly, you can save plots you made in SAC to an EPS file. 1. First you must save the plot to a file. After you get the plot you like, enter bd sgf Then repeat your plot command that had produced your display. You will not see it, but it will produce a file in the directory you are in named f001.sgf. You can then convert the .sgf file to a Postscript or EPS file using programs and scripts provided with SAC. There is some discussion in utils/README_utils (in version 101.2). There are also comments about how one can make a PDF file, if you have the right script. Making an EPS file requires ghostscript. Not needed to make a simple postscript file. To convert the file to JPG, PNG, etc., you need another program. On a MAC that can be done in preview. Let me know if that is not clear -- or if you had a different question. Igor Stubailo wrote: > Kuang, > > Thanks a lot. I am going to try that. > > -Igor > > On Tue, 9 Sep 2008, Kuang He wrote: > >> Hi Igor, >> >> SAC does not have that capability by itself. It can be done using SAC >> and Imagemagick, which provides a tool called convert. >> >> Take a look at this: >> >> http://www.iris.washington.edu/pipermail/sac-help/2007-May/000259.html >> >> Best regards, >> >> -- >> Kuang He >> Department of Physics >> University of Connecticut >> Storrs, CT 06269-3046 >> >> Tel: +1.860.486.4919 >> Web: http://www.phys.uconn.edu/~he/ >> >> >> >> On Tue, Sep 9, 2008 at 4:48 PM, Igor Stubailo >> wrote: >>> Hello all, >>> >>> I was wondering if there is an easy way to save the plots I get in sac? >>> Saving an image in png/gif/jpeg would work but I couldn't find such >>> options >>> in the sac's help. >>> >>> Thanks, >>> Igor >>> _______________________________________________ >>> sac-help mailing list >>> sac-help at iris.washington.edu >>> http://www.iris.washington.edu/mailman/listinfo/sac-help >>> >> _______________________________________________ >> sac-help mailing list >> sac-help at iris.washington.edu >> http://www.iris.washington.edu/mailman/listinfo/sac-help >> > _______________________________________________ > sac-help mailing list > sac-help at iris.washington.edu > http://www.iris.washington.edu/mailman/listinfo/sac-help From stubailo at moho.ess.ucla.edu Tue Sep 9 14:56:52 2008 From: stubailo at moho.ess.ucla.edu (Igor Stubailo) Date: Tue, 9 Sep 2008 14:56:52 -0700 (PDT) Subject: [SAC-HELP] jpeg/gif output from sac In-Reply-To: <48C6EF78.4050807@vt.edu> References: <48C6EF78.4050807@vt.edu> Message-ID: Arthur, You understood my question correctly, thank you. Your method is similar to the one mentioned by Kuang. We tried it and it works! Thanks again, Igor On Tue, 9 Sep 2008, Arthur Snoke wrote: > If I understand your question correctly, you can save plots you made in SAC > to an EPS file. > > 1. First you must save the plot to a file. After you get the plot you like, > enter > > bd sgf > > Then repeat your plot command that had produced your display. You will not > see it, but it will produce a file in the directory you are in named > f001.sgf. > > You can then convert the .sgf file to a Postscript or EPS file using programs > and scripts provided with SAC. There is some discussion in > utils/README_utils (in version 101.2). There are also comments about how one > can make a PDF file, if you have the right script. Making an EPS file > requires ghostscript. Not needed to make a simple postscript file. > > To convert the file to JPG, PNG, etc., you need another program. On a MAC > that can be done in preview. > > Let me know if that is not clear -- or if you had a different question. > > Igor Stubailo wrote: >> Kuang, >> >> Thanks a lot. I am going to try that. >> >> -Igor >> >> On Tue, 9 Sep 2008, Kuang He wrote: >> >>> Hi Igor, >>> >>> SAC does not have that capability by itself. It can be done using SAC >>> and Imagemagick, which provides a tool called convert. >>> >>> Take a look at this: >>> >>> http://www.iris.washington.edu/pipermail/sac-help/2007-May/000259.html >>> >>> Best regards, >>> >>> -- >>> Kuang He >>> Department of Physics >>> University of Connecticut >>> Storrs, CT 06269-3046 >>> >>> Tel: +1.860.486.4919 >>> Web: http://www.phys.uconn.edu/~he/ >>> >>> >>> >>> On Tue, Sep 9, 2008 at 4:48 PM, Igor Stubailo >>> wrote: >>>> Hello all, >>>> >>>> I was wondering if there is an easy way to save the plots I get in sac? >>>> Saving an image in png/gif/jpeg would work but I couldn't find such >>>> options >>>> in the sac's help. >>>> >>>> Thanks, >>>> Igor >>>> _______________________________________________ >>>> sac-help mailing list >>>> sac-help at iris.washington.edu >>>> http://www.iris.washington.edu/mailman/listinfo/sac-help >>>> >>> _______________________________________________ >>> sac-help mailing list >>> sac-help at iris.washington.edu >>> http://www.iris.washington.edu/mailman/listinfo/sac-help >>> >> _______________________________________________ >> sac-help mailing list >> sac-help at iris.washington.edu >> http://www.iris.washington.edu/mailman/listinfo/sac-help > > From daedalus at qwest.net Thu Sep 11 13:37:20 2008 From: daedalus at qwest.net (Bob Hancock) Date: Thu, 11 Sep 2008 13:37:20 -0700 Subject: [SAC-HELP] Problem With SAC 101.2 Message-ID: When rotating data to GCP, I get the letter Q in place of either the radial or transverse headings on the rotated files. This has occurred on all files where I rotated the data with SAC 101.2. I reloaded SAC 101.1, and there was no problem with any of the files. Thank you, Bob Hancock -------------- next part -------------- An HTML attachment was scrubbed... URL: From daedalus at qwest.net Tue Sep 16 12:53:58 2008 From: daedalus at qwest.net (Bob Hancock) Date: Tue, 16 Sep 2008 12:53:58 -0700 Subject: [SAC-HELP] Problem When Rotating Data Message-ID: When I view the R & T files after rotation, I occasionally notice that either the R or T file has shifted to the left, and is no longer in vertical synchronization with the Z, N, & E files. I have had this happen several times. When the shift occurs, it is always to the left, and only involves one file, either the R or T file. It has never occurred on both the R & T files. I have been unable to isolate a common denominator for this problem. Thanks Bob Hancock -------------- next part -------------- An HTML attachment was scrubbed... URL: From nalarifi at ksu.edu.sa Thu Sep 18 15:56:39 2008 From: nalarifi at ksu.edu.sa (Nassir Alarifi) Date: Fri, 19 Sep 2008 01:56:39 +0300 Subject: [SAC-HELP] help for sac on the mac ox Message-ID: <1D06C9878A3CCD44AF3F04D6DA7767E501652179FDDF@KSUVMB03.KSU.LOCAL> how to setup sac on mac (step by step) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Belema.Altraide at arup.com.au Sun Sep 21 23:52:00 2008 From: Belema.Altraide at arup.com.au (Belema Altraide) Date: Mon, 22 Sep 2008 16:52:00 +1000 Subject: [SAC-HELP] Dynamic modelling Message-ID: To whom it may concern I have modelled a jacket (file attached) and have performed a dynamic analysis on the structure (extract mode shapes). I have fixed the sturcture dynamically on four corners of the jacket and the topsides 222000. At the base of the structure, there is a central joint 2001 (at EL-180) that has spring values applied on them and these values are: vertical: 7000MN/. Lateral: 2500MN/m Rotational: 8E6MN/radian Torsional: 4E6MN/radian I analysed the structure with these applied spring stiffeness values and the 4 joints 21,22,23,24 dynamically fixed in all directions (222222) and am getting a period of 44 sec with the structure rotating vigorously. I need some help with the following: 1. I am unsure how to apply the spring values from joint 2001 to the four corner joint 21,22,23, 24. At the moment, I assume that I will need to rigid link joint 2001 to the four corner joints? 2. If 2 is correct, I am unsure how to rigidly link the joint 2001 with the spring stiffness values to the four corner joints 21, 22, 23 and 24. 3. I am unsure what fixities I need to apply to the four corner joints. Your help to the above queries would be greatly appreciated. Please help me asap. Thanks ____________________________________________________________ Electronic mail messages entering and leaving Arup business systems are scanned for acceptability of content and viruses From bgaite at ija.csic.es Mon Sep 22 04:00:21 2008 From: bgaite at ija.csic.es (beatriz gaite) Date: Mon, 22 Sep 2008 13:00:21 +0200 Subject: [SAC-HELP] FIR normalized Message-ID: Dear to all, When removing the instrument response from the data I get some error messages that I have not been able to find what are they due to. These are: Calper is not available. Cannot tell if response is normalized, so transfer function will be used without scaling. Calib is not available. Cannot tell if scale factor has been applied on input, so transfer function will be used without scaling. Waveform multiplied by 1.000000 after deconvolution. Another error message in some data are: WARNING: FIR normalized: sum[coef]=9.781101E-01; US AMTX LHZ I appreciate if someone could tell me what is it due to, how can I avoid these errors and, the most important, in what do they affect the deconvolution. Thank you in advance. Beatriz Gaite -------------- next part -------------- An HTML attachment was scrubbed... URL: From shenxzh at gmail.com Tue Sep 23 01:33:05 2008 From: shenxzh at gmail.com (shenxzh at gmail.com) Date: Tue, 23 Sep 2008 16:33:05 +0800 Subject: [SAC-HELP] question about beam Message-ID: <200809231633031874897@gmail.com> Hi, I use 'beam' to stack the waveforms (1.sac, 2.sac,...9.sac) and get the output file-*beam.SAC, and want to copy the event and station information to the *beam.SAC file, how to do? Who can help me supply a example of script? Thank you. Xuzhang Xuzhang Shen Lanzhou Institute of Seismology, China Earquake Administration (CEA) 450 Donggan Xilu, Lanzhou, Gansu Province, 730000, China Tel: +86-931-8277661 E_mail: shenxzh at gmail.com; shenxz at gssb.gov.cn; 2008-09-23 -------------- next part -------------- An HTML attachment was scrubbed... URL: From p_palacios_ec at hotmail.com Thu Sep 25 16:18:09 2008 From: p_palacios_ec at hotmail.com (Pablo Palacios) Date: Thu, 25 Sep 2008 23:18:09 -0000 Subject: [SAC-HELP] question about beam In-Reply-To: <200809231633031874897@gmail.com> References: <200809231633031874897@gmail.com> Message-ID: Dear Xuzhang, Also I have tried to retrieve the header information and some difficulties exits. When you do it from some command window only appears the portion depending the size of the window and if you use a macro occur the same thing. However, usually we need only part of the information, with the following instruction in a cshell script you can save the information that you need, for example if you pick it with A and F markers: sac<! MyHeaderFile r MysacFile listhdr AMARKER FMARKER EOF I hope that in the next version appear a better solution, specially if some body need all the header. P. From: shenxzh at gmail.com Sent: Tuesday, September 23, 2008 8:33 AM To: sac-help at iris.washington.edu Subject: [SAC-HELP] question about beam Hi, I use 'beam' to stack the waveforms (1.sac, 2.sac,...9.sac) and get the output file-*beam.SAC, and want to copy the event and station information to the *beam.SAC file, how to do? Who can help me supply a example of script? Thank you. Xuzhang -------------------------------------------------------------------------------- Xuzhang Shen Lanzhou Institute of Seismology, China Earquake Administration (CEA) 450 Donggan Xilu, Lanzhou, Gansu Province, 730000, China Tel: +86-931-8277661 E_mail: shenxzh at gmail.com; shenxz at gssb.gov.cn; -------------------------------------------------------------------------------- 2008-09-23 -------------------------------------------------------------------------------- _______________________________________________ sac-help mailing list sac-help at iris.washington.edu http://www.iris.washington.edu/mailman/listinfo/sac-help -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kevin.Buckley at mcs.vuw.ac.nz Mon Sep 29 18:15:19 2008 From: Kevin.Buckley at mcs.vuw.ac.nz (Kevin.Buckley at mcs.vuw.ac.nz) Date: Tue, 30 Sep 2008 14:15:19 +1300 (NZDT) Subject: [SAC-HELP] NetBSD falling foul of SAC's toupper/tolower macros Message-ID: <5ccd36671641df36ae3e93514eca31ce.squirrel@mail.mcs.vuw.ac.nz> Hi there, I am sure this is a known issue but my searches turned up zilch so, just in case ... I came to build sac-101.2 on a NetBSD 4.99.58 platform with gcc (GCC) 4.1.3 20080202 prerelease (NetBSD nb1 20070620), the sac build being configured thus: ./configure --prefix=/local/scratch/kevin/sac-101.2 resulting in: Compliation Options for sac (Seismic Analysis Code 101.2) CFLAGS = LDFLAGS = LIBS = -lm -lcurses Debug = Optimization = Database = off Matlab = off X11-buffer = on X11-depth = on X_LIBS = -L/usr/pkg/lib X_CFLAGS = -I/usr/pkg/include Readline = off Editline = on Install Base = /local/scratch/kevin/sac-101.2 System = (i386-unknown-netbsdelf4.99.58) and saw this error: gcc -DHAVE_CONFIG_H -I. -I. -I../inc -I/usr/pkg/include -I../inc -I../libedit/include -c -o co/zgpmsg.o co/zgpmsg.c In file included from /usr/pkg/include/readline/chardefs.h:26, from /usr/pkg/include/readline/keymaps.h:36, from /usr/pkg/include/readline/readline.h:38, from co/zgpmsg.c:93: /usr/include/ctype.h:71: error: expected identifier or '(' before 'int' /usr/include/ctype.h:71: error: expected ')' before '?' token /usr/include/ctype.h:72: error: expected identifier or '(' before 'int' /usr/include/ctype.h:72: error: expected ')' before '?' token this occurs because the toupper/tolower declarations in this system's ctype.h int tolower(int); int toupper(int); get mangled by the macro declaration in sac's src/co/stdu.h #ifndef CYGWIN /* macro expansions */ #define tolower(c) ((c>='A' && c<='Z') ? (c+('a'-'A')) : c) #define toupper(c) ((c>='a' && c<='z') ? (c-('a'-'A')) : c) #endif /* CYGWIN */ as they are only protected by the CYGWIN define and so appear as: int ((int>='A' && int<='Z') ? (int+('a'-'A')) : int); int ((int>='a' && int<='z') ? (int-('a'-'A')) : int); After removing the macro definitions, the code compiles OK. -- Kevin M. Buckley Room: CO327 School of Mathematics, Statistics Phone: +64 4 463 5971 and Computer Science Victoria University of Wellington New Zealand From icrazy at gmail.com Mon Sep 29 19:10:12 2008 From: icrazy at gmail.com (Kuang He) Date: Mon, 29 Sep 2008 22:10:12 -0400 Subject: [SAC-HELP] NetBSD falling foul of SAC's toupper/tolower macros In-Reply-To: <5ccd36671641df36ae3e93514eca31ce.squirrel@mail.mcs.vuw.ac.nz> References: <5ccd36671641df36ae3e93514eca31ce.squirrel@mail.mcs.vuw.ac.nz> Message-ID: Hi Keven, I've reported the same problem a couple of weeks ago, and provided a patch. http://www.iris.washington.edu/pipermail/sac-dev/2008-September/000088.html This should be fixed in the next version. Best regards, -- Kuang He Department of Physics University of Connecticut Storrs, CT 06269-3046 Tel: +1.860.486.4919 Web: http://www.phys.uconn.edu/~he/ On Mon, Sep 29, 2008 at 9:15 PM, wrote: > Hi there, > > I am sure this is a known issue but my searches turned up zilch > so, just in case ... > > I came to build sac-101.2 on a NetBSD 4.99.58 platform with > gcc (GCC) 4.1.3 20080202 prerelease (NetBSD nb1 20070620), the > sac build being configured thus: > > ./configure --prefix=/local/scratch/kevin/sac-101.2 > > resulting in: > > Compliation Options for sac (Seismic Analysis Code 101.2) > > CFLAGS = > LDFLAGS = > LIBS = -lm -lcurses > Debug = > Optimization = > Database = off > Matlab = off > X11-buffer = on > X11-depth = on > X_LIBS = -L/usr/pkg/lib > X_CFLAGS = -I/usr/pkg/include > Readline = off > Editline = on > Install Base = /local/scratch/kevin/sac-101.2 > System = (i386-unknown-netbsdelf4.99.58) > > > and saw this error: > > gcc -DHAVE_CONFIG_H -I. -I. -I../inc -I/usr/pkg/include -I../inc > -I../libedit/include -c -o co/zgpmsg.o co/zgpmsg.c > In file included from /usr/pkg/include/readline/chardefs.h:26, > from /usr/pkg/include/readline/keymaps.h:36, > from /usr/pkg/include/readline/readline.h:38, > from co/zgpmsg.c:93: > /usr/include/ctype.h:71: error: expected identifier or '(' before 'int' > /usr/include/ctype.h:71: error: expected ')' before '?' token > /usr/include/ctype.h:72: error: expected identifier or '(' before 'int' > /usr/include/ctype.h:72: error: expected ')' before '?' token > > this occurs because the toupper/tolower declarations in this system's > ctype.h > > int tolower(int); > int toupper(int); > > get mangled by the macro declaration in sac's > > src/co/stdu.h > > #ifndef CYGWIN > /* macro expansions */ > #define tolower(c) ((c>='A' && c<='Z') ? (c+('a'-'A')) : c) > #define toupper(c) ((c>='a' && c<='z') ? (c-('a'-'A')) : c) > #endif /* CYGWIN */ > > as they are only protected by the CYGWIN define and so appear as: > > int ((int>='A' && int<='Z') ? (int+('a'-'A')) : int); > int ((int>='a' && int<='z') ? (int-('a'-'A')) : int); > > > After removing the macro definitions, the code compiles OK. > > > -- > > Kevin M. Buckley Room: CO327 > School of Mathematics, Statistics Phone: +64 4 463 5971 > and Computer Science > Victoria University of Wellington > New Zealand > > _______________________________________________ > sac-help mailing list > sac-help at iris.washington.edu > http://www.iris.washington.edu/mailman/listinfo/sac-help > From Kevin.Buckley at mcs.vuw.ac.nz Mon Sep 29 19:43:17 2008 From: Kevin.Buckley at mcs.vuw.ac.nz (Kevin.Buckley at mcs.vuw.ac.nz) Date: Tue, 30 Sep 2008 15:43:17 +1300 (NZDT) Subject: [SAC-HELP] NetBSD falling foul of SAC's toupper/tolower macros In-Reply-To: References: <5ccd36671641df36ae3e93514eca31ce.squirrel@mail.mcs.vuw.ac.nz> Message-ID: <89644af6a8bbcfa96461dc81408c1dbb.squirrel@mail.mcs.vuw.ac.nz> Hello Kuang He > I've reported the same problem a couple of weeks ago, and provided a > patch. > > http://www.iris.washington.edu/pipermail/sac-dev/2008-September/000088.html I knew I wouldn't be the first to have seen this but didn't think it would be so recent. I wonder why my search did not throw your post up. I think I must have assumed it must be NetBSD specific (only recently started using that platform) so searched with the term NetBSD rather than just BSD. I don't think I had found sac-dev either ? > > This should be fixed in the next version. > Sounds like the inclusion of is the way to go, rather than removing the macros for those few systems that don't have the system calls. Thanks for the feedback, Kevin From s.peacock at blacknest.gov.uk Tue Sep 30 01:57:34 2008 From: s.peacock at blacknest.gov.uk (Sheila Peacock) Date: Tue, 30 Sep 2008 09:57:34 +0100 Subject: [SAC-HELP] GSE writing Message-ID: <48E1E9FE.5020002@blacknest.gov.uk> (re-sent) Dear All, SAC v. 101.1 either fails or crashes when I try to use "writegse". SAC v. 100 is OK with writegse. Is this a known bug? Regards, Sheila Peacock. SAC v. 100 (is OK) $ sacb SEISMIC ANALYSIS CODE [03/01/2005 (Version 100.00)] Copyright 1995 Regents of the University of California SAC> r 1986.213.14.03.12.3600.DW.COL..SHZ.D.SAC SAC> writegse 198608011403COL.gse.int Converting waveforms . Writing station data . Writing channel data . Writing arrival data . 1 waveforms written in 198608011403COL.gse.int SAC> end SAC v. 101.1 fails: $ sac1011 SEISMIC ANALYSIS CODE [01/19/2008 (Version 101.1)] Copyright 1995 Regents of the University of California SAC> r 1986.213.14.03.12.3600.DW.COL..SHZ.D.SAC SAC> writegse 198608011403COL.gse.int Segmentation fault or.... (trying various parameters in the parameter list) SAC> r 1986.213.14.03.12.3600.DW.COL..SHZ.D.SAC SAC> writegse int 198608011403COL.gse.int ERROR 1312: Bad number of files in write file list: SAC> writegse int source off 198608011403COL.gse.int ERROR 1312: Bad number of files in write file list: SAC> writegse int source off commit 198608011403COL.gse.int ERROR 1312: Bad number of files in write file list: $ sac1011 SEISMIC ANALYSIS CODE [01/19/2008 (Version 101.1)] Copyright 1995 Regents of the University of California SAC> r 1986.213.14.03.12.3600.DW.COL..SHZ.D.SAC SAC> writegse CM6 198608011403COL.gse.cm6 Segmentation fault