Changeset - 959846374f42
[Not reviewed]
Merge
0 4 0
Vitaly Takmazov - 14 years ago 2011-10-21 08:43:15
vitalyster@gmail.com
merge upstream
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
backends/CMakeLists.txt
Show inline comments
 
if (PROTOBUF_FOUND)
 
	if ( PURPLE_LIBRARY AND PURPLE_INCLUDE_DIR )
 
		ADD_SUBDIRECTORY(libpurple)
 
	endif()
 

	
 
	if (IRC_FOUND)
 
		ADD_SUBDIRECTORY(libircclient-qt)
 
	endif()
 

	
 
if (NOT WIN32)
 
	ADD_SUBDIRECTORY(frotz)
 
endif()
 

	
 
endif()
backends/frotz/dfrotz/dumb/dumb_input.c
Show inline comments
 
@@ -62,51 +62,49 @@ enum input_type {
 
  INPUT_LINE_CONTINUED,
 
};
 

	
 
/* get a character.  Exit with no fuss on EOF.  */
 
static int xgetchar(void)
 
{
 
  int c = getchar();
 
  if (c == EOF) {
 
    if (feof(stdin)) {
 
      fprintf(stderr, "\nEOT\n");
 
      exit(0);
 
    }
 
    os_fatal(strerror(errno));
 
  }
 
  return c;
 
}
 

	
 
/* Read one line, including the newline, into s.  Safely avoids buffer
 
 * overruns (but that's kind of pointless because there are several
 
 * other places where I'm not so careful).  */
 
static void getline_(char *s)
 
{
 
  int c;
 
  char *p;
 
	
 
  fflush(stdout); 
 
  
 
  p = s;
 
  while (p < s + INPUT_BUFFER_SIZE - 1)
 
    if ((*p++ = xgetchar()) == '\n') {
 
      *p = '\0';
 
      return;
 
    }
 
  p[-1] = '\n';
 
  p[0] = '\0';
 
  while ((c = xgetchar()) != '\n')
 
    ;
 
  printf("Line too long, truncated to %s\n", s - INPUT_BUFFER_SIZE);
 
}
 

	
 
/* Translate in place all the escape characters in s.  */
 
static void translate_special_chars(char *s)
 
{
 
  char *src = s, *dest = s;
 
  while (*src)
 
    switch(*src++) {
 
    default: *dest++ = src[-1]; break;
 
    case '\n': *dest++ = ZC_RETURN; break;
 
    case '\\':
 
      switch (*src++) {
 
      case '\n': *dest++ = ZC_RETURN; break;
0 comments (0 inline, 0 general)