Changes between Version 1 and Version 2 of Libsrc_functions


Ignore:
Timestamp:
01/20/12 08:44:22 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Libsrc_functions

    v1 v2  
    3232 
    3333brent.c 
     34 
    3435from "Numerical Recipes in C," used only in tlay.c. 
     36 
    3537chron3.c 
     38 
    3639time-conversion routines. 
     40 
    3741fft_prep.c 
     42 
    3843fft_prep contains routines for setting up the structures needed for the Singleton FFT package. 
     44 
    3945fft99.c 
     46 
    4047This file provides the Temperton FFT (Fast Fourier Transform) packageff. 
     48 
    4149getutil.c 
     50 
    4251string-to-number mapping for shared memory keys, module ids and message types. 
     52 
    4353kom.c 
     54 
    4455string-parsing routines for reading control files. 
     56 
    4557logit.c 
     58 
    4659log file routines. 
     60 
    4761mem_circ_queue.c 
     62 
    4863routines for queueing messages based on preallocated memory. 
     64 
    4965mnbrak.c 
     66 
    5067from "Numerical Recipes in C," used only in tlay.c. 
     68 
    5169parse_trig.c 
     70 
    5271Parse a trigger message, for preparing wave_serverV requests. 
     72 
    5373putaway.c 
     74 
    5475Master putaway routines, to access ahputaway.c, sacputaway.c, and sudsputaway.c 
     76 
    5577queue_max_size.c 
     78 
    5679routines for queueing messages. Deprecated since they allocate memory during processing; use mem_circ_queue instead 
     80 
    5781read_arc.c 
     82 
    5883Read a hyp2000 archive message into structures. 
     84 
    5985sacputaway.c 
     86 
    6087routines for writing SAC files. Use these with putaway.c instead of calling them directly. 
     88 
    6189site.c 
     90 
    6291load station names and lat/long from station location file. 
     92 
    6393socket_ew_common.c 
     94 
    6495routines for using sockets with timeouts. 
     96 
    6597sudsputaway.c 
     98 
    6699routines for writing SUDS files. Use these with putaway.c instead of calling them directly. 
     100 
    67101swap.c 
     102 
    68103byte-swapping routines for exchanging data between PCs and other computers. 
     104 
    69105tlay.c 
     106 
    70107travel-time calculation routines. 
     108 
    71109transfer.c 
     110 
    72111Routines for dealing with instrument transfer functions using pseudospectral methods and the Temperton FFT package, fft99.c. 
     112 
    73113wave_client.c 
     114 
    74115routines for clients to communicate with the original wave_server. 
     116 
    75117geo_to_km.c 
     118 
    76119Routine for computing distance on the earth's sufrace: given two locations specified by lat-lon pairs, compute the distance and bearing from the first to the second point. 
     120 
    77121ws_clientII.c 
     122 
    78123routines for clients to communicate with wave_serverV, with the help of the socket timing routines. 
    79 SYSTEM-DEPENDENT FUNCTIONS 
     124 
     125== SYSTEM-DEPENDENT FUNCTIONS == 
    80126 
    81127Each system-dependent directory contains all of the same functions as the other(s), with identical calling sequences and return values. So if you look in vx.x/src/libsrc/solaris, or vx.x/src/libsrc/winnt you will find the following source code files: 
     128 
    82129copyfile.c 
     130 
    83131transfer a file to a remote machine using rcp. 
     132 
    84133dirops_ew.c 
     134 
    85135file system directory operations. 
     136 
    86137errexit.c 
     138 
    87139Stub function for non-zero return status on Solaris 
     140 
    88141getavail.c 
     142 
    89143find the available disk space. 
     144 
    90145getsysname_ew.c 
     146 
    91147get the local system name. 
     148 
    92149pipe.c 
     150 
    93151message-passing within mega-module. 
     152 
    94153remote_copy.c 
     154 
    95155transfer a file to a remote machine using rcp; slightly different from copyfile.c. 
     156 
    96157sema_ew.c 
     158 
    97159semaphore functions. 
     160 
    98161sendmail.c 
     162 
    99163send email. 
     164 
    100165sendpage.c 
     166 
    101167send pager message via serial port. 
     168 
    102169sleep_ew.c 
     170 
    103171sleep (millisecond resolution). 
     172 
    104173socket_ew.c 
     174 
    105175system-dependent socket functions. 
     176 
    106177threads_ew.c 
     178 
    107179multi-thread functions. 
     180 
    108181time_ew.c 
     182 
    109183reentrant system clock functions. 
     184 
    110185transport.c 
     186 
    111187Earthworm message-passing protocol. 
     188 
    112189truetime.c 
     190 
    113191get time from True-Time PC-SG board (WindowsNT only) 
    114 PROGRAMMING WITH EARTHWORM LIBRARY ROUTINES 
     192 
     193== PROGRAMMING WITH EARTHWORM LIBRARY ROUTINES == 
    115194 
    116195At the moment, the Earthworm library routines are not a true library. Instead, they exist as object files in the vx.x/lib directory. After a module is compiled, it must be linked with the library objects that contain the library functions that have been called within the module. In this section, we give a synopsis of the functions within each of the library source file listed above. More details can be found in the comments within the source code. Many library function prototypes are given in vx.x/include/earthworm.h. Others are given in separate include files in vx.x/include. 
     
    120199#include <chron3.h> 
    121200 
    122 void date20( double secs, char *str ); 
    123         Create an 20-character-long string representation of the  
    124         date (in the form of "1988Jan23 1234 12.21") given the number 
     201void date20( double secs, char *str );[[BR]] 
     202        Create an 20-character-long string representation of the [[BR]] 
     203        date (in the form of "1988Jan23 1234 12.21") given the number[[BR]] 
    125204        of julian seconds. 
    126205 
    127 void date17( double secs, char *str ); 
    128         Create a 15-character-long string representation of the  
    129         date (in the form of "19880123123412.21") given the number 
     206void date17( double secs, char *str );[[BR]] 
     207        Create a 15-character-long string representation of the [[BR]] 
     208        date (in the form of "19880123123412.21") given the number[[BR]] 
    130209        of julian seconds. 
    131210