From 5731acc97cad9a13a5d418f8afc0873ecdf3834d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 29 Sep 2017 07:58:15 +0200 Subject: [PATCH] Fix typo and and comment --- gerbview/class_X2_gerber_attributes.cpp | 13 +++++-------- gerbview/class_X2_gerber_attributes.h | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/gerbview/class_X2_gerber_attributes.cpp b/gerbview/class_X2_gerber_attributes.cpp index 09c3a290fe..bdc0d356c7 100644 --- a/gerbview/class_X2_gerber_attributes.cpp +++ b/gerbview/class_X2_gerber_attributes.cpp @@ -89,15 +89,12 @@ void X2_ATTRIBUTE::DbgListPrms() wxLogMessage( m_Prms.Item( ii ) ); } -/* - * parse a TF command and fill m_Prms by the parameters found. - * aFile = a FILE* ptr to the current Gerber file. - * buff = the buffer containing current Gerber data (GERBER_BUFZ size) - * text = a pointer to the first char to read in Gerber data - */ bool X2_ATTRIBUTE::ParseAttribCmd( FILE* aFile, char *aBuffer, int aBuffSize, char* &aText, - int& aLineNum ) + int& aLineNum ) { + // parse a TF command and fill m_Prms by the parameters found. + // the "%TF" (start of command) is already read by the caller + bool ok = true; wxString data; @@ -122,7 +119,7 @@ bool X2_ATTRIBUTE::ParseAttribCmd( FILE* aFile, char *aBuffer, int aBuffSize, ch aText++; break; - case ',': // End of parameter + case ',': // End of parameter (separator) aText++; m_Prms.Add( data ); data.Empty(); diff --git a/gerbview/class_X2_gerber_attributes.h b/gerbview/class_X2_gerber_attributes.h index 4f43971c0d..16f5d18ec9 100644 --- a/gerbview/class_X2_gerber_attributes.h +++ b/gerbview/class_X2_gerber_attributes.h @@ -96,7 +96,7 @@ public: * @param aText = a pointer to the first char to read from Gerber data stored in aBuffer * After parsing, text points the last char of the command line ('%') (X2 mode) * or the end of line if the line does not contain '%' or aBuffer == NULL (X1 mode) - * @oaram aLineNum = a point to the current line number of aFile + * @param aLineNum = a point to the current line number of aFile * @return true if no error. */ bool ParseAttribCmd( FILE* aFile, char *aBuffer, int aBuffSize, char* &aText, int& aLineNum );