This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [patch] sim/h8300/compile.c: Fix formatting.


Hi

>
>AndrewV,
>
>Don't forget the coding standard:
>
>	http://www.gnu.org/prep/standards_toc.html
>
>One thing I noticed is variables like ``_dst''.  The leading 
>underscore 
>shouldn't be used.
>
>enjoy,
>Andrew
>
>

Corrected

Andrey

2002-05-20  Andrey Volkov  (avolkov@transas.com)

	* compile.c: remove leading undescores in EEPMOV case.

Index: compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8300/compile.c,v
retrieving revision 1.15
diff -u -r1.15 compile.c
--- compile.c	19 May 2002 12:52:54 -0000	1.15
+++ compile.c	20 May 2002 10:12:16 -0000
@@ -1141,25 +1141,25 @@
 	case O (O_EEPMOV, SW):
 	  if (h8300hmode||h8300smode)
 	    {
-	      register unsigned char *_src,*_dst;
+	      register unsigned char *src,*dst;
 	      unsigned int count = (code->opcode == O(O_EEPMOV,
SW))?cpu.regs[R4_REGNUM]&0xffff:
 		cpu.regs[R4_REGNUM]&0xff;
 
-	      _src = cpu.regs[R5_REGNUM] < memory_size ?
cpu.memory+cpu.regs[R5_REGNUM] :
+	      src = cpu.regs[R5_REGNUM] < memory_size ?
cpu.memory+cpu.regs[R5_REGNUM] :
 		cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff);
-	      if ((_src+count)>=(cpu.memory+memory_size))
+	      if ((src+count)>=(cpu.memory+memory_size))
 		{
-		  if ((_src+count)>=(cpu.eightbit+0x100))
+		  if ((src+count)>=(cpu.eightbit+0x100))
 		    goto illegal;
 		}
-	      _dst = cpu.regs[R6_REGNUM] < memory_size ?
cpu.memory+cpu.regs[R6_REGNUM] :
+	      dst = cpu.regs[R6_REGNUM] < memory_size ?
cpu.memory+cpu.regs[R6_REGNUM] :
 	           				       	      cpu.eightbit +
(cpu.regs[R6_REGNUM] & 0xff);
-	      if ((_dst+count)>=(cpu.memory+memory_size))
+	      if ((dst+count)>=(cpu.memory+memory_size))
 		{
-		  if ((_dst+count)>=(cpu.eightbit+0x100))
+		  if ((dst+count)>=(cpu.eightbit+0x100))
 		    goto illegal;
 		}
-	      memcpy(_dst,_src,count);
+	      memcpy(dst,src,count);
 
 	      cpu.regs[R5_REGNUM]+=count;
 	      cpu.regs[R6_REGNUM]+=count;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]