aboutsummaryrefslogtreecommitdiff
path: root/lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-08-06 16:39:03 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-08-06 16:39:03 +0200
commit9e6bb604f1efaf491fa8998d8965b11669b1373c (patch)
tree3a573fcb9c441ce521f372fd631a9e280588142c /lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h
parent68e1ac4617108bb99b848bb1ccb1b55451f5b91b (diff)
downloadgtk-vlc-player-9e6bb604f1efaf491fa8998d8965b11669b1373c.tar.gz
when parsing a format file, check whether each line could be read completely, otherwise throw error
* arbitrary limit (1024 bytes) per line - reading lines of arbritrary length is difficult and will be seldomly used * introduced is_newline() helper function
Diffstat (limited to 'lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h')
-rw-r--r--lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h b/lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h
index 42cbc98..aaf7e37 100644
--- a/lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h
+++ b/lib/gtk-experiment-widgets/gtk-experiment-transcript-private.h
@@ -130,4 +130,11 @@ gtk_experiment_transcript_free_format(GtkExperimentTranscriptFormat *format)
G_GNUC_INTERNAL
void gtk_experiment_transcript_free_formats(GSList *formats);
+/** @private */
+static inline gboolean
+is_newline(gchar c)
+{
+ return c == '\r' || c == '\n';
+}
+
#endif