Re: [PATCH 2/5] opcode: centralize opcode definition, part 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 26, 2018 at 12:37:53AM +0100, Ramsay Jones wrote:
> On 25/08/18 23:44, Luc Van Oostenryck wrote:
> > On Sat, Aug 25, 2018 at 10:11:57PM +0100, Ramsay Jones wrote:
> >>
> >>
> >> On 25/08/18 16:43, Luc Van Oostenryck wrote:
> >>> Opcodes are defined in linearize.c:enum opcode.
> >>> The file opcode.c also contains a table with opcodes properties.
> >>>
> >>> Centralize these definitions into a single file: opcode.def that
> >>
> >> opcode.def? Hmm, I think opcode-def.h may be better.
> > 
> > Well, it's not a header file, it can't be used as one. I then prefer
> 
> Heh, it is no more or less a header file as any other in the project!

Not to me, sorry. A 'true' header file contains definition and/or
declarations enclosed with a guard protecting against multiple
inclusion and are normally included on the top of files needing them.
Also, including them even if not needed is normally harmless.
The file here is nothing of this.

> The fact that the macros called in it are defined in another file is
> also not that uncommon!
> 
> > to not use the .h extension for it (and using the extension .def
> 
> Windows folk may get confused. ;-)

Just because of the name or can tools be confused too? 

I wouldn't mind to use another extension if you can suggest one
(but yes, I would prefer to not use .h for it).

> >>> @@ -0,0 +1,114 @@
> >>> +//	OPCODE		negated		swaped		float
> >>> +
> >>> +OPCODE(BADOP,		BADOP,		BADOP,		BADOP)
> >>
> >> Heh, something is wrong with \t chars in this table. This line looked
> >> fine in the original email, but when 'quoted' with '> ', it looks
> >> wrong. However, some other lines ...
> > 
> > It's because I've used tabs to align the second column. The real file is
> > fine. I suppose I should convert those into spaces.
> 
> Hmm, the original unquoted email had problems also.

Because the additional +/-/space character added in front of the lines
in patch format. I assure you that the file is perfectly aligned (when
using tabstops of 8). Anyway, I'm using all spaces now.
 
-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux