Skip to content

Commit

Permalink
Update to git interpreter 1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
spathiwa committed Apr 23, 2023
1 parent 4cd9e25 commit 6f361de
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion git/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ INSTALLDIR = /usr/local/bin

MAJOR = 1
MINOR = 3
PATCH = 4
PATCH = 5

include $(GLKINCLUDEDIR)/$(GLKMAKEFILE)

Expand Down
3 changes: 3 additions & 0 deletions git/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ also to Eliuk Blau for tracking down bugs in the memory management opcodes.

* Version History

1.3.5 2016-11-19 Fixed a bug when the streamnum opcode is called with the
smallest possible negative number.

1.3.4 2015-06-13 Performance improvements from Peter De Wachter, which give
approximately a 15% speed increase.

Expand Down
11 changes: 5 additions & 6 deletions git/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,18 @@ typedef unsigned long git_uint32;

typedef float git_float;

/*

#if defined(__GNUC__)
// GCC and compatible compilers such as clang
# define maybe_unused __attribute__((__unused__))
# define noreturn __attribute__((__noreturn__))
# define git_noreturn __attribute__((__noreturn__))
#elif defined(_MSC_VER)
// Microsoft Visual Studio
# define maybe_unused
# define noreturn __declspec(noreturn)
# define git_noreturn __declspec(noreturn)
#else
*/
# define maybe_unused
# define noreturn
//#endif
# define git_noreturn
#endif

#endif // GIT_CONFIG_H
11 changes: 6 additions & 5 deletions git/terp.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,20 +873,21 @@ do_S1_addr8: memWrite8 (READ_PC, S1); NEXT;
resume_number_L7_digit_L6:
{
char buffer [16];
git_uint32 absn;

// If the IO mode is 'null', do nothing.
if (ioMode == IO_NULL)
goto do_pop_call_stub;

// Write the number into the buffer.
L1 = (L7 < 0) ? -L7 : L7; // Absolute value of number.
L2 = 0; // Current buffer position.
absn = (L7 < 0) ? -L7 : L7; // Absolute value of number.
L2 = 0; // Current buffer position.
do
{
buffer [L2++] = '0' + (L1 % 10);
L1 /= 10;
buffer [L2++] = '0' + (absn % 10);
absn /= 10;
}
while (L1 > 0);
while (absn > 0);

if (L7 < 0)
buffer [L2++] = '-';
Expand Down

0 comments on commit 6f361de

Please sign in to comment.