OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.7 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../dietlibc/patches/pkg_nasm.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2004 Clifford Wolf
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- T2-COPYRIGHT-NOTE-END ---
  17. --- ./nasmlib.c.orig 2005-01-15 23:15:51.000000000 +0100
  18. +++ ./nasmlib.c 2006-06-18 22:11:25.000000000 +0200
  19. @@ -372,10 +372,8 @@
  20. if (posn >= r->stepsize * LAYERSIZ(r))
  21. return 0; /* Return 0 for undefined entries */
  22. while (r->layers > 0) {
  23. - ldiv_t l;
  24. - l = ldiv(posn, r->stepsize);
  25. - r = r->u.b.data[l.quot];
  26. - posn = l.rem;
  27. + r = r->u.b.data[ posn / r->stepsize ];
  28. + posn = posn % r->stepsize;
  29. if (!r)
  30. return 0; /* Return 0 for undefined entries */
  31. }
  32. @@ -408,14 +406,12 @@
  33. result = r;
  34. while (r->layers > 0) {
  35. - ldiv_t l;
  36. struct RAA **s;
  37. - l = ldiv(posn, r->stepsize);
  38. - s = &r->u.b.data[l.quot];
  39. + s = &r->u.b.data[ posn / r->stepsize ];
  40. if (!*s)
  41. *s = real_raa_init(r->layers - 1);
  42. r = *s;
  43. - posn = l.rem;
  44. + posn = posn % r->stepsize;
  45. }
  46. r->u.l.data[posn] = value;