Summary:ASTERISK-01612: [patch] IMPORTANT FIX FOR DEBIAN USERS + Simplification of say.c
Reporter:Olle Johansson (oej)Labels:
Date Opened:2004-05-13 17:08:34Date Closed:2008-01-15 14:54:45.000-0600
Versions:Frequency of
Environment:Attachments:( 0) say_simple2.txt
Description:Simplification of say.c - remove all lang options in two places, just have them in ast_say_number_full. Requires implementing options in ast_say_number_full, which required changing say.h and app_agi.c. The latter fix is an ugly patch, but still works.


added by zoa: without this patch, asterisk will not build on debian with gcc 2.95
Comments:By: Mark Spencer (markster) 2004-05-13 17:51:41

What's the up with the use of italian or something? in the end of the patch?

By: flavour (flavour) 2004-05-13 18:13:10

Yes, Italian had a bug & also Taiwanese.
These are both fixed in this updated diff, which applies cleanly to current CVS (after Polish changes)

NB I've also put Polish into alphabetic sync & fixed the whitespace (& other CODING-GUIDELINES cleanups) in the Polish function.
This works fine on a RH ES3 clone.

However some compilers (e.g. Debian-stable) are still failing to compile:
say.c: In function `powiedz':
say.c:1366: parse error before `int'
say.c:1369: `i1000E6' undeclared (first use in this function)

This is similar to what oej fixed with ASTERISK-1601

edited on: 05-13-04 18:20

By: flavour (flavour) 2004-05-13 19:38:33

say_simple2.txt fixes these (has been confirmed for Debian-stable)
- basically need to declare the variables before functions.

edited on: 05-13-04 18:47

By: James Golovich (jamesgolovich) 2004-05-14 17:05:24

I'm in favor of yanking out the offending code and once its cleaned up get it reapplied.  I think we should try to keep function and variable names in english, and variable names should try to be somewhat descriptive of what its used for

By: Mark Spencer (markster) 2004-05-14 23:46:56

can somebody please explain the _it stuff???

By: Olle Johansson (oej) 2004-05-15 03:44:49

This patch grew a bit from the original one... Better to have a number of smaller patches.

The _it stuff: say_number_full_it did a recursive call to say_number_full instead of say_number_full_it

I agree with James that we should keep the function and variable names in english and - if possible - file names as well. Otherwise we might end up with duplicates or synonyms without being able to control it. Also, it's important to document - in english - the syntax and what happens where.

By: philipp2 (philipp2) 2004-05-15 09:51:50

Having trouble with compiling say.c (polish) on RH 7.2: See # 1649

By: Mark Spencer (markster) 2004-05-15 11:23:16

I'm putting this one in as-is.  When we can get the polish translated back into english that would be nice.

By: Digium Subversion (svnbot) 2008-01-15 14:54:45.000-0600

Repository: asterisk
Revision: 2967

U   trunk/apps/app_agi.c
U   trunk/include/asterisk/say.h
U   trunk/say.c

r2967 | markster | 2008-01-15 14:54:44 -0600 (Tue, 15 Jan 2008) | 2 lines

Update coding guidelines, fix "say.c" compile on older compilers, update coding guidelines (includes bug ASTERISK-1612)