X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Flinedata.h;h=f042ab44be0f8cde78ed0811475ed3e396f9ec79;hp=2510ee72f646ece49d43941b9b85710c3c35cb32;hb=a6ff7e087fd944fd0035075d0bb528e95e498d81;hpb=52aa842907b31bb56fb5133da3f023b45bd4355f diff --git a/test/linedata.h b/test/linedata.h index 2510ee72..f042ab44 100644 --- a/test/linedata.h +++ b/test/linedata.h @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2009,2010 Free Software Foundation, Inc. * + * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2009-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,6 +27,16 @@ * authorization. * ****************************************************************************/ +/* + * $Id: linedata.h,v 1.8 2020/02/02 23:34:34 tom Exp $ + * + * Utility functions for reading a line of text from a file. + */ +#ifndef LINEDATA_H_incl +#define LINEDATA_H_incl 1 + +#include + #define isQUIT(c) ((c) == QUIT || (c) == ESCAPE) #define key_RECUR CTRL('W') @@ -85,10 +96,8 @@ read_linedata(WINDOW *work) beep(); continue; } - } else if (code != ERR) { - result = (int) ch; - break; } else { + result = (int) ch; break; } } @@ -98,3 +107,5 @@ read_linedata(WINDOW *work) } return result; } + +#endif /* LINEDATA_H_incl */