Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. static int tcl_putquick STDVAR
  2. {
  3.   char s[511], *p;
  4.  
  5.   BADARGS(2, 3, " text ?options?");
  6.  
  7.   if ((argc == 3) && egg_strcasecmp(argv[2], "-next") &&
  8.       egg_strcasecmp(argv[2], "-normal")) {
  9.     Tcl_AppendResult(irp, "unknown putquick option: should be one of: ",
  10.                      "-normal -next", NULL);
  11.     return TCL_ERROR;
  12.   }
  13.   strncpy(s, argv[1], 510);
  14.  
  15.   s[510] = 0;
  16.   p = strchr(s, '\n');
  17.   if (p != NULL)
  18.     *p = 0;
  19.   p = strchr(s, '\r');
  20.   if (p != NULL)
  21.     *p = 0;
  22.   if (argc == 3 && !egg_strcasecmp(argv[2], "-next"))
  23.     dprintf(DP_MODE_NEXT, "%s\n", s);
  24.   else
  25.     dprintf(DP_MODE, "%s\n", s);
  26.   return TCL_OK;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement