From 63fed21527c2f83275cb49f289a7de42595669c1 Mon Sep 17 00:00:00 2001 From: William Joye <wjoye@cfa.harvard.edu> Date: Thu, 16 Jun 2016 16:16:18 -0400 Subject: fix doc --- doc/barchart.html | 2 +- doc/barchart.n | 2 +- doc/vector.html | 324 +++++++++++++++++++++++++++--------------------------- doc/vector.n | 3 +- 4 files changed, 166 insertions(+), 165 deletions(-) diff --git a/doc/barchart.html b/doc/barchart.html index 0f314c2..7f04d25 100644 --- a/doc/barchart.html +++ b/doc/barchart.html @@ -1419,7 +1419,7 @@ <B>-fill</B> <I>color</I> Sets the background color of the line. This color is used with - striped lines (see the <B>-fdashesoption).</B> <B>If</B> <I>color</I> is the empty + striped lines (see the <B>-dashes</B> option). If <I>color</I> is the empty string, no background color is drawn (the line will be dashed, not striped). The default background color is "". diff --git a/doc/barchart.n b/doc/barchart.n index 6b3c29a..7a9dac8 100644 --- a/doc/barchart.n +++ b/doc/barchart.n @@ -1957,7 +1957,7 @@ on the line. Each number must be between 1 and 255. If .TP \fB\-fill \fIcolor\fR Sets the background color of the line. This color is used with -striped lines (see the \fB\-fdashes\R option). If \fIcolor\fR is +striped lines (see the \fB\-dashes\fR option). If \fIcolor\fR is the empty string, no background color is drawn (the line will be dashed, not striped). The default background color is \f(CW""\fR. .TP diff --git a/doc/vector.html b/doc/vector.html index 37ad3c3..ef097c6 100644 --- a/doc/vector.html +++ b/doc/vector.html @@ -237,16 +237,15 @@ the same name; see the manual entries for the library functions for details on what they do. The operation is applied to all elements of the vector returning the results. - <B>acos</B> <B>cos</B> <B>hypot</B> <B>sinh</B> - <B>asin</B> <B>cosh</B> <B>log</B> <B>sqrt</B> - <B>atan</B> <B>exp</B> <B>log10</B> <B>tan</B> - <B>ceil</B> <B>floor</B> <B>sin</B> <B>tanh</B> Additional functions - are: + <B>acos</B> <B>cos</B> <B>hypot</B> <B>sinh</B> <B>asin</B> <B>cosh</B> <B>log</B> <B>sqrt</B> + <B>atan</B> <B>exp</B> <B>log10</B> <B>tan</B> <B>ceil</B> <B>floor</B> <B>sin</B> <B>tanh</B> + + Additional functions are: <B>abs</B> Returns the absolute value of each component. <B>random</B> Returns a vector of non-negative values uniformly dis- - tributed between [0.0, 1.0) using <I>drand48</I>. The seed + tributed between [0.0, 1.0) using <I>drand48</I>. The seed comes from the internal clock of the machine or may be set manual with the srandom function. @@ -254,43 +253,43 @@ <B>srandom</B> Initializes the random number generator using <I>srand48</I>. The high order 32-bits are set using the integral por- - tion of the first vector component. All other compo- - nents are ignored. The low order 16-bits are set to + tion of the first vector component. All other compo- + nents are ignored. The low order 16-bits are set to an arbitrary value. The following functions return a single value. - <B>adev</B> Returns the average deviation (defined as the sum of - the absolute values of the differences between compo- - nent and the mean, divided by the length of the vec- + <B>adev</B> Returns the average deviation (defined as the sum of + the absolute values of the differences between compo- + nent and the mean, divided by the length of the vec- tor). - <B>kurtosis</B> Returns the degree of peakedness (fourth moment) of + <B>kurtosis</B> Returns the degree of peakedness (fourth moment) of the vector. <B>length</B> Returns the number of components in the vector. <B>max</B> Returns the vector's maximum value. - root of the variance) of the vector. - <B>skew</B> Returns the skewness (or third moment) of the vector. + + <B>skew</B> Returns the skewness (or third moment) of the vector. This characterizes the degree of asymmetry of the vec- tor about the mean. <B>sum</B> Returns the sum of the components. - <B>var</B> Returns the variance of the vector. The sum of the - squared differences between each component and the - mean is computed. The variance is the sum divided by + <B>var</B> Returns the variance of the vector. The sum of the + squared differences between each component and the + mean is computed. The variance is the sum divided by the length of the vector minus 1. - The last set returns a vector of the same length as the argu- + The last set returns a vector of the same length as the argu- ment. - <B>norm</B> Scales the values of the vector to lie in the range + <B>norm</B> Scales the values of the vector to lie in the range [0.0..1.0]. - <B>sort</B> Returns the vector components sorted in ascending + <B>sort</B> Returns the vector components sorted in ascending order. <B>vector</B> <B>names</B> ?<I>pattern</I>? @@ -298,158 +297,159 @@ </PRE> <H2>INSTANCE OPERATIONS</H2><PRE> - You can also use the vector's Tcl command to query or modify it. The - general form is <I>vecName</I> <I>operation</I> ?<I>arg</I>?... Both <I>operation</I> and its - arguments determine the exact behavior of the command. The operations + You can also use the vector's Tcl command to query or modify it. The + general form is <I>vecName</I> <I>operation</I> ?<I>arg</I>?... Both <I>operation</I> and its + arguments determine the exact behavior of the command. The operations available for vectors are listed below. <I>vecName</I> <B>append</B> <I>item</I> ?<I>item</I>?... - Appends the component values from <I>item</I> to <I>vecName</I>. <I>Item</I> can be + Appends the component values from <I>item</I> to <I>vecName</I>. <I>Item</I> can be either the name of a vector or a list of numeric values. <I>vecName</I> <B>binread</B> <I>channel</I> ?<I>length</I>? ?<I>switches</I>? - Reads binary values from a Tcl channel. Values are either - appended to the end of the vector or placed at a given index - (using the <B>-at</B> option), overwriting existing values. Data is - read until EOF is found on the channel or a specified number of - values <I>length</I> are read (note that this is not necessarily the - same as the number of bytes). The following switches are sup- + Reads binary values from a Tcl channel. Values are either + appended to the end of the vector or placed at a given index + (using the <B>-at</B> option), overwriting existing values. Data is + read until EOF is found on the channel or a specified number of + values <I>length</I> are read (note that this is not necessarily the + same as the number of bytes). The following switches are sup- ported: - <B>-swap</B> Swap bytes and words. The default endian is the host + <B>-swap</B> Swap bytes and words. The default endian is the host machine. <B>-at</B> <I>index</I> - New values will start at vector index <I>index</I>. This will + New values will start at vector index <I>index</I>. This will overwrite any current values. <B>-format</B> <I>format</I> - Specifies the format of the data. <I>Format</I> can be one of + Specifies the format of the data. <I>Format</I> can be one of + the following: "i1", "i2", "i4", "i8", "u1, "u2", "u4", - This command removes the index and value strings from the array. This is useful when the vector is large. <I>vecName</I> <B>delete</B> <I>index</I> ?<I>index</I>?... Deletes the <I>index</I>th component from the vector <I>vecName</I>. <I>Index</I> is - the index of the element to be deleted. This is the same as - unsetting the array variable element <I>index</I>. The vector is com- + the index of the element to be deleted. This is the same as + unsetting the array variable element <I>index</I>. The vector is com- pacted after all the indices have been deleted. <I>vecName</I> <B>dup</B> <I>destName</I> - Copies <I>vecName</I> to <I>destName</I>. <I>DestName</I> is the name of a destina- - tion vector. If a vector <I>destName</I> already exists, it is over- - written with the components of <I>vecName</I>. Otherwise a new vector + Copies <I>vecName</I> to <I>destName</I>. <I>DestName</I> is the name of a destina- + tion vector. If a vector <I>destName</I> already exists, it is over- + written with the components of <I>vecName</I>. Otherwise a new vector is created. <I>vecName</I> <B>expr</B> <I>expression</I> - Computes the expression and resets the values of the vector - accordingly. Both scalar and vector math operations are - allowed. All values in expressions are either real numbers or + Computes the expression and resets the values of the vector + accordingly. Both scalar and vector math operations are + allowed. All values in expressions are either real numbers or names of vectors. All numbers are treated as one component vec- tors. <I>vecName</I> <B>length</B> ?<I>newSize</I>? - Queries or resets the number of components in <I>vecName</I>. <I>NewSize</I> - is a number specifying the new size of the vector. If <I>newSize</I> - is smaller than the current size of <I>vecName</I>, <I>vecName</I> is trun- - cated. If <I>newSize</I> is greater, the vector is extended and the - new components are initialized to 0.0. If no <I>newSize</I> argument + Queries or resets the number of components in <I>vecName</I>. <I>NewSize</I> + is a number specifying the new size of the vector. If <I>newSize</I> + is smaller than the current size of <I>vecName</I>, <I>vecName</I> is trun- + cated. If <I>newSize</I> is greater, the vector is extended and the + new components are initialized to 0.0. If no <I>newSize</I> argument is present, the current length of the vector is returned. <I>vecName</I> <B>merge</B> <I>srcName</I> ?<I>srcName</I>?... - Merges the named vectors into a single vector. The resulting + Merges the named vectors into a single vector. The resulting vector is formed by merging the components of each source vector one index at a time. <I>vecName</I> <B>notify</B> <I>keyword</I> - Controls how vector clients are notified of changes to the vec- + Controls how vector clients are notified of changes to the vec- tor. The exact behavior is determined by <I>keyword</I>. - always Indicates that clients are to be notified immediately + always Indicates that clients are to be notified immediately whenever the vector is updated. never Indicates that no clients are to be notified. whenidle - Indicates that clients are to be notified at the next + Indicates that clients are to be notified at the next idle point whenever the vector is updated. - now If any client notifications is currently pending, they + now If any client notifications is currently pending, they are notified immediately. - cancel Cancels pending notifications of clients using the vec- - interval between each of the original components will contain a - <I>density</I> number of new components, whose values are evenly dis- + cancel Cancels pending notifications of clients using the vec- + tor. + + <I>density</I> number of new components, whose values are evenly dis- tributed between the original components values. This is useful for generating abscissas to be interpolated along a spline. <I>vecName</I> <B>range</B> <I>firstIndex</I> ?<I>lastIndex</I>?... - Returns a list of numeric values representing the vector compo- - nents between two indices. Both <I>firstIndex</I> and <I>lastIndex</I> are - indices representing the range of components to be returned. If - <I>lastIndex</I> is less than <I>firstIndex</I>, the components are listed in + Returns a list of numeric values representing the vector compo- + nents between two indices. Both <I>firstIndex</I> and <I>lastIndex</I> are + indices representing the range of components to be returned. If + <I>lastIndex</I> is less than <I>firstIndex</I>, the components are listed in reverse order. <I>vecName</I> <B>search</B> <I>value</I> ?<I>value</I>? - Searches for a value or range of values among the components of - <I>vecName</I>. If one <I>value</I> argument is given, a list of indices of + Searches for a value or range of values among the components of + <I>vecName</I>. If one <I>value</I> argument is given, a list of indices of the components which equal <I>value</I> is returned. If a second <I>value</I> - is also provided, then the indices of all components which lie - within the range of the two values are returned. If no compo- + is also provided, then the indices of all components which lie + within the range of the two values are returned. If no compo- nents are found, then "" is returned. <I>vecName</I> <B>set</B> <I>item</I> - Resets the components of the vector to <I>item</I>. <I>Item</I> can be either + Resets the components of the vector to <I>item</I>. <I>Item</I> can be either a list of numeric expressions or another vector. <I>vecName</I> <B>seq</B> <I>start</I> ?<I>finish</I>? ?<I>step</I>? - Generates a sequence of values starting with the value <I>start</I>. - <I>Finish</I> indicates the terminating value of the sequence. The - vector is automatically resized to contain just the sequence. + Generates a sequence of values starting with the value <I>start</I>. + <I>Finish</I> indicates the terminating value of the sequence. The + vector is automatically resized to contain just the sequence. If three arguments are present, <I>step</I> designates the interval. - With only two arguments (no <I>finish</I> argument), the sequence will - continue until the vector is filled. With one argument, the + With only two arguments (no <I>finish</I> argument), the sequence will + continue until the vector is filled. With one argument, the interval defaults to 1.0. <I>vecName</I> <B>sort</B> ?<B>-reverse</B>? ?<I>argName</I>?... - Sorts the vector <I>vecName</I> in increasing order. If the <B>-reverse</B> - flag is present, the vector is sorted in decreasing order. If - other arguments <I>argName</I> are present, they are the names of vec- - tors which will be rearranged in the same manner as <I>vecName</I>. - Each vector must be the same length as <I>vecName</I>. You could use - this to sort the x vector of a graph, while still retaining the + Sorts the vector <I>vecName</I> in increasing order. If the <B>-reverse</B> + flag is present, the vector is sorted in decreasing order. If + other arguments <I>argName</I> are present, they are the names of vec- + tors which will be rearranged in the same manner as <I>vecName</I>. + Each vector must be the same length as <I>vecName</I>. You could use + this to sort the x vector of a graph, while still retaining the same x,y coordinate pairs in a y vector. <I>vecName</I> <B>variable</B> <I>varName</I> - Maps a Tcl variable to the vector, creating another means for + Maps a Tcl variable to the vector, creating another means for accessing the vector. The variable <I>varName</I> can't already exist. This overrides any current variable mapping the vector may have. </PRE> <H2>C LANGUAGE API</H2><PRE> - You can create, modify, and destroy vectors from C code, using library - routines. You need to include the header file blt.h. It contains the - definition of the structure <B>Blt_Vector</B>, which represents the vector. - + You can create, modify, and destroy vectors from C code, using library + routines. You need to include the header file blt.h. It contains the + definition of the structure <B>Blt_Vector</B>, which represents the vector. + It appears below. typedef struct { <B>Blt_CreateVector</B> Synopsis: int <B>Blt_CreateVector</B> (<I>interp</I>, <I>vecName</I>, <I>length</I>, <I>vecPtrPtr</I>) - Tcl_Interp *<I>interp</I>; char *<I>vecName</I>; int <I>length</I>; Blt_Vec- + Tcl_Interp *<I>interp</I>; char *<I>vecName</I>; int <I>length</I>; Blt_Vec- tor **<I>vecPtrPtr</I>; Description: - Creates a new vector <I>vecName</I> with a length of <I>length</I>. - <B>Blt_CreateVector</B> creates both a new Tcl command and array - variable <I>vecName</I>. Neither a command nor variable named - <I>vecName</I> can already exist. A pointer to the vector is + Creates a new vector <I>vecName</I> with a length of <I>length</I>. + <B>Blt_CreateVector</B> creates both a new Tcl command and array + variable <I>vecName</I>. Neither a command nor variable named + <I>vecName</I> can already exist. A pointer to the vector is placed into <I>vecPtrPtr</I>. - Results: Returns TCL_OK if the vector is successfully created. If - <I>length</I> is negative, a Tcl variable or command <I>vecName</I> - already exists, or memory cannot be allocated for the vec- - tor, then TCL_ERROR is returned and <I>interp->result</I> will + Results: Returns TCL_OK if the vector is successfully created. If + <I>length</I> is negative, a Tcl variable or command <I>vecName</I> + already exists, or memory cannot be allocated for the vec- + tor, then TCL_ERROR is returned and <I>interp->result</I> will contain an error message. @@ -459,15 +459,15 @@ Tcl_Interp *<I>interp</I>; char *<I>vecName</I>; Description: - Removes the vector <I>vecName</I>. <I>VecName</I> is the name of a vec- - tor which must already exist. Both the Tcl command and - array variable <I>vecName</I> are destroyed. All clients of the - vector will be notified immediately that the vector has + Removes the vector <I>vecName</I>. <I>VecName</I> is the name of a vec- + tor which must already exist. Both the Tcl command and + array variable <I>vecName</I> are destroyed. All clients of the + vector will be notified immediately that the vector has been destroyed. - Results: Returns TCL_OK if the vector is successfully deleted. If - <I>vecName</I> is not the name a vector, then TCL_ERROR is - returned and <I>interp->result</I> will contain an error message. + Results: Returns TCL_OK if the vector is successfully deleted. If + <I>vecName</I> is not the name a vector, then TCL_ERROR is + returned and <I>interp->result</I> will contain an error message. <B>Blt_DeleteVector</B> @@ -476,51 +476,52 @@ Blt_Vector *<I>vecPtr</I>; Description: - Removes the vector pointed to by <I>vecPtr</I>. <I>VecPtr</I> is a - pointer to a vector, typically set by <B>Blt_GetVector</B> or - <B>Blt_CreateVector</B>. Both the Tcl command and array variable - of the vector are destroyed. All clients of the vector - will be notified immediately that the vector has been + Removes the vector pointed to by <I>vecPtr</I>. <I>VecPtr</I> is a + pointer to a vector, typically set by <B>Blt_GetVector</B> or + <B>Blt_CreateVector</B>. Both the Tcl command and array variable + of the vector are destroyed. All clients of the vector + will be notified immediately that the vector has been destroyed. - Results: Returns TCL_OK if the vector is successfully deleted. If + Results: Returns TCL_OK if the vector is successfully deleted. If + <I>vecName</I> is not the name a vector, then TCL_ERROR is Results: Returns TCL_OK if the vector is successfully retrieved. If - <I>vecName</I> is not the name of a vector, then TCL_ERROR is - returned and <I>interp->result</I> will contain an error message. + <I>vecName</I> is not the name of a vector, then TCL_ERROR is + returned and <I>interp->result</I> will contain an error message. <B>Blt_ResetVector</B> - Synopsis: int <B>Blt_ResetVector</B> (<I>vecPtr</I>, <I>dataArr</I>, <I>numVal-</I> - <I>ues</I>, <I>arraySize</I>, <I>freeProc</I>) + Synopsis: int <B>Blt_ResetVector</B> (<I>vecPtr</I>, <I>dataArr</I>, <I>numValues</I>, + <I>arraySize</I>, <I>freeProc</I>) Blt_Vector *<I>vecPtr</I>; double *<I>dataArr</I>; int *<I>numValues</I>; int *<I>arraySize</I>; Tcl_FreeProc *<I>freeProc</I>; Description: - Resets the components of the vector pointed to by <I>vecPtr</I>. + Resets the components of the vector pointed to by <I>vecPtr</I>. Calling <B>Blt_ResetVector</B> will trigger the vector to dispatch - notifications to its clients. <I>DataArr</I> is the array of dou- - bles which represents the vector data. <I>NumValues</I> is the - number of elements in the array. <I>ArraySize</I> is the actual - size of the array (the array may be bigger than the number + notifications to its clients. <I>DataArr</I> is the array of dou- + bles which represents the vector data. <I>NumValues</I> is the + number of elements in the array. <I>ArraySize</I> is the actual + size of the array (the array may be bigger than the number of values stored in it). <I>FreeProc</I> indicates how the storage for the vector component array (<I>dataArr</I>) was allocated. It is used to determine how to reallocate memory when the vec- - tor is resized or destroyed. It must be TCL_DYNAMIC, - TCL_STATIC, TCL_VOLATILE, or a pointer to a function to + tor is resized or destroyed. It must be TCL_DYNAMIC, + TCL_STATIC, TCL_VOLATILE, or a pointer to a function to free the memory allocated for the vector array. If <I>freeProc</I> - is TCL_VOLATILE, it indicates that <I>dataArr</I> must be copied - and saved. If <I>freeProc</I> is TCL_DYNAMIC, it indicates that - <I>dataArr</I> was dynamically allocated and that Tcl should free + is TCL_VOLATILE, it indicates that <I>dataArr</I> must be copied + and saved. If <I>freeProc</I> is TCL_DYNAMIC, it indicates that + <I>dataArr</I> was dynamically allocated and that Tcl should free <I>dataArr</I> if necessary. Static indicates that nothing should be done to release storage for <I>dataArr</I>. - Results: Returns TCL_OK if the vector is successfully resized. If - <I>newSize</I> is negative, a vector <I>vecName</I> does not exist, or - memory cannot be allocated for the vector, then TCL_ERROR - is returned and <I>interp->result</I> will contain an error mes- + Results: Returns TCL_OK if the vector is successfully resized. If + <I>newSize</I> is negative, a vector <I>vecName</I> does not exist, or + memory cannot be allocated for the vector, then TCL_ERROR + is returned and <I>interp->result</I> will contain an error mes- sage. @@ -530,23 +531,23 @@ Blt_Vector *<I>vecPtr</I>; int <I>newSize</I>; Description: - Resets the length of the vector pointed to by <I>vecPtr</I> to - <I>newSize</I>. If <I>newSize</I> is smaller than the current size of - the vector, it is truncated. If <I>newSize</I> is greater, the - vector is extended and the new components are initialized + Resets the length of the vector pointed to by <I>vecPtr</I> to + <I>newSize</I>. If <I>newSize</I> is smaller than the current size of + the vector, it is truncated. If <I>newSize</I> is greater, the + vector is extended and the new components are initialized to 0.0. Calling <B>Blt_ResetVector</B> will trigger the vector to dispatch notifications. Results: Returns 1 if a vector <I>vecName</I> exists and 0 otherwise. - If your application needs to be notified when a vector changes, it + If your application needs to be notified when a vector changes, it can allocate a unique <I>client</I> <I>identifier</I> for itself. Using this iden- - tifier, you can then register a call-back to be made whenever the - vector is updated or destroyed. By default, the call-backs are made + tifier, you can then register a call-back to be made whenever the + vector is updated or destroyed. By default, the call-backs are made at the next idle point. This can be changed to occur at the time the - vector is modified. An application can allocate more than one iden- - tifier for any vector. When the client application is done with the + vector is modified. An application can allocate more than one iden- + tifier for any vector. When the client application is done with the vector, it should free the identifier. The call-back routine must of the following type. @@ -554,9 +555,9 @@ typedef void (<B>Blt_VectorChangedProc</B>) (Tcl_Interp *<I>interp</I>, ClientData <I>clientData</I>, Blt_VectorNotify <I>notify</I>); - <I>ClientData</I> is passed to this routine whenever it is called. You can - use this to pass information to the call-back. The <I>notify</I> argument - indicates whether the vector has been updated of destroyed. It is an + <I>ClientData</I> is passed to this routine whenever it is called. You can + use this to pass information to the call-back. The <I>notify</I> argument + indicates whether the vector has been updated of destroyed. It is an enumerated type. typedef enum { @@ -570,35 +571,34 @@ Tcl_Interp *<I>interp</I>; char *<I>vecName</I>; Description: - Allocates an client identifier for with the vector <I>vec-</I> - <I>Name</I>. This identifier can be used to specify a call- - back which is triggered when the vector is updated or + Allocates an client identifier for with the vector <I>vec-</I> + <I>Name</I>. This identifier can be used to specify a call- + back which is triggered when the vector is updated or destroyed. - Results: Returns a client identifier if successful. If <I>vecName</I> - is not the name of a vector, then NULL is returned and + Results: Returns a client identifier if successful. If <I>vecName</I> + is not the name of a vector, then NULL is returned and <I>interp->result</I> will contain an error message. <B>Blt_GetVectorById</B> Synopsis: int <B>Blt_GetVector</B> (<I>interp</I>, <I>clientId</I>, <I>vecPtrPtr</I>) - Tcl_Interp *<I>interp</I>; Blt_VectorId <I>clientId</I>; Blt_Vector + Tcl_Interp *<I>interp</I>; Blt_VectorId <I>clientId</I>; Blt_Vector **<I>vecPtrPtr</I>; Description: - Retrieves the vector used by <I>clientId</I>. <I>ClientId</I> is a - - Description: - Specifies a call-back routine to be called whenever the - vector associated with <I>clientId</I> is updated or deleted. - <I>Proc</I> is a pointer to call-back routine and must be of - the type <B>Blt_VectorChangedProc</B>. <I>ClientData</I> is a one- - word value to be passed to the routine when it is - invoked. If <I>proc</I> is NULL, then the client is not noti- + Retrieves the vector used by <I>clientId</I>. <I>ClientId</I> is a + valid vector client identifier allocated by + Specifies a call-back routine to be called whenever the + vector associated with <I>clientId</I> is updated or deleted. + <I>Proc</I> is a pointer to call-back routine and must be of + the type <B>Blt_VectorChangedProc</B>. <I>ClientData</I> is a one- + word value to be passed to the routine when it is + invoked. If <I>proc</I> is NULL, then the client is not noti- fied. - Results: The designated call-back procedure will be invoked when + Results: The designated call-back procedure will be invoked when the vector is updated or destroyed. @@ -608,11 +608,11 @@ Blt_VectorId <I>clientId</I>; Description: - Frees the client identifier. Memory allocated for the - identifier is released. The client will no longer be + Frees the client identifier. Memory allocated for the + identifier is released. The client will no longer be notified when the vector is modified. - Results: The designated call-back procedure will be no longer be + Results: The designated call-back procedure will be no longer be invoked when the vector is updated or destroyed. @@ -622,11 +622,11 @@ Blt_VectorId <I>clientId</I>; Description: - Retrieves the name of the vector associated with the + Retrieves the name of the vector associated with the client identifier <I>clientId</I>. Results: Returns the name of the vector associated with <I>clientId</I>. - If <I>clientId</I> is not an identifier or the vector has been + If <I>clientId</I> is not an identifier or the vector has been destroyed, NULL is returned. @@ -641,14 +641,14 @@ typedef double Blt_VectorIndexProc(Vector *vecPtr); - difference what the initial size of the vector is since it will be - reset shortly. The vector is updated when <B>lt_ResetVector</B> is called. - Blt_ResetVector makes the changes visible to the Tcl interface and + The function will be passed a pointer to the vector. + + reset shortly. The vector is updated when <B>lt_ResetVector</B> is called. + Blt_ResetVector makes the changes visible to the Tcl interface and other vector clients (such as a graph widget). - #include <tcl.h> #include <blt.h> Blt_Vector - *vecPtr; double *newArr; FILE *f; struct stat statBuf; int numBytes, - numValues; + #include <tcl.h> #include <blt.h> Blt_Vector *vecPtr; double + *newArr; FILE *f; struct stat statBuf; int numBytes, numValues; f = fopen("binary.dat", "r"); fstat(fileno(f), &statBuf); numBytes = (int)statBuf.st_size; @@ -659,16 +659,16 @@ if (Blt_VectorExists(interp, "data")) { if (Blt_GetVector(interp, "data", &vecPtr) != TCL_OK) { - return TCL_ERROR; + return TCL_ERROR; } } else { if (Blt_CreateVector(interp, "data", 0, &vecPtr) != TCL_OK) { - return TCL_ERROR; + return TCL_ERROR; } } /* * Reset the vector. Clients will be notified when Tk is idle. * TCL_DYNAMIC tells the vector to free the memory allocated * if it needs to reallocate or destroy the vector. */ if (Blt_ResetVector(vecPtr, newArr, numValues, numValues, - TCL_DYNAMIC) != TCL_OK) { + TCL_DYNAMIC) != TCL_OK) { return TCL_ERROR; } diff --git a/doc/vector.n b/doc/vector.n index 9b50e32..fa8bb7e 100644 --- a/doc/vector.n +++ b/doc/vector.n @@ -410,11 +410,12 @@ see the manual entries for the library functions for details on what they do. The operation is applied to all elements of the vector returning the results. .CS -.ta 3c 6c 9c +.ta 2c 4c 6c \fBacos\fR \fBcos\fR \fBhypot\fR \fBsinh\fR \fBasin\fR \fBcosh\fR \fBlog\fR \fBsqrt\fR \fBatan\fR \fBexp\fR \fBlog10\fR \fBtan\fR \fBceil\fR \fBfloor\fR \fBsin\fR \fBtanh\fR +.sp .CE Additional functions are: .TP 1i -- cgit v0.12