Skip to content

Commit 0d76dff

Browse files
committedMar 6, 2017
spelling fixes
1 parent 99f859e commit 0d76dff

21 files changed

+98
-99
lines changed
 

‎scripts/spell_check/.agignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ python/plugins/processing/algs/otb/
1111
python/plugins/processing/algs/saga/
1212
python/qsci_apis/
1313
src/astyle
14-
src/app/dwg/libdxfrw/
1514
src/app/gps/qwtpolar-1.0/
1615
src/app/gps/qwtpolar-1.1.1/
1716
src/core/pal

‎scripts/spell_check/check_spelling.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ while getopts ":rdl:" opt; do
5050
done
5151
shift $(expr $OPTIND - 1)
5252

53-
if [ ! $# -eq 0 ]; then
54-
EXCLUDE=$(cat $AGIGNORE |${GP}sed -e 's/\s*#.*$//' -e '/^\s*$/d' | tr '\n' '|' |${GP}sed -e 's/|$//')
53+
if [ $# -ne 0 ]; then
54+
EXCLUDE=$(${GP}sed -e 's/\s*#.*$//' -e '/^\s*$/d' $AGIGNORE | tr '\n' '|' | ${GP}sed -e 's/|$//')
5555
INPUTFILES=$(echo $@ | tr -s '[[:blank:]]' '\n' | egrep -iv "$EXCLUDE" | tr '\n' ' ' )
5656
if [[ -z $INPUTFILES ]]; then
5757
exit 0
@@ -151,11 +151,11 @@ for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
151151
# also make error small case and escape special chars: ( ) |
152152
ERRORSMALLCASE=$(echo ${ERROR,,} |${GP}sed -r 's/\(/\\(/g' |${GP}sed -r 's/\)/\\)/g' |${GP}sed -r 's/\|/\\|/g')
153153
if [[ ! "${ERRORSMALLCASE}" =~ $IGNORECASE_INWORD ]]; then
154-
if [[ ! -z $(ag --nonumbers --case-sensitive "^${ERRORSMALLCASE:1:-1}${ERRORSMALLCASE: -1}?:" scripts/spell_check/spelling.dat) ]]; then
154+
if [[ -n $(ag --nonumbers --case-sensitive "^${ERRORSMALLCASE:1:-1}${ERRORSMALLCASE: -1}?:" scripts/spell_check/spelling.dat) ]]; then
155155
ERRORSMALLCASE=${ERRORSMALLCASE#?}
156156
ERROR=${ERROR#?}
157157
fi
158-
if [[ ! -z $(ag --nonumbers --case-sensitive "^${ERRORSMALLCASE::-1}:" scripts/spell_check/spelling.dat) ]]; then
158+
if [[ -n $(ag --nonumbers --case-sensitive "^${ERRORSMALLCASE::-1}:" scripts/spell_check/spelling.dat) ]]; then
159159
ERRORSMALLCASE=${ERRORSMALLCASE::-1}
160160
ERROR=${ERROR::-1}
161161
fi
@@ -170,16 +170,16 @@ for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
170170
MATCHCASE="$ERROR:$CORRECTION"
171171
CORRECTIONCASE=$(echo "$MATCHCASE" | ${GP}sed -r 's/([A-Z]+):(.*)/\1:\U\2/; s/([A-Z][a-z]+):([a-z])/\1:\U\2\L/' | cut -d: -f2)
172172

173-
if [[ ! -z $OUTPUTLOG ]]; then
173+
if [[ -n $OUTPUTLOG ]]; then
174174
echo "$FILE $NUMBER $ERROR $CORRECTIONCASE" >> $OUTPUTLOG
175175
fi
176176
if [[ "$INTERACTIVE" =~ YES ]]; then
177177
# Skip global replace
178-
if [[ ! -z ${GLOBREP_ALLFILES["$ERROR"]} ]]; then
178+
if [[ -n ${GLOBREP_ALLFILES["$ERROR"]} ]]; then
179179
echo -e "replace \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m"
180180
${GP}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE
181181
continue
182-
elif [[ ( ! -z ${GLOBREP_CURRENTFILE["$ERROR"]} ) || ( ! -z ${GLOBREP_IGNORE["$ERROR"]} ) ]]; then
182+
elif [[ ( -n ${GLOBREP_CURRENTFILE["$ERROR"]} ) || ( -n ${GLOBREP_IGNORE["$ERROR"]} ) ]]; then
183183
echo "skipping occurrence"
184184
continue
185185
else

‎src/app/dwg/libdxfrw/drw_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ namespace DRW
126126
//! Shadow mode
127127
enum ShadowMode
128128
{
129-
CastAndReceieveShadows = 0,
129+
CastAndReceiveShadows = 0,
130130
CastShadows = 1,
131131
ReceiveShadows = 2,
132132
IgnoreShadows = 3

‎src/app/dwg/libdxfrw/drw_entities.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
throw e; \
2929
}
3030

31-
//! Calculate arbitary axis
31+
//! Calculate arbitrary axis
3232
/*!
33-
* Calculate arbitary axis for apply extrusions
33+
* Calculate arbitrary axis for apply extrusions
3434
* @author Rallaz
3535
*/
3636
void DRW_Entity::calculateAxis( DRW_Coord extPoint )
@@ -65,9 +65,9 @@ void DRW_Entity::calculateAxis( DRW_Coord extPoint )
6565
extAxisY.unitize();
6666
}
6767

68-
//! Extrude a point using arbitary axis
68+
//! Extrude a point using arbitrary axis
6969
/*!
70-
* apply extrusion in a point using arbitary axis (previous calculated)
70+
* apply extrusion in a point using arbitrary axis (previously calculated)
7171
* @author Rallaz
7272
*/
7373
void DRW_Entity::extrudePoint( DRW_Coord extPoint, DRW_Coord *point )
@@ -881,11 +881,11 @@ void DRW_Ellipse::applyExtrusion()
881881
{
882882
calculateAxis( extPoint );
883883
extrudePoint( extPoint, &secPoint );
884-
double intialparam = staparam;
884+
double initialparam = staparam;
885885
if ( extPoint.z < 0. )
886886
{
887887
staparam = M_PIx2 - endparam;
888-
endparam = M_PIx2 - intialparam;
888+
endparam = M_PIx2 - initialparam;
889889
}
890890
}
891891
}
@@ -1139,7 +1139,7 @@ bool DRW_3Dface::parseDwg( DRW::Version v, dwgBuffer *buf, duint32 bs )
11391139
invisibleflag = has_no_flag ? ( int )NoEdge : buf->getBitShort();
11401140
}
11411141
drw_assert( invisibleflag >= NoEdge );
1142-
drw_assert( invisibleflag <= AllEdges );
1142+
drw_assert( invisibleflag <= AllEdges ); //#spellok
11431143

11441144
QgsDebugMsg( QString( "base:%1 sec:%2 third:%3 fourth:%4 invisibleFlag:%5" )
11451145
.arg( QString( "%1,%2,%3" ).arg( basePoint.x ).arg( basePoint.y ).arg( basePoint.z ) )
@@ -1633,7 +1633,7 @@ bool DRW_Text::parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs )
16331633
duint8 data_flags = 0x00;
16341634
if ( version > DRW::AC1014 ) //2000+
16351635
{
1636-
data_flags = buf->getRawChar8(); /* DataFlags RC Used to determine presence of subsquent data */
1636+
data_flags = buf->getRawChar8(); /* DataFlags RC Used to determine presence of subsequent data */
16371637

16381638
QgsDebugMsg( QString( "data_flags:%1" ).arg( data_flags, 0, 16 ) );
16391639

@@ -1681,11 +1681,11 @@ bool DRW_Text::parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs )
16811681

16821682
if ( version > DRW::AC1014 ) //2000+
16831683
{
1684-
if ( !( data_flags & 0x04 ) ) /* Oblique ang RD 51 present if !(DataFlags & 0x04) */
1684+
if ( !( data_flags & 0x04 ) ) /* Oblique angle RD 51 present if !(DataFlags & 0x04) */
16851685
{
16861686
oblique = buf->getRawDouble();
16871687
}
1688-
if ( !( data_flags & 0x08 ) ) /* Rotation ang RD 50 present if !(DataFlags & 0x08) */
1688+
if ( !( data_flags & 0x08 ) ) /* Rotation angle RD 50 present if !(DataFlags & 0x08) */
16891689
{
16901690
angle = buf->getRawDouble();
16911691
}
@@ -1697,21 +1697,21 @@ bool DRW_Text::parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs )
16971697
}
16981698
else //14-
16991699
{
1700-
oblique = buf->getBitDouble(); /* Oblique ang BD 51 */
1701-
angle = buf->getBitDouble(); /* Rotation ang BD 50 */
1700+
oblique = buf->getBitDouble(); /* Oblique angle BD 51 */
1701+
anglele = buf->getBitDouble(); /* Rotation angle BD 50 */
Code has comments. Press enter to view.
17021702
height = buf->getBitDouble(); /* Height BD 40 */
17031703
widthscale = buf->getBitDouble(); /* Width factor BD 41 */
17041704
}
17051705

1706-
QgsDebugMsg( QString( "thickness:%1, Oblique ang:%2, Width:%3, rotation:%4, height:%5" )
1706+
QgsDebugMsg( QString( "thickness:%1, Oblique angle:%2, Width:%3, rotation:%4, height:%5" )
17071707
.arg( thickness ).arg( oblique ).arg( widthscale ).arg( angle ).arg( height )
17081708
);
17091709

17101710
text = sBuf->getVariableText( version, false ); /* Text value TV 1 */
17111711

17121712
QgsDebugMsg( QString( "text string:%1" ).arg( text.c_str() ) );
17131713

1714-
//textgen, alignH, alignV always present in R14-, data_flags set in initialisation
1714+
//textgen, alignH, alignV always present in R14-, data_flags set in initialization
17151715
if ( !( data_flags & 0x20 ) ) /* Generation BS 71 present if !(DataFlags & 0x20) */
17161716
{
17171717
textgen = buf->getBitShort();
@@ -1807,7 +1807,7 @@ bool DRW_MText::parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs )
18071807
DRW_UNUSED( ext_ht );
18081808
/* Extents wid BD Undocumented and not present in DXF or entget The extents
18091809
rectangle, when rotated the same as the text, fits the actual text image on
1810-
the screen (altough we've seen it include an extra row of text in height). */
1810+
the screen (although we've seen it include an extra row of text in height). */
18111811
double ext_wid = buf->getBitDouble();
18121812
DRW_UNUSED( ext_wid );
18131813
/* Text TV 1 All text in one long string (without '\n's 3 for line wrapping).

‎src/app/dwg/libdxfrw/drw_entities.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class DRW_Entity
121121
, colorName( std::string() )
122122
, transparency( DRW::Opaque )
123123
, plotStyle( DRW::DefaultPlotStyle )
124-
, shadow( DRW::CastAndReceieveShadows )
124+
, shadow( DRW::CastAndReceiveShadows )
125125
, haveExtrusion( false )
126126
, extData()
127127
, haveNextLinks( 0 )
@@ -515,7 +515,7 @@ class DRW_3Dface : public DRW_Trace
515515
SecondEdge = 0x02,
516516
ThirdEdge = 0x04,
517517
FourthEdge = 0x08,
518-
AllEdges = 0x0F
518+
AllEdges = 0x0F //#spellok
519519
};
520520

521521
DRW_3Dface( enum DRW::ETYPE type = DRW::E3DFACE )
@@ -1422,7 +1422,7 @@ class DRW_DimDiametric : public DRW_Dimension
14221422

14231423
DRW_Coord getDiameter1Point() const {return getPt5();} //!< First definition point for diameter, code 15, 25 & 35
14241424
void setDiameter1Point( const DRW_Coord &p ) {setPt5( p );}
1425-
DRW_Coord getDiameter2Point() const {return getDefPoint();} //!< Oposite point for diameter, code 10, 20 & 30
1425+
DRW_Coord getDiameter2Point() const {return getDefPoint();} //!< Opposite point for diameter, code 10, 20 & 30
14261426
void setDiameter2Point( const DRW_Coord &p ) {setDefPoint( p );}
14271427
double getLeaderLength() const {return getRa40();} //!< Leader length, code 40
14281428
void setLeaderLength( const double d ) {setRa40( d );}

‎src/app/dwg/libdxfrw/drw_header.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ void DRW_Header::write( dxfWriter *writer, DRW::Version ver )
16991699
else
17001700
writer->writeDouble( 40, 50.0 );
17011701
writer->writeString( 9, "$CAMERAHEIGHT" );
1702-
if ( getDouble( "$CAMERAHEIGTH", &varDouble ) )
1702+
if ( getDouble( "$CAMERAHEIGHT", &varDouble ) )
17031703
writer->writeDouble( 40, varDouble );
17041704
else
17051705
writer->writeDouble( 40, 0.0 );
@@ -2179,7 +2179,7 @@ bool DRW_Header::parseDwg( DRW::Version version, dwgBuffer *buf, dwgBuffer *hBbu
21792179
// vars["TDUSRTIMER"]=new DRW_Variant(40, buf->getBitLong());//RLZ: TODO convert to day.msec
21802180
// vars["TDUSRTIMER"]=new DRW_Variant(40, buf->getBitLong());//RLZ: TODO convert to day.msec
21812181
vars["CECOLOR"] = new DRW_Variant( 62, buf->getCmColor( version ) );//RLZ: TODO read CMC or EMC color
2182-
dwgHandle HANDSEED = buf->getHandle();//allways present in data stream
2182+
dwgHandle HANDSEED = buf->getHandle();//always present in data stream
21832183
QgsDebugMsg( QString( "HANDSEED: %1.%2 0x%3" ).arg( HANDSEED.code ).arg( HANDSEED.size ).arg( HANDSEED.ref, 0, 16 ) );
21842184
dwgHandle CLAYER = hBbuf->getHandle();
21852185
QgsDebugMsg( QString( "CLAYER: %1.%2 0x%3" ).arg( CLAYER.code ).arg( CLAYER.size ).arg( CLAYER.ref, 0, 16 ) );

‎src/app/dwg/libdxfrw/drw_objects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ bool DRW_Vport::parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs )
11511151
/*dint16 xrefindex =*/
11521152
buf->getBitShort();
11531153
}
1154-
flags |= buf->getBit() << 4; //is refx dependant, style code 70, bit 5 (16)
1154+
flags |= buf->getBit() << 4; //is refx dependent, style code 70, bit 5 (16)
11551155
height = buf->getBitDouble();
11561156
ratio = buf->getBitDouble();
11571157

‎src/app/dwg/libdxfrw/intern/drw_cptable932.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
//first entry in this table are 0xA1
77
#define CPOFFSET932 0xFEC0
8-
//#define CP1LENGHT932 63
9-
#define CPLENGHT932 7724
8+
//#define CP1LENGTH932 63
9+
#define CPLENGTH932 7724
1010
#define NOTFOUND932 0x30FB
1111

1212
//Table 932 one byte are

‎src/app/dwg/libdxfrw/intern/drw_cptable936.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
//first entry in this tables are 0x80
77
#define CPOFFSET936 0x80
8-
#define CPLENGHT936 21791
8+
#define CPLENGTH936 21791
99
#define NOTFOUND936 0x003F
1010

1111
//Table 949 one byte
@@ -6948,7 +6948,7 @@ static const int DRW_DoubleTable936[][2] =
69486948
{0xA8E1, 0x3121}, //6796 #BOPOMOFO LETTER OU
69496949
{0xA8E2, 0x3122}, //6797 #BOPOMOFO LETTER AN
69506950
{0xA8E3, 0x3123}, //6798 #BOPOMOFO LETTER EN
6951-
{0xA8E4, 0x3124}, //6799 #BOPOMOFO LETTER ANG
6951+
{0xA8E4, 0x3124}, //6799 #BOPOMOFO LETTER ANG //#spellok
69526952
{0xA8E5, 0x3125}, //6800 #BOPOMOFO LETTER ENG
69536953
{0xA8E6, 0x3126}, //6801 #BOPOMOFO LETTER ER
69546954
{0xA8E7, 0x3127}, //6802 #BOPOMOFO LETTER I
@@ -15821,7 +15821,7 @@ static const int DRW_DoubleTable936[][2] =
1582115821
{0xDAEA, 0x9649}, //15669 #CJK UNIFIED IDEOGRAPH
1582215822
{0xDAEB, 0x9654}, //15670 #CJK UNIFIED IDEOGRAPH
1582315823
{0xDAEC, 0x965F}, //15671 #CJK UNIFIED IDEOGRAPH
15824-
{0xDAED, 0x9667}, //15672 #CJK UNIFIED IDEOGRAPH
15824+
{0xDAED, 0x9667}, //15672 #CJK UNIFIED IDEOGRAPH //#spellok
1582515825
{0xDAEE, 0x966C}, //15673 #CJK UNIFIED IDEOGRAPH
1582615826
{0xDAEF, 0x9672}, //15674 #CJK UNIFIED IDEOGRAPH
1582715827
{0xDAF0, 0x9674}, //15675 #CJK UNIFIED IDEOGRAPH

‎src/app/dwg/libdxfrw/intern/drw_cptable949.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
//first entry in this table are 0x80
77
#define CPOFFSET949 0x80
8-
#define CPLENGHT949 17048
8+
#define CPLENGTH949 17048
99
#define NOTFOUND949 0x003F
1010

1111
//Table 949 one byte
@@ -480,7 +480,7 @@ static const int DRW_DoubleTable949[][2] =
480480
{0x82E3, 0xADD9}, //329 #HANGUL SYLLABLE KIYEOK WI THIEUTH
481481
{0x82E4, 0xADDA}, //330 #HANGUL SYLLABLE KIYEOK WI PHIEUPH
482482
{0x82E5, 0xADDB}, //331 #HANGUL SYLLABLE KIYEOK WI HIEUH
483-
{0x82E6, 0xADDD}, //332 #HANGUL SYLLABLE KIYEOK YU KIYEOK
483+
{0x82E6, 0xADDD}, //332 #HANGUL SYLLABLE KIYEOK YU KIYEOK //#spellok
484484
{0x82E7, 0xADDE}, //333 #HANGUL SYLLABLE KIYEOK YU SSANGKIYEOK
485485
{0x82E8, 0xADDF}, //334 #HANGUL SYLLABLE KIYEOK YU KIYEOKSIOS
486486
{0x82E9, 0xADE1}, //335 #HANGUL SYLLABLE KIYEOK YU NIEUNCIEUC
@@ -13889,7 +13889,7 @@ static const int DRW_DoubleTable949[][2] =
1388913889
{0xDAEA, 0x6CEE}, //13738 #CJK UNIFIED IDEOGRAPH
1389013890
{0xDAEB, 0x6F58}, //13739 #CJK UNIFIED IDEOGRAPH
1389113891
{0xDAEC, 0x73ED}, //13740 #CJK UNIFIED IDEOGRAPH
13892-
{0xDAED, 0x7554}, //13741 #CJK UNIFIED IDEOGRAPH
13892+
{0xDAED, 0x7554}, //13741 #CJK UNIFIED IDEOGRAPH //#spellok
1389313893
{0xDAEE, 0x7622}, //13742 #CJK UNIFIED IDEOGRAPH
1389413894
{0xDAEF, 0x76E4}, //13743 #CJK UNIFIED IDEOGRAPH
1389513895
{0xDAF0, 0x76FC}, //13744 #CJK UNIFIED IDEOGRAPH

‎src/app/dwg/libdxfrw/intern/drw_cptable950.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
//first entry in this table are 0x80
77
#define CPOFFSET950 0x80
8-
#define CPLENGHT950 13503
8+
#define CPLENGTH950 13503
99
#define NOTFOUND950 0x003F
1010

1111
//Table 950 one byte
@@ -546,7 +546,7 @@ static const int DRW_DoubleTable950[][2] =
546546
{0xA3B2, 0x3121}, //395 #BOPOMOFO LETTER OU
547547
{0xA3B3, 0x3122}, //396 #BOPOMOFO LETTER AN
548548
{0xA3B4, 0x3123}, //397 #BOPOMOFO LETTER EN
549-
{0xA3B5, 0x3124}, //398 #BOPOMOFO LETTER ANG
549+
{0xA3B5, 0x3124}, //398 #BOPOMOFO LETTER ANG //#spellok
550550
{0xA3B6, 0x3125}, //399 #BOPOMOFO LETTER ENG
551551
{0xA3B7, 0x3126}, //400 #BOPOMOFO LETTER ER
552552
{0xA3B8, 0x3127}, //401 #BOPOMOFO LETTER I
@@ -2094,7 +2094,7 @@ static const int DRW_DoubleTable950[][2] =
20942094
{0xADDA, 0x4FFE}, //1943 #CJK UNIFIED IDEOGRAPH
20952095
{0xADDB, 0x502B}, //1944 #CJK UNIFIED IDEOGRAPH
20962096
{0xADDC, 0x5009}, //1945 #CJK UNIFIED IDEOGRAPH
2097-
{0xADDD, 0x517C}, //1946 #CJK UNIFIED IDEOGRAPH
2097+
{0xADDD, 0x517C}, //1946 #CJK UNIFIED IDEOGRAPH //#spellok
20982098
{0xADDE, 0x51A4}, //1947 #CJK UNIFIED IDEOGRAPH
20992099
{0xADDF, 0x51A5}, //1948 #CJK UNIFIED IDEOGRAPH
21002100
{0xADE0, 0x51A2}, //1949 #CJK UNIFIED IDEOGRAPH
@@ -8767,7 +8767,7 @@ static const int DRW_DoubleTable950[][2] =
87678767
{0xDAEA, 0x7CA1}, //8616 #CJK UNIFIED IDEOGRAPH
87688768
{0xDAEB, 0x7D58}, //8617 #CJK UNIFIED IDEOGRAPH
87698769
{0xDAEC, 0x7D6F}, //8618 #CJK UNIFIED IDEOGRAPH
8770-
{0xDAED, 0x7D63}, //8619 #CJK UNIFIED IDEOGRAPH
8770+
{0xDAED, 0x7D63}, //8619 #CJK UNIFIED IDEOGRAPH //#spellok
87718771
{0xDAEE, 0x7D53}, //8620 #CJK UNIFIED IDEOGRAPH
87728772
{0xDAEF, 0x7D56}, //8621 #CJK UNIFIED IDEOGRAPH
87738773
{0xDAF0, 0x7D67}, //8622 #CJK UNIFIED IDEOGRAPH

‎src/app/dwg/libdxfrw/intern/drw_cptables.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
//first entry in all tables are 0x80
55
#define CPOFFSET 0x80
6-
#define CPLENGHTCOMMON 128
6+
#define CPLENGTHCOMMON 128
77

88
//Table 874
99
static const int DRW_Table874[] =
@@ -85,7 +85,7 @@ static const int DRW_Table874[] =
8585
0x0E2A, //75 #THAI CHARACTER SO SUA
8686
0x0E2B, //76 #THAI CHARACTER HO HIP
8787
0x0E2C, //77 #THAI CHARACTER LO CHULA
88-
0x0E2D, //78 #THAI CHARACTER O ANG
88+
0x0E2D, //78 #THAI CHARACTER O ANG //#spellok
8989
0x0E2E, //79 #THAI CHARACTER HO NOKHUK
9090
0x0E2F, //80 #THAI CHARACTER PAIYANNOI
9191
0x0E30, //81 #THAI CHARACTER SARA A
@@ -1014,8 +1014,8 @@ static const int DRW_Table1256[] =
10141014
0x0626, //71 #ARABIC LETTER YEH WITH HAMZA ABOVE
10151015
0x0627, //72 #ARABIC LETTER ALEF
10161016
0x0628, //73 #ARABIC LETTER BEH
1017-
0x0629, //74 #ARABIC LETTER TEH MARBUTA
1018-
0x062A, //75 #ARABIC LETTER TEH
1017+
0x0629, //74 #ARABIC LETTER TEH MARBUTA //#spellok
1018+
0x062A, //75 #ARABIC LETTER TEH //#spellok
10191019
0x062B, //76 #ARABIC LETTER THEH
10201020
0x062C, //77 #ARABIC LETTER JEEM
10211021
0x062D, //78 #ARABIC LETTER HAH

‎src/app/dwg/libdxfrw/intern/drw_textcodec.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,42 +70,42 @@ void DRW_TextCodec::setCodePage( std::string *c, bool dxfFormat )
7070
if ( version == DRW::AC1009 || version == DRW::AC1015 )
7171
{
7272
if ( cp == "ANSI_874" )
73-
conv = new DRW_ConvTable( DRW_Table874, CPLENGHTCOMMON );
73+
conv = new DRW_ConvTable( DRW_Table874, CPLENGTHCOMMON );
7474
else if ( cp == "ANSI_932" )
7575
conv = new DRW_Conv932Table( DRW_Table932, DRW_LeadTable932,
76-
DRW_DoubleTable932, CPLENGHT932 );
76+
DRW_DoubleTable932, CPLENGTH932 );
7777
else if ( cp == "ANSI_936" )
7878
conv = new DRW_ConvDBCSTable( DRW_Table936, DRW_LeadTable936,
79-
DRW_DoubleTable936, CPLENGHT936 );
79+
DRW_DoubleTable936, CPLENGTH936 );
8080
else if ( cp == "ANSI_949" )
8181
conv = new DRW_ConvDBCSTable( DRW_Table949, DRW_LeadTable949,
82-
DRW_DoubleTable949, CPLENGHT949 );
82+
DRW_DoubleTable949, CPLENGTH949 );
8383
else if ( cp == "ANSI_950" )
8484
conv = new DRW_ConvDBCSTable( DRW_Table950, DRW_LeadTable950,
85-
DRW_DoubleTable950, CPLENGHT950 );
85+
DRW_DoubleTable950, CPLENGTH950 );
8686
else if ( cp == "ANSI_1250" )
87-
conv = new DRW_ConvTable( DRW_Table1250, CPLENGHTCOMMON );
87+
conv = new DRW_ConvTable( DRW_Table1250, CPLENGTHCOMMON );
8888
else if ( cp == "ANSI_1251" )
89-
conv = new DRW_ConvTable( DRW_Table1251, CPLENGHTCOMMON );
89+
conv = new DRW_ConvTable( DRW_Table1251, CPLENGTHCOMMON );
9090
else if ( cp == "ANSI_1253" )
91-
conv = new DRW_ConvTable( DRW_Table1253, CPLENGHTCOMMON );
91+
conv = new DRW_ConvTable( DRW_Table1253, CPLENGTHCOMMON );
9292
else if ( cp == "ANSI_1254" )
93-
conv = new DRW_ConvTable( DRW_Table1254, CPLENGHTCOMMON );
93+
conv = new DRW_ConvTable( DRW_Table1254, CPLENGTHCOMMON );
9494
else if ( cp == "ANSI_1255" )
95-
conv = new DRW_ConvTable( DRW_Table1255, CPLENGHTCOMMON );
95+
conv = new DRW_ConvTable( DRW_Table1255, CPLENGTHCOMMON );
9696
else if ( cp == "ANSI_1256" )
97-
conv = new DRW_ConvTable( DRW_Table1256, CPLENGHTCOMMON );
97+
conv = new DRW_ConvTable( DRW_Table1256, CPLENGTHCOMMON );
9898
else if ( cp == "ANSI_1257" )
99-
conv = new DRW_ConvTable( DRW_Table1257, CPLENGHTCOMMON );
99+
conv = new DRW_ConvTable( DRW_Table1257, CPLENGTHCOMMON );
100100
else if ( cp == "ANSI_1258" )
101-
conv = new DRW_ConvTable( DRW_Table1258, CPLENGHTCOMMON );
101+
conv = new DRW_ConvTable( DRW_Table1258, CPLENGTHCOMMON );
102102
else if ( cp == "UTF-8" ) //DXF older than 2007 are write in win codepages
103103
{
104104
cp = "ANSI_1252";
105105
conv = new DRW_Converter( nullptr, 0 );
106106
}
107107
else
108-
conv = new DRW_ConvTable( DRW_Table1252, CPLENGHTCOMMON );
108+
conv = new DRW_ConvTable( DRW_Table1252, CPLENGTHCOMMON );
109109
}
110110
else
111111
{
@@ -181,7 +181,7 @@ std::string DRW_ConvTable::fromUtf8( std::string *s )
181181
j = i + l;
182182
i = j - 1;
183183
notFound = true;
184-
for ( int k = 0; k < cpLenght; k++ )
184+
for ( int k = 0; k < cpLength; k++ )
185185
{
186186
if ( table[k] == code )
187187
{
@@ -296,8 +296,8 @@ std::string DRW_Converter::encodeNum( int c )
296296
return std::string( ( char * )ret );
297297
}
298298

299-
/** 's' is a string with at least 4 bytes lenght
300-
** returned 'b' is byte lenght of encoded char: 2,3 or 4
299+
/** 's' is a string with at least 4 bytes length
300+
** returned 'b' is byte length of encoded char: 2,3 or 4
301301
**/
302302
int DRW_Converter::decodeNum( std::string s, int *b )
303303
{
@@ -348,7 +348,7 @@ std::string DRW_ConvDBCSTable::fromUtf8( std::string *s )
348348
j = i + l;
349349
i = j - 1;
350350
notFound = true;
351-
for ( int k = 0; k < cpLenght; k++ )
351+
for ( int k = 0; k < cpLength; k++ )
352352
{
353353
if ( doubleTable[k][1] == code )
354354
{
@@ -454,7 +454,7 @@ std::string DRW_Conv932Table::fromUtf8( std::string *s )
454454
if ( notFound && ( code < 0xF8 || ( code > 0x390 && code < 0x542 ) ||
455455
( code > 0x200F && code < 0x9FA1 ) || code > 0xF928 ) )
456456
{
457-
for ( int k = 0; k < cpLenght; k++ )
457+
for ( int k = 0; k < cpLength; k++ )
458458
{
459459
if ( doubleTable[k][1] == code )
460460
{
@@ -549,7 +549,7 @@ std::string DRW_Conv932Table::toUtf8( std::string *s )
549549
std::string DRW_ConvUTF16::fromUtf8( std::string *s )
550550
{
551551
DRW_UNUSED( s );
552-
//RLZ: to be writen (only needed for write dwg 2007+)
552+
//RLZ: to be written (only needed for write dwg 2007+)
553553
return std::string();
554554
}
555555

‎src/app/dwg/libdxfrw/intern/drw_textcodec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class DRW_Converter
3434
DRW_Converter( const int *t, int l )
3535
{
3636
table = t;
37-
cpLenght = l;
37+
cpLength = l;
3838
}
3939
virtual ~DRW_Converter() = default;
4040
virtual std::string fromUtf8( std::string *s ) {return *s;}
@@ -44,7 +44,7 @@ class DRW_Converter
4444
std::string encodeNum( int c );
4545
int decodeNum( std::string s, int *b );
4646
const int *table = nullptr;
47-
int cpLenght;
47+
int cpLength;
4848
};
4949

5050
class DRW_ConvUTF16 : public DRW_Converter

‎src/app/dwg/libdxfrw/intern/dwgreader18.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void dwgReader18::parseSysPage( duint8 *decompSec, duint32 decompSize )
116116
}
117117
DRW_DBG( "\n" );
118118
#endif
119-
DRW_DBG( "decompresing " );
119+
DRW_DBG( "decompressing " );
120120
DRW_DBG( compSize );
121121
DRW_DBG( " bytes in " );
122122
DRW_DBG( decompSize );
@@ -231,7 +231,7 @@ bool dwgReader18::parseDataPage( dwgSectionInfo si/*, duint8 *dData*/ )
231231

232232
duint8 *oData = objData + pi.startOffset;
233233
pi.uSize = si.maxSize;
234-
DRW_DBG( "decompresing " );
234+
DRW_DBG( "decompressing " );
235235
DRW_DBG( pi.cSize );
236236
DRW_DBG( " bytes in " );
237237
DRW_DBG( pi.uSize );
@@ -251,7 +251,7 @@ bool dwgReader18::readMetaData()
251251
if ( ! fileBuf->setPosition( 11 ) )
252252
return false;
253253
maintenanceVersion = fileBuf->getRawChar8();
254-
DRW_DBG( "maintenance verion= " );
254+
DRW_DBG( "maintenance version= " );
255255
DRW_DBGH( maintenanceVersion );
256256
DRW_DBG( "\nbyte at 0x0C= " );
257257
DRW_DBGH( fileBuf->getRawChar8() );

‎src/app/dwg/libdxfrw/intern/dwgreader21.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ bool dwgReader21::readMetaData()
2929
if ( ! fileBuf->setPosition( 11 ) )
3030
return false;
3131
maintenanceVersion = fileBuf->getRawChar8();
32-
DRW_DBG( "maintenance verion= " );
32+
DRW_DBG( "maintenance version= " );
3333
DRW_DBGH( maintenanceVersion );
3434
DRW_DBG( "\nbyte at 0x0C= " );
3535
DRW_DBG( fileBuf->getRawChar8() );

‎src/app/dwg/libdxfrw/intern/dwgutil.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ void dwgCompressor::decompress18( duint8 *cbuf, duint8 *dbuf, duint32 csize, dui
179179
pos = 0; //current position in compressed buffer
180180
rpos = 0; //current position in resulting decompressed buffer
181181
litCount = litLength18();
182-
//copy first lileral lenght
182+
//copy first lileral length
183183
for ( duint32 i = 0; i < litCount; ++i )
184184
{
185185
bufD[rpos++] = bufC[pos++];
@@ -728,7 +728,7 @@ secEnum::DWGSection secEnum::getEnum( std::string nameSec )
728728
}
729729
else if ( nameSec == "AcDb:SummaryInfo" )
730730
{
731-
return SUMARYINFO;
731+
return SUMMARYINFO;
732732
}
733733
else if ( nameSec == "AcDb:Preview" )
734734
{

‎src/app/dwg/libdxfrw/intern/dwgutil.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,27 +70,27 @@ class secEnum
7070
public:
7171
enum DWGSection
7272
{
73-
UNKNOWNS, //!< UNKNOWN section.
74-
FILEHEADER, //!< File Header (in R3-R15
75-
HEADER, //!< AcDb:Header
76-
CLASSES, //!< AcDb:Classes
77-
SUMARYINFO, //!< AcDb:SummaryInfo
78-
PREVIEW, //!< AcDb:Preview
79-
VBAPROY, //!< AcDb:VBAProject
80-
APPINFO, //!< AcDb:AppInfo
81-
FILEDEP, //!< AcDb:FileDepList
82-
REVHISTORY, //!< AcDb:RevHistory
83-
SECURITY, //!< AcDb:Security
84-
OBJECTS, //!< AcDb:AcDbObjects
85-
OBJFREESPACE, //!< AcDb:ObjFreeSpace
86-
TEMPLATE, //!< AcDb:Template
87-
HANDLES, //!< AcDb:Handles
88-
PROTOTYPE, //!< AcDb:AcDsPrototype_1b
89-
AUXHEADER, //!< AcDb:AuxHeader, in (R13-R15) second file header
90-
SIGNATURE, //!< AcDb:Signature
91-
APPINFOHISTORY, //!< AcDb:AppInfoHistory (in ac1021 may be a renamed section?
92-
EXTEDATA, //!< Extended Entity Data
93-
PROXYGRAPHICS //!< PROXY ENTITY GRAPHICS
73+
UNKNOWNS, //!< UNKNOWN section.
74+
FILEHEADER, //!< File Header (in R3-R15
75+
HEADER, //!< AcDb:Header
76+
CLASSES, //!< AcDb:Classes
77+
SUMMARYINFO, //!< AcDb:SummaryInfo
78+
PREVIEW, //!< AcDb:Preview
79+
VBAPROY, //!< AcDb:VBAProject
80+
APPINFO, //!< AcDb:AppInfo
81+
FILEDEP, //!< AcDb:FileDepList
82+
REVHISTORY, //!< AcDb:RevHistory
83+
SECURITY, //!< AcDb:Security
84+
OBJECTS, //!< AcDb:AcDbObjects
85+
OBJFREESPACE, //!< AcDb:ObjFreeSpace
86+
TEMPLATE, //!< AcDb:Template
87+
HANDLES, //!< AcDb:Handles
88+
PROTOTYPE, //!< AcDb:AcDsPrototype_1b
89+
AUXHEADER, //!< AcDb:AuxHeader, in (R13-R15) second file header
90+
SIGNATURE, //!< AcDb:Signature
91+
APPINFOHISTORY, //!< AcDb:AppInfoHistory (in ac1021 may be a renamed section?
92+
EXTEDATA, //!< Extended Entity Data
93+
PROXYGRAPHICS //!< PROXY ENTITY GRAPHICS
9494
};
9595

9696
secEnum() {}

‎src/app/dwg/libdxfrw/intern/dxfreader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class dxfReader
5555
std::string getCodePage() { return decoder.getCodePage();}
5656

5757
protected:
58-
virtual bool readCode( int *code ) = 0; //return true if sucesful (not EOF)
58+
virtual bool readCode( int *code ) = 0; //return true if successful (not EOF)
5959
virtual bool readString( std::string *text ) = 0;
6060
virtual bool readString() = 0;
6161
virtual bool readInt16() = 0;

‎src/app/dwg/libdxfrw/intern/rscodec.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ int RScodec::calcDecode( unsigned char *data, int *recd, int **elp, int *d, int
169169
degree of the elp at that step, and u_l[u] is the difference between the
170170
step number and the degree of the elp.
171171
*/
172-
/* initialise table entries */
172+
/* initialize table entries */
173173
d[0] = 0; /* index form */
174174
d[1] = s[1]; /* index form */
175175
elp[0][0] = 0; /* index form */
@@ -412,7 +412,7 @@ bool RScodec::encode( unsigned char *data, unsigned char *parity )
412412
evaluating, storing the syndromes in s[i], i=1..2tt (leave s[0] zero) .
413413
Then we use the Berlekamp iteration to find the error location polynomial
414414
elp[i]. If the degree of the elp is >tt, we cannot correct all the errors
415-
and hence just put out the information symbols uncorrected. If the degree of
415+
and hence just put out the information symbols ian-overridesped. If the degree of
416416
elp is <=tt, we substitute alpha**i , i=1..n into the elp to get the roots,
417417
hence the inverse roots, the error location numbers. If the number of errors
418418
located does not equal the degree of the elp, we have more than tt errors

‎src/app/dwg/libdxfrw/libdxfrw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,7 @@ bool dxfRW::writeTables()
18671867
writer->writeInt16( 281, 0 );
18681868
}
18691869
}
1870-
/* allways call writeBlockRecords to iface for prepare unnamed blocks */
1870+
/* always call writeBlockRecords to iface for prepare unnamed blocks */
18711871
iface->writeBlockRecords();
18721872
if ( version > DRW::AC1009 )
18731873
{

1 commit comments

Comments
 (1)

saberraz commented on Mar 6, 2017

@saberraz
Contributor

This commit breaks my build:

Building CXX object src/app/dwg/libdxfrw/CMakeFiles/libdxfrw.dir/intern/dwgbuffer.cpp.o                                                                                  
/usr/local/src/QGIS_master/src/app/dwg/libdxfrw/drw_entities.cpp: In member function ‘virtual bool DRW_Text::parseDwg(DRW::Version, dwgBuffer*, duint32)’:
/usr/local/src/QGIS_master/src/app/dwg/libdxfrw/drw_entities.cpp:1701:5: error: ‘anglele’ was not declared in this scope
     anglele = buf->getBitDouble(); /* Rotation angle BD 50 */
     ^
src/app/dwg/libdxfrw/CMakeFiles/libdxfrw.dir/build.make:86: recipe for target 'src/app/dwg/libdxfrw/CMakeFiles/libdxfrw.dir/drw_entities.cpp.o' failed
make[2]: *** [src/app/dwg/libdxfrw/CMakeFiles/libdxfrw.dir/drw_entities.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

and:

Built target qgis_composerpapertest_automoc
CMakeFiles/Makefile2:3181: recipe for target 'src/app/dwg/libdxfrw/CMakeFiles/libdxfrw.dir/all' failed
make[1]: *** [src/app/dwg/libdxfrw/CMakeFiles/libdxfrw.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Please sign in to comment.