[asterisk-commits] trunk r16650 - /trunk/include/asterisk/callerid.h

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 31 03:06:44 MST 2006


Author: rizzo
Date: Fri Mar 31 04:06:42 2006
New Revision: 16650

URL: http://svn.digium.com/view/asterisk?rev=16650&view=rev
Log:
another batch of whitespace removal
(trailing space-tabs, and useless 'extern')


Modified:
    trunk/include/asterisk/callerid.h

Modified: trunk/include/asterisk/callerid.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/callerid.h?rev=16650&r1=16649&r2=16650&view=diff
==============================================================================
--- trunk/include/asterisk/callerid.h (original)
+++ trunk/include/asterisk/callerid.h Fri Mar 31 04:06:42 2006
@@ -73,28 +73,28 @@
  * \par
  * Initializes the callerid system.  Mostly stuff for inverse FFT
  */
-extern void callerid_init(void);
-
-/*! \brief Generates a CallerID FSK stream in ulaw format suitable for transmission. 
+void callerid_init(void);
+
+/*! \brief Generates a CallerID FSK stream in ulaw format suitable for transmission.
  * \param buf Buffer to use. If "buf" is supplied, it will use that buffer instead of allocating its own.  "buf" must be at least 32000 bytes in size of you want to be sure you don't have an overrun.
  * \param number Use NULL for no number or "P" for "private"
  * \param name name to be used
  * \param flags passed flags
  * \param callwaiting callwaiting flag
  * \param codec -- either AST_FORMAT_ULAW or AST_FORMAT_ALAW
- * This function creates a stream of callerid (a callerid spill) data in ulaw format. 
+ * This function creates a stream of callerid (a callerid spill) data in ulaw format.
  * \return It returns the size
  * (in bytes) of the data (if it returns a size of 0, there is probably an error)
 */
-extern int callerid_generate(unsigned char *buf, char *number, char *name, int flags, int callwaiting, int codec);
-
-/*! \brief Create a callerID state machine 
+int callerid_generate(unsigned char *buf, char *number, char *name, int flags, int callwaiting, int codec);
+
+/*! \brief Create a callerID state machine
  * \param cid_signalling Type of signalling in use
  *
  * This function returns a malloc'd instance of the callerid_state data structure.
  * \return Returns a pointer to a malloc'd callerid_state structure, or NULL on error.
  */
-extern struct callerid_state *callerid_new(int cid_signalling);
+struct callerid_state *callerid_new(int cid_signalling);
 
 /*! \brief Read samples into the state machine.
  * \param cid Which state machine to act upon
@@ -103,10 +103,10 @@
  * \param codec which codec (AST_FORMAT_ALAW or AST_FORMAT_ULAW)
  *
  * Send received audio to the Caller*ID demodulator.
- * \return Returns -1 on error, 0 for "needs more samples", 
+ * \return Returns -1 on error, 0 for "needs more samples",
  * and 1 if the CallerID spill reception is complete.
  */
-extern int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
+int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
 
 /*! \brief Read samples into the state machine.
  * \param cid Which state machine to act upon
@@ -115,12 +115,12 @@
  * \param codec which codec (AST_FORMAT_ALAW or AST_FORMAT_ULAW)
  *
  * Send received audio to the Caller*ID demodulator (for japanese style lines).
- * \return Returns -1 on error, 0 for "needs more samples", 
+ * \return Returns -1 on error, 0 for "needs more samples",
  * and 1 if the CallerID spill reception is complete.
  */
-extern int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
-
-/*! \brief Extract info out of callerID state machine.  Flags are listed above 
+int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
+
+/*! \brief Extract info out of callerID state machine.  Flags are listed above
  * \param cid Callerid state machine to act upon
  * \param number Pass the address of a pointer-to-char (will contain the phone number)
  * \param name Pass the address of a pointer-to-char (will contain the name)
@@ -129,7 +129,7 @@
  * This function extracts a callerid string out of a callerid_state state machine.
  * If no number is found, *number will be set to NULL.  Likewise for the name.
  * Flags can contain any of the following:
- * 
+ *
  * \return Returns nothing.
  */
 void callerid_get(struct callerid_state *cid, char **number, char **name, int *flags);
@@ -147,9 +147,9 @@
  * \param cid This is the callerid_state state machine to free
  * This function frees callerid_state cid.
  */
-extern void callerid_free(struct callerid_state *cid);
-
-/*! \brief Generate Caller-ID spill from the "callerid" field of asterisk (in e-mail address like format) 
+void callerid_free(struct callerid_state *cid);
+
+/*! \brief Generate Caller-ID spill from the "callerid" field of asterisk (in e-mail address like format)
  * \param buf buffer for output samples. See callerid_generate() for details regarding buffer.
  * \param name Caller-ID Name
  * \param number Caller-ID Number
@@ -157,24 +157,24 @@
  *
  * Acts like callerid_generate except uses an asterisk format callerid string.
  */
-extern int ast_callerid_generate(unsigned char *buf, char *name, char *number, int codec);
+int ast_callerid_generate(unsigned char *buf, char *name, char *number, int codec);
 
 /*! \brief Generate message waiting indicator  (stutter tone) */
-extern int vmwi_generate(unsigned char *buf, int active, int mdmf, int codec);
-
-/*! \brief Generate Caller-ID spill but in a format suitable for Call Waiting(tm)'s Caller*ID(tm) 
+int vmwi_generate(unsigned char *buf, int active, int mdmf, int codec);
+
+/*! \brief Generate Caller-ID spill but in a format suitable for Call Waiting(tm)'s Caller*ID(tm)
  * See ast_callerid_generate() for other details
  */
-extern int ast_callerid_callwaiting_generate(unsigned char *buf, char *name, char *number, int codec);
-
-/*! \brief Destructively parse inbuf into name and location (or number) 
+int ast_callerid_callwaiting_generate(unsigned char *buf, char *name, char *number, int codec);
+
+/*! \brief Destructively parse inbuf into name and location (or number)
  * Parses callerid stream from inbuf and changes into useable form, outputed in name and location.
  * \param instr buffer of callerid stream (in audio form) to be parsed. Warning, data in buffer is changed.
  * \param name address of a pointer-to-char for the name value of the stream.
  * \param location address of a pointer-to-char for the phone number value of the stream.
  * \return Returns 0 on success, -1 on failure.
  */
-extern int ast_callerid_parse(char *instr, char **name, char **location);
+int ast_callerid_parse(char *instr, char **name, char **location);
 
 /*! Generate a CAS (CPE Alert Signal) tone for 'n' samples */
 /*!
@@ -184,31 +184,31 @@
  * \param codec Which codec (AST_FORMAT_ALAW or AST_FORMAT_ULAW)
  * \return Returns -1 on error (if len is less than 2400), 0 on success.
  */
-extern int ast_gen_cas(unsigned char *outbuf, int sas, int len, int codec);
+int ast_gen_cas(unsigned char *outbuf, int sas, int len, int codec);
 
 /*! \brief Shrink a phone number in place to just digits (more accurately it just removes ()'s, .'s, and -'s... */
 /*!
  * \param n The number to be stripped/shrunk
  * \return Returns nothing important
  */
-extern void ast_shrink_phone_number(char *n);
+void ast_shrink_phone_number(char *n);
 
 /*! \brief Check if a string consists only of digits and + \#
     \param n number to be checked.
     \return Returns 0 if n is a number, 1 if it's not.
  */
-extern int ast_isphonenumber(const char *n);
+int ast_isphonenumber(const char *n);
 
 /*! \brief Check if a string consists only of digits and and + \# ( ) - .
 	(meaning it can be cleaned with ast_shrink_phone_number)
     \param exten The extension (or URI) to be checked.
     \return Returns 0 if n is a number, 1 if it's not.
  */
-extern int ast_is_shrinkable_phonenumber(const char *exten);
-
-extern int ast_callerid_split(const char *src, char *name, int namelen, char *num, int numlen);
-
-extern char *ast_callerid_merge(char *buf, int bufsiz, const char *name, const char *num, const char *unknown);
+int ast_is_shrinkable_phonenumber(const char *exten);
+
+int ast_callerid_split(const char *src, char *name, int namelen, char *num, int numlen);
+
+char *ast_callerid_merge(char *buf, int bufsiz, const char *name, const char *num, const char *unknown);
 
 /*
  * Caller*ID and other GR-30 compatible generation
@@ -226,12 +226,12 @@
 	t = *cr * cid_dr[bit] - *ci * cid_di[bit];
 	*ci = *cr * cid_di[bit] + *ci * cid_dr[bit];
 	*cr = t;
-	
+
 	t = 2.0 - (*cr * *cr + *ci * *ci);
 	*cr *= t;
 	*ci *= t;
 	return *cr;
-}	
+}
 
 #define PUT_BYTE(a) do { \
 	*(buf++) = (a); \
@@ -243,7 +243,7 @@
 	*(buf++) = AST_LIN2X(index); \
 	bytes++; \
 } while(0)
-	
+
 #define PUT_CLID_MARKMS do { \
 	int x; \
 	for (x=0;x<8;x++) \
@@ -268,7 +268,7 @@
 		b >>= 1; \
 	} \
 	PUT_CLID_BAUD(1);	/* Stop bit */ \
-} while(0);	
+} while(0)
 
 /* Various defines and bits for handling PRI- and SS7-type restriction */
 
@@ -316,7 +316,7 @@
 
 /*! \page Def_CallerPres Caller ID Presentation
 
-	Caller ID presentation values are used to set properties to a 
+	Caller ID presentation values are used to set properties to a
 	caller ID in PSTN networks, and as RPID value in SIP transactions.
 
 	The following values are available to use:



More information about the asterisk-commits mailing list