diff options
author | Kinsey Moore <kmoore@digium.com> | 2012-03-22 19:51:16 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2012-03-22 19:51:16 +0000 |
commit | c5b3db1956a3db2446b0310b3a7d59961fe3e089 (patch) | |
tree | 530b55034f5adfb0c7106ae1194679a031afc888 /main/tdd.c | |
parent | 1d1c28ac4b09df2b663123e55239e411b8f5ad26 (diff) |
Kill off red blobs in most of main/*
Everything still compiled after making these changes, so I assume these
whitespace-only changes didn't break anything (and shouldn't have).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/tdd.c')
-rw-r--r-- | main/tdd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/main/tdd.c b/main/tdd.c index 2ae80a3be..1bdc020a3 100644 --- a/main/tdd.c +++ b/main/tdd.c @@ -20,7 +20,7 @@ /*! \file * - * \brief TTY/TDD Generation support + * \brief TTY/TDD Generation support * * \author Mark Spencer <markster@digium.com> * @@ -168,7 +168,7 @@ int tdd_feed(struct tdd_state *tdd, unsigned char *ubuf, int len) } memcpy(buf, tdd->oldstuff, tdd->oldlen); mylen += tdd->oldlen / 2; - for (x = 0; x < len; x++) + for (x = 0; x < len; x++) buf[x + tdd->oldlen / 2] = AST_MULAW(ubuf[x]); c = res = 0; while (mylen >= 1320) { /* has to have enough to work on */ @@ -202,7 +202,7 @@ int tdd_feed(struct tdd_state *tdd, unsigned char *ubuf, int len) tdd->oldlen = 0; free(obuf); if (res) { - tdd->mode = 2; + tdd->mode = 2; /* put it in mode where it reliably puts teleprinter in correct shift mode */ return(c); @@ -222,12 +222,12 @@ static inline float tdd_getcarrier(float *cr, float *ci, int bit) t = *cr * dr[bit] - *ci * di[bit]; *ci = *cr * di[bit] + *ci * dr[bit]; *cr = t; - + t = 2.0 - (*cr * *cr + *ci * *ci); *cr *= t; *ci *= t; return *cr; -} +} #define PUT_BYTE(a) do { \ *(buf++) = (a); \ @@ -239,7 +239,7 @@ static inline float tdd_getcarrier(float *cr, float *ci, int bit) *(buf++) = AST_LIN2MU(__pas_idx); \ bytes++; \ } while(0) - + #define PUT_TDD_MARKMS do { \ int x; \ for (x = 0; x < 8; x++) \ @@ -266,13 +266,13 @@ static inline float tdd_getcarrier(float *cr, float *ci, int bit) #define PUT_TDD(byte) do { \ int z; \ unsigned char b = (byte); \ - PUT_TDD_BAUD(0); /* Start bit */ \ + PUT_TDD_BAUD(0); /* Start bit */ \ for (z = 0; z < 5; z++) { \ PUT_TDD_BAUD(b & 1); \ b >>= 1; \ } \ PUT_TDD_STOP; /* Stop bit */ \ -} while(0); +} while(0); /*! Generate TDD hold tone * \param buf Result buffer @@ -304,7 +304,7 @@ int tdd_generate(struct tdd_state *tdd, unsigned char *buf, const char *str) for(x = 0; str[x]; x++) { /* Do synch for each 72th character */ - if ( (tdd->charnum++) % 72 == 0) + if ( (tdd->charnum++) % 72 == 0) PUT_TDD(tdd->mode ? 27 /* FIGS */ : 31 /* LTRS */); c = toupper(str[x]); |