[devhelp] parser: take into account also \r in replace_newlines_by_spaces()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] parser: take into account also \r in replace_newlines_by_spaces()
- Date: Fri, 12 May 2017 06:07:17 +0000 (UTC)
commit 9a48fc65db8cb8f85316fc4deb8709ae350effd0
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri May 12 07:39:12 2017 +0200
parser: take into account also \r in replace_newlines_by_spaces()
Add also my copyright, I've done a lot of code clean-ups in this file.
src/dh-parser.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/dh-parser.c b/src/dh-parser.c
index 7d2c174..0c158f3 100644
--- a/src/dh-parser.c
+++ b/src/dh-parser.c
@@ -1,8 +1,9 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/*
- * Copyright (c) 2002-2003 Mikael Hallendal <micke imendio com>
- * Copyright (c) 2002-2003 CodeFactory AB
+ * Copyright (C) 2002-2003 Mikael Hallendal <micke imendio com>
+ * Copyright (C) 2002-2003 CodeFactory AB
* Copyright (C) 2005,2008 Imendio AB
+ * Copyright (C) 2017 Sébastien Wilmet <swilmet gnome org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -14,8 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -71,7 +72,7 @@ replace_newlines_by_spaces (gchar *str)
return;
for (i = 0; str[i] != '\0'; i++) {
- if (str[i] == '\n')
+ if (str[i] == '\n' || str[i] == '\r')
str[i] = ' ';
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]