patch-src_prog_mouse-test_c 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. --- gpm-1.20.7.orig/src/prog/mouse-test.c 2012-10-26 23:21:38.000000000 +0200
  2. +++ gpm-1.20.7/src/prog/mouse-test.c 2026-05-13 18:43:02.522813736 +0200
  3. @@ -106,7 +106,7 @@ return 0;
  4. /*-----------------------------------------------------------------------------
  5. Place the description here.
  6. -----------------------------------------------------------------------------*/
  7. -static void raw(void)
  8. +static void gpm_raw(void)
  9. {
  10. struct termios it;
  11. @@ -125,7 +125,7 @@ static void raw(void)
  12. /*-----------------------------------------------------------------------------
  13. Place the description here.
  14. -----------------------------------------------------------------------------*/
  15. -static void noraw(void)
  16. +static void gpm_noraw(void)
  17. {
  18. struct termios it;
  19. @@ -144,7 +144,7 @@ static void noraw(void)
  20. void killed(int signo)
  21. {
  22. fprintf(stderr,"mouse-test: killed by signal %i\r\n",signo);
  23. - noraw();
  24. + gpm_noraw();
  25. exit(0);
  26. }
  27. @@ -196,7 +196,7 @@ int mousereopen(int oldfd, char *name, G
  28. int noneofthem(void)
  29. {
  30. - noraw();
  31. + gpm_noraw();
  32. printf("\n\nSomething went wrong, I didn't manage to detect your"
  33. "protocol\n\nFeel free to report your problems to the author\n");
  34. exit(1);
  35. @@ -336,7 +336,7 @@ int main(int argc, char **argv)
  36. I_serial=mice->init; /* the first one has I_serial */
  37. signal(SIGINT,killed); /* control-C kills us */
  38. - raw();
  39. + gpm_raw();
  40. /*====================================== First of all, detect the device */
  41. @@ -568,7 +568,7 @@ int main(int argc, char **argv)
  42. /* why checking and not using return value ??? */
  43. CHECKFAIL(typecount);
  44. if (typecount==1) {
  45. - noraw();
  46. + gpm_noraw();
  47. printf("\n\n\nWell, it seems like your mouse is already detected:\n"
  48. "it is on the device \"%s\", and speaks the protocol \"%s\"\n",
  49. mousename,list->this->name);
  50. @@ -587,7 +587,7 @@ int main(int argc, char **argv)
  51. } while(i!='y' && i!='n');
  52. if (i=='n') {
  53. - noraw();
  54. + gpm_noraw();
  55. printf("\nThen, you should use the \"bare\" protocol on \"%s\"\n",
  56. mousename);
  57. exit(0);
  58. @@ -634,7 +634,7 @@ int main(int argc, char **argv)
  59. for (pending=0,i=0;i<got-16;i++)
  60. if(!memcmp(buf+i,buf+i+8,8)) pending++;
  61. if (pending > 3) {
  62. - noraw();
  63. + gpm_noraw();
  64. printf("\nYour mouse seems to be a 'mman' one on \"%s\" (%i matches)\n",
  65. mousename,pending);
  66. exit(0);
  67. @@ -660,7 +660,7 @@ int main(int argc, char **argv)
  68. continue;
  69. }
  70. if (pending>3) {
  71. - noraw();
  72. + gpm_noraw();
  73. printf("\nYour mouse seems to be a '%s' one on \"%s\" (%i matches)\n",
  74. cur->this->name,mousename,pending);
  75. exit(0);
  76. @@ -695,7 +695,7 @@ int main(int argc, char **argv)
  77. for (pending=0,i=0;i<got-20;i++)
  78. if(!memcmp(buf+i,buf+i+10,10)) pending++;
  79. if (pending>3) {
  80. - noraw();
  81. + gpm_noraw();
  82. printf("\nYour mouse becomes a 3-buttons ('-t msc') one when\n"
  83. "gpm gets '-o %s' on it command line, and X gets\n"
  84. "%s in XF86Config\nThe device is \"%s\"",
  85. @@ -726,7 +726,7 @@ int main(int argc, char **argv)
  86. for (pending=0,i=0;i<got-20;i++)
  87. if(!memcmp(buf+i,buf+i+10,10)) pending++;
  88. if (pending>3) {
  89. - noraw();
  90. + gpm_noraw();
  91. printf("\nWorked. You should keep the button pressed every time the\n"
  92. "computer boots, and run gpm in '-R' mode in order to ignore\n"
  93. "such hassle when starting X\n\nStill better, but a better mouse\n"
  94. @@ -734,7 +734,7 @@ int main(int argc, char **argv)
  95. exit(0);
  96. }
  97. - noraw();
  98. + gpm_noraw();
  99. printf("\nI'm lost. Can't tell you how to use your middle button\n");
  100. return 0;
  101. }