1 /***************************************************************************
2  *  Copyright 1991, 1992, 1993, 1994, 1995, 1996, 2001, 2002               *
3  *    David R. Hill, Leonard Manzara, Craig Schock                         *
4  *                                                                         *
5  *  This program is free software: you can redistribute it and/or modify   *
6  *  it under the terms of the GNU General Public License as published by   *
7  *  the Free Software Foundation, either version 3 of the License, or      *
8  *  (at your option) any later version.                                    *
9  *                                                                         *
10  *  This program is distributed in the hope that it will be useful,        *
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
13  *  GNU General Public License for more details.                           *
14  *                                                                         *
15  *  You should have received a copy of the GNU General Public License      *
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
17  ***************************************************************************/
18 // 2014-09
19 // This file was copied from Gnuspeech and modified by Marcelo Y. Matuda.
20 
21 #include "en/letter_to_sound/insert_mark.h"
22 
23 
24 
25 namespace GS {
26 namespace En {
27 
28 /******************************************************************************
29 *
30 *	function:	insert_mark
31 *
32 *	purpose:
33 *
34 *
35 *       arguments:      end, at
36 *
37 *	internal
38 *	functions:	none
39 *
40 *	library
41 *	functions:	none
42 *
43 ******************************************************************************/
44 void
insert_mark(char ** end,char * at)45 insert_mark(char **end, char *at)
46 {
47     register char      *temp = *end;
48 
49     at++;
50 
51     if (*at == 'e')
52 	at++;
53 
54     if (*at == '|')
55 	return;
56 
57     while (temp >= at) {
58 	//temp[1] = *temp--;
59 	temp[1] = *temp; //TODO: check
60 	--temp;
61     }
62 
63     *at = '|';
64     (*end)++;
65 }
66 
67 } /* namespace En */
68 } /* namespace GS */
69