patch-src_richmail_richtext_c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. $OpenBSD: patch-src_richmail_richtext_c,v 1.2 2017/05/25 17:47:08 espie Exp $
  2. Index: src/richmail/richtext.c
  3. --- src/richmail/richtext.c.orig
  4. +++ src/richmail/richtext.c
  5. @@ -15,12 +15,13 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  6. #include <stdio.h>
  7. #include <ctype.h>
  8. +#include <stdlib.h>
  9. #include <signal.h>
  10. #include "richlex.h"
  11. #include "richset.h"
  12. #include <config.h>
  13. +#include <string.h>
  14. -extern char *getenv();
  15. #ifdef AMIGA
  16. extern char *strchr();
  17. #endif
  18. @@ -30,6 +31,10 @@ unsigned _stklen=16384; /* Increase stack size under M
  19. #endif
  20. int iso2022_fputc ();
  21. +static void fputsmovingright(struct charsetmember *, FILE *);
  22. +static int lc2strcmp(char *, char *);
  23. +static void ResetTerminalCodes(int, int, int, int, char *, char *, int,
  24. + char *, char *, int, char *, char *, int);
  25. /*
  26. * ########################################################################
  27. @@ -79,7 +84,7 @@ static int FakeTerminal;
  28. extern tputs();
  29. #endif
  30. -static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), fputsmovingright(), ResetTerminalCodes(), FinalizeTerminal(), outputstr(), FPUTS();
  31. +static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), FinalizeTerminal(), outputstr(), FPUTS();
  32. #define OUTC(c) (outputc((RCHAR)(c)))
  33. @@ -905,7 +910,7 @@ static Pause()
  34. /* Leading spaces should be output as MoveRight, to avoid
  35. having margins that are underlined or reverse video */
  36. -static fputsmovingright(s, fp)
  37. +static void fputsmovingright(s, fp)
  38. struct charsetmember *s;
  39. FILE *fp;
  40. {
  41. @@ -925,9 +930,9 @@ FILE *fp;
  42. }
  43. }
  44. -static ResetTerminalCodes(FakeTerminal, standout, underline, bold, standoutbuf, standendbuf,
  45. - modifiedstandout, StartUnderline, StopUnderline, modifiedunderline,
  46. - BoldOn, BoldOff, modifiedbold)
  47. +static void ResetTerminalCodes(FakeTerminal, standout, underline, bold,
  48. + standoutbuf, standendbuf, modifiedstandout, StartUnderline,
  49. + StopUnderline, modifiedunderline, BoldOn, BoldOff, modifiedbold)
  50. char *standoutbuf, *standendbuf, *StartUnderline, *StopUnderline,
  51. *BoldOn, *BoldOff;
  52. {