Re: [Announce] Amaya 10 .1-pre snapshot
Regis Boudin <[email protected]> Fri, 02 May 2008 21:40:06 +0100
| Newsgroups | gmane.comp.web.amaya.devel,gmane.comp.web.amaya.general |
|---|---|
| Message-ID | <1209760806.3229.3.camel@x40> |
Hi, Based on the source snapshot, here are 3 fairly simple patches fixing over a thousand compile warnings. The patch is split becau As usual, feedback welcome. Regis On Tue, 2008-04-29 at 18:37 +0200, Irene Vatton wrote: > Hi, > > A snapshot, Amaya 10.1-pre, is now available. > > Major changes are: > o A new version of the formatting engine > o Improvement of MathML editing > o Possibility to enter a complex CSS selector when a > Style rule is created > o Extension of templates to apply to all XML languages > o Support of the HTML + RDFa profile > o Several other bug fixes >
warnings1.diff
(text/x-patch, 5.8 KB)
Index: amaya-10.1~pre1+dfsg1/amaya/styleparser.c
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/amaya/styleparser.c 2008-05-02 00:26:05.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/amaya/styleparser.c 2008-05-02 00:42:37.000000000 +0100
@@ -61,7 +61,7 @@
/* Description of the set of CSS properties supported */
typedef struct CSSProperty
{
- char *name;
+ const char *name;
PropertyParser parsing_function;
}
CSSProperty;
@@ -373,7 +373,7 @@
SkipValue
skips the value and display an error message if msg is not NULL
----------------------------------------------------------------------*/
-static char *SkipValue (char *msg, char *ptr)
+static char *SkipValue (const char *msg, char *ptr)
{
char *deb;
char c;
Index: amaya-10.1~pre1+dfsg1/thotlib/document/documentapi.c
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/document/documentapi.c 2008-05-02 00:46:31.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/document/documentapi.c 2008-05-02 00:46:49.000000000 +0100
@@ -1077,7 +1077,7 @@
the structure schema having this name, or NULL if this structure
schema is not loaded or not used by the document.
----------------------------------------------------------------------*/
-SSchema TtaGetSSchema (char *name, Document document)
+SSchema TtaGetSSchema (const char *name, Document document)
{
SSchema schema;
Index: amaya-10.1~pre1+dfsg1/thotlib/document/schemas.c
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/document/schemas.c 2008-05-02 00:48:01.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/document/schemas.c 2008-05-02 00:48:21.000000000 +0100
@@ -102,7 +102,7 @@
Return the structure schema called name used by document pDoc.
Return NULL if this document does not use this structure schema.
----------------------------------------------------------------------*/
-PtrSSchema GetSSchemaForDoc (char *name, PtrDocument pDoc)
+PtrSSchema GetSSchemaForDoc (const char *name, PtrDocument pDoc)
{
PtrSSchema pSS;
PtrDocSchemasDescr pPfS;
Index: amaya-10.1~pre1+dfsg1/thotlib/internals/f/documentapi_f.h
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/internals/f/documentapi_f.h 2008-05-02 00:50:53.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/internals/f/documentapi_f.h 2008-05-02 00:51:12.000000000 +0100
@@ -59,7 +59,7 @@
extern SSchema TtaGetDocumentSSchema ( Document document );
extern char *TtaGetSSchemaName ( SSchema schema );
extern char *TtaGetPSchemaName ( SSchema schema );
-extern SSchema TtaGetSSchema ( char *name,
+extern SSchema TtaGetSSchema ( const char *name,
Document document );
extern SSchema TtaGetSSchemaByUri ( char *uriName,
Document document );
@@ -176,7 +176,7 @@
extern SSchema TtaGetDocumentSSchema ( Document document );
extern char *TtaGetSSchemaName ( SSchema schema );
extern char *TtaGetPSchemaName ( SSchema schema );
-extern SSchema TtaGetSSchema ( char *name,
+extern SSchema TtaGetSSchema ( const char *name,
Document document );
extern SSchema TtaGetSSchemaByUri ( char *uriName,
Document document );
Index: amaya-10.1~pre1+dfsg1/thotlib/internals/f/schemas_f.h
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/internals/f/schemas_f.h 2008-05-02 00:48:40.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/internals/f/schemas_f.h 2008-05-02 00:49:01.000000000 +0100
@@ -7,7 +7,7 @@
#ifdef __STDC__
extern void InitNatures ( void );
-extern PtrSSchema GetSSchemaForDoc ( char *name,
+extern PtrSSchema GetSSchemaForDoc ( const char *name,
PtrDocument pDoc );
extern PtrSSchema GetSSchemaByUriForDoc ( char *uriName,
PtrDocument pDoc );
@@ -120,7 +120,7 @@
#else /* __STDC__ */
extern void InitNatures ( void );
-extern PtrSSchema GetSSchemaForDoc ( char *name,
+extern PtrSSchema GetSSchemaForDoc ( const char *name,
PtrDocument pDoc );
extern PtrSSchema GetSSchemaByUriForDoc ( char *uriName,
PtrDocument pDoc );
Index: amaya-10.1~pre1+dfsg1/thotlib/include/document.h
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/include/document.h 2008-05-02 01:05:23.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/include/document.h 2008-05-02 01:05:42.000000000 +0100
@@ -531,7 +531,7 @@
the structure schema having this name, or NULL if this structure
schema is not loaded or not used by the document.
----------------------------------------------------------------------*/
-extern SSchema TtaGetSSchema (char *name, Document document);
+extern SSchema TtaGetSSchema (const char *name, Document document);
/*----------------------------------------------------------------------
TtaGetSSchemaByUri
Index: amaya-10.1~pre1+dfsg1/thotlib/document/translation.c
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/document/translation.c 2008-05-02 01:10:23.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/document/translation.c 2008-05-02 01:10:46.000000000 +0100
@@ -144,7 +144,7 @@
Copy string value into variable buffer named bufferName in translation
schema pTSch.
----------------------------------------------------------------------*/
-static void SetVariableBuffer (PtrTSchema pTSch, char* bufferName, char* value)
+static void SetVariableBuffer (PtrTSchema pTSch, const char* bufferName, char* value)
{
int i, bufNum;
warnings2.diff
(text/x-patch, 4 KB)
Index: amaya-10.1~pre1+dfsg1/thotlib/dialogue/callbackinit.c
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/dialogue/callbackinit.c 2008-05-02 01:20:49.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/dialogue/callbackinit.c 2008-05-02 01:42:35.000000000 +0100
@@ -50,7 +50,7 @@
/*----------------------------------------------------------------------
FetchAction finds and returns an action with the name actionName
----------------------------------------------------------------------*/
-PtrAction FetchAction (char *actionName)
+PtrAction FetchAction (const char *actionName)
{
PtrAction pAction;
@@ -105,7 +105,7 @@
/*----------------------------------------------------------------------
TteGetEventsSet returns a pointer to an existing events set.
----------------------------------------------------------------------*/
-PtrEventsSet TteGetEventsSet (char *name)
+PtrEventsSet TteGetEventsSet (const char *name)
{
PtrEventsSet pevset;
@@ -175,7 +175,7 @@
eventsList.
----------------------------------------------------------------------*/
void TteAddActionEvent (PtrEventsSet eventsList, int typeId,
- APPevent event, ThotBool pre, char *actionName)
+ APPevent event, ThotBool pre, const char *actionName)
{
PtrAction action;
PtrActionEvent pactevent, newactevent;
Index: amaya-10.1~pre1+dfsg1/thotlib/include/appstruct.h
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/include/appstruct.h 2008-05-02 01:22:32.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/include/appstruct.h 2008-05-02 01:22:46.000000000 +0100
@@ -73,7 +73,7 @@
extern void TteAddMenuItem (int menuID, int subMenuID, int itemID, const char* actionName, char itemType, const char * iconName);
extern void TteAddAction (char* actionName, Proc doIt);
-extern void TteAddActionEvent (PtrEventsSet eventsList, int typeId, APPevent event, ThotBool pre, char* actionName);
+extern void TteAddActionEvent (PtrEventsSet eventsList, int typeId, APPevent event, ThotBool pre, const char* actionName);
extern PtrEventsSet TteGetEventsSet (char *name);
extern PtrEventsSet TteNewEventsSet (int structureId, char *name);
extern void TtcStandardPresentation (Document document, View view);
Index: amaya-10.1~pre1+dfsg1/thotlib/internals/f/callbackinit_f.h
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/internals/f/callbackinit_f.h 2008-05-02 01:23:11.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/internals/f/callbackinit_f.h 2008-05-02 01:23:45.000000000 +0100
@@ -7,7 +7,7 @@
#ifdef __STDC__
extern void InitApplicationSchema ( PtrSSchema pSS );
-extern PtrAction FetchAction ( char *actionName );
+extern PtrAction FetchAction ( const char *actionName );
extern void TteAddAction ( char *actionName,
Proc doIt );
extern PtrEventsSet TteGetEventsSet ( char *name );
@@ -17,13 +17,13 @@
int typeId,
APPevent event,
ThotBool pre,
- char *actionName );
+ const char *actionName );
extern void TteFreeAllEventsList ( void );
#else /* __STDC__ */
extern void InitApplicationSchema ( PtrSSchema pSS );
-extern PtrAction FetchAction ( char *actionName );
+extern PtrAction FetchAction ( const char *actionName );
extern void TteAddAction ( char *actionName,
Proc doIt );
extern PtrEventsSet TteGetEventsSet ( char *name );
@@ -33,7 +33,7 @@
int typeId,
APPevent event,
ThotBool pre,
- char *actionName );
+ const char *actionName );
extern void TteFreeAllEventsList ( void );
#endif /* __STDC__ */
warnings3.diff
(text/x-patch, 8.2 KB)
Index: amaya-10.1~pre1+dfsg1/thotlib/include/appstruct.h
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/include/appstruct.h 2008-05-02 01:43:58.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/include/appstruct.h 2008-05-02 21:21:54.000000000 +0100
@@ -18,7 +18,7 @@
typedef struct _APP_action *PtrAction;
typedef struct _APP_action
{
- char* ActName; /* Name of the action */
+ const char* ActName; /* Name of the action */
Proc ActAction; /* The action to be executed */
ThotBool ActPre; /* Previous event implies function */
APPevent ActEvent; /* What NotifyEvent context to generate */
@@ -39,7 +39,7 @@
typedef struct _EventsSet
{
int EvSStructId;/* Identifier of SSchema */
- char *EvSName; /* Name of the events set */
+ const char *EvSName; /* Name of the events set */
PtrActionEvent EvSList[NUMBER_OF_APP_EVENTS];
PtrEventsSet EvSNext; /* Next EventsSet in the list */
} EventsSet;
@@ -67,15 +67,15 @@
extern void TteZeroMenu ();
extern void TteOpenMainWindow (char *name);
extern void TteInitMenus (char *name, int number);
-extern void TteAddMenuAction (char* actionName, Proc procedure, ThotBool state);
-extern void TteAddMenu (int view, int menuID, int itemsNumber, char* menuName);
+extern void TteAddMenuAction (const char* actionName, Proc procedure, ThotBool state);
+extern void TteAddMenu (int view, int menuID, int itemsNumber, const char* menuName);
extern void TteAddSubMenu (int menuID, int itemID, int itemsNumber);
extern void TteAddMenuItem (int menuID, int subMenuID, int itemID, const char* actionName, char itemType, const char * iconName);
-extern void TteAddAction (char* actionName, Proc doIt);
+extern void TteAddAction (const char* actionName, Proc doIt);
extern void TteAddActionEvent (PtrEventsSet eventsList, int typeId, APPevent event, ThotBool pre, const char* actionName);
extern PtrEventsSet TteGetEventsSet (char *name);
-extern PtrEventsSet TteNewEventsSet (int structureId, char *name);
+extern PtrEventsSet TteNewEventsSet (int structureId, const char *name);
extern void TtcStandardPresentation (Document document, View view);
extern void TtcStandardGeometry (Document document, View view);
extern void TtaSetTransformCallback (Func2 function);
Index: amaya-10.1~pre1+dfsg1/thotlib/dialogue/callbackinit.c
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/dialogue/callbackinit.c 2008-05-02 01:43:21.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/dialogue/callbackinit.c 2008-05-02 20:50:21.000000000 +0100
@@ -65,7 +65,7 @@
TteAddAction inserts an action in the list of actions
pointed to by the global variable ActionList.
----------------------------------------------------------------------*/
-void TteAddAction (char *actionName, Proc doIt)
+void TteAddAction (const char *actionName, Proc doIt)
{
PtrAction pAction;
PtrAction newAction;
@@ -131,7 +131,7 @@
TteNewEventsSet returns a pointer to a new events set.
It is added to the global list.
----------------------------------------------------------------------*/
-PtrEventsSet TteNewEventsSet (int structureId, char *name)
+PtrEventsSet TteNewEventsSet (int structureId, const char *name)
{
PtrEventsSet pevset, newEvSet;
int event;
Index: amaya-10.1~pre1+dfsg1/thotlib/internals/f/callbackinit_f.h
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/internals/f/callbackinit_f.h 2008-05-02 20:35:06.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/internals/f/callbackinit_f.h 2008-05-02 20:51:15.000000000 +0100
@@ -8,11 +8,11 @@
extern void InitApplicationSchema ( PtrSSchema pSS );
extern PtrAction FetchAction ( const char *actionName );
-extern void TteAddAction ( char *actionName,
+extern void TteAddAction ( const char *actionName,
Proc doIt );
extern PtrEventsSet TteGetEventsSet ( char *name );
extern PtrEventsSet TteNewEventsSet ( int structureId,
- char *name );
+ const char *name );
extern void TteAddActionEvent ( PtrEventsSet eventsList,
int typeId,
APPevent event,
@@ -24,11 +24,11 @@
extern void InitApplicationSchema ( PtrSSchema pSS );
extern PtrAction FetchAction ( const char *actionName );
-extern void TteAddAction ( char *actionName,
+extern void TteAddAction ( const char *actionName,
Proc doIt );
extern PtrEventsSet TteGetEventsSet ( char *name );
extern PtrEventsSet TteNewEventsSet ( int structureId,
- char *name );
+ const char *name );
extern void TteAddActionEvent ( PtrEventsSet eventsList,
int typeId,
APPevent event,
Index: amaya-10.1~pre1+dfsg1/thotlib/dialogue/appdialogue.c
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/dialogue/appdialogue.c 2008-05-02 21:18:17.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/dialogue/appdialogue.c 2008-05-02 21:21:17.000000000 +0100
@@ -363,7 +363,7 @@
TteAddMenuAction ajoute une nouvelle action dans la table des
actions d'interface.
----------------------------------------------------------------------*/
-void TteAddMenuAction (char *actionName, Proc procedure, ThotBool state)
+void TteAddMenuAction (const char *actionName, Proc procedure, ThotBool state)
{
char *ptr;
int lg;
@@ -606,7 +606,7 @@
TteAddMenu ajoute un nouveau menu pour le schema donne. Si le
nom de schema est Null, il s'agit des menus pris par defaut.
----------------------------------------------------------------------*/
-void TteAddMenu (int view, int menuID, int itemsNumber, char *menuName)
+void TteAddMenu (int view, int menuID, int itemsNumber, const char *menuName)
{
Menu_Ctl *ptrmenu = NULL;
Menu_Ctl *newmenu;
Index: amaya-10.1~pre1+dfsg1/thotlib/internals/f/appdialogue_f.h
===================================================================
--- amaya-10.1~pre1+dfsg1.orig/thotlib/internals/f/appdialogue_f.h 2008-05-02 21:19:02.000000000 +0100
+++ amaya-10.1~pre1+dfsg1/thotlib/internals/f/appdialogue_f.h 2008-05-02 21:22:39.000000000 +0100
@@ -10,7 +10,7 @@
int number );
extern int TtaGetMenuActionNumber ( void );
extern void FreeMenus ( void );
-extern void TteAddMenuAction ( char *actionName,
+extern void TteAddMenuAction ( const char *actionName,
Proc procedure,
ThotBool state );
extern int FindMenuAction ( const char *actionName );
@@ -33,7 +33,7 @@
extern void TteAddMenu ( int view,
int menuID,
int itemsNumber,
- char *menuName );
+ const char *menuName );
extern void TteAddSubMenu ( int menuID,
int itemID,
int itemsNumber );
@@ -116,7 +116,7 @@
int number );
extern int TtaGetMenuActionNumber ( void );
extern void FreeMenus ( void );
-extern void TteAddMenuAction ( char *actionName,
+extern void TteAddMenuAction ( const char *actionName,
Proc procedure,
ThotBool state );
extern int FindMenuAction ( const char *actionName );
@@ -139,7 +139,7 @@
extern void TteAddMenu ( int view,
int menuID,
int itemsNumber,
- char *menuName );
+ const char *menuName );
extern void TteAddSubMenu ( int menuID,
int itemID,
int itemsNumber );