mirror of the now-defunct rocklinux.org
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.

68 lines
1.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/sirkull/ardour/hotfix-binutils-gcc.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. Hotfix needed for new binutils (bug is in gcc)
  20. (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625)
  21. --- ./libs/pbd/pbd/compose.h.orig 2004-08-13 15:35:23.000000000 +0200
  22. +++ ./libs/pbd/pbd/compose.h 2004-08-13 15:38:37.000000000 +0200
  23. @@ -75,39 +75,14 @@
  24. // helper for converting spec string numbers
  25. inline int char_to_int(char c)
  26. {
  27. - switch (c) {
  28. - case '0': return 0;
  29. - case '1': return 1;
  30. - case '2': return 2;
  31. - case '3': return 3;
  32. - case '4': return 4;
  33. - case '5': return 5;
  34. - case '6': return 6;
  35. - case '7': return 7;
  36. - case '8': return 8;
  37. - case '9': return 9;
  38. - default: return -1000;
  39. - }
  40. + if ( c >= '0' && c <= '9' ) return c - '0';
  41. + return -1000;
  42. }
  43. inline bool is_number(int n)
  44. {
  45. - switch (n) {
  46. - case '0':
  47. - case '1':
  48. - case '2':
  49. - case '3':
  50. - case '4':
  51. - case '5':
  52. - case '6':
  53. - case '7':
  54. - case '8':
  55. - case '9':
  56. - return true;
  57. -
  58. - default:
  59. - return false;
  60. - }
  61. + if ( n >= '0' && n <= '9' ) return true;
  62. + return false;
  63. }