Пример #1
0
void roadmap_lang_reload(void){
   const char *p;

   RoadMapLangCount = 0;
   RoadMapLangSize = 0;
   roadmap_hash_free(RoadMapLangHash);
   roadmap_lang_allocate ();
   p = roadmap_path_user ();
   RoadMapLangLoaded = roadmap_lang_load (p);
   if (!RoadMapLangLoaded){
      p = roadmap_path_downloads();
      RoadMapLangLoaded = roadmap_lang_load (p);
   }

   RoadMapLangRTL = (strcasecmp(roadmap_lang_get ("RTL"), "Yes") == 0);
}
Пример #2
0
void roadmap_res_shutdown ()
{
   int type;
   RoadMapResource *res;
   int i;
   for ( type=0; type<MAX_RESOURCES; type++ )
   {
      res = &Resources[type];
      for ( i=0; i<Resources[type].count; i++ )
      {
         free_resource ( res, i );
      }
      Resources[type].count = 0;
      if ( Resources[type].hash != NULL )
      {
    	  roadmap_hash_free( Resources[type].hash );
      }
   }
}
Пример #3
0
void roadmap_lang_reload(void){
   const char *p;

   RoadMapLangCount = 0;
   RoadMapLangSize = 0;
   roadmap_hash_free(RoadMapLangHash);
   roadmap_lang_allocate ();

   for (p = roadmap_path_first("user");
        p != NULL && !RoadMapLangLoaded;
        p = roadmap_path_next("user", p))
   {
      RoadMapLangLoaded = roadmap_lang_load (p);
   }

   RoadMapLangRTL = (strcasecmp(roadmap_lang_get ("RTL"), "Yes") == 0);

#ifdef QTMOBILITY
   roadmap_lang_loaded();
#endif
}
Пример #4
0
static void roadmap_square_unmap (void *context) {

   RoadMapSquareContext *square_context = (RoadMapSquareContext *) context;

   if (square_context->type != RoadMapSquareType) {
      roadmap_log(ROADMAP_FATAL, "cannot unmap (bad context type)");
   }

#ifndef J2ME
   roadmap_city_write_file (roadmap_db_map_path(), "city_index", 0);
#endif
   roadmap_city_free ();

   roadmap_square_unload_all ();

   if (RoadMapSquareActive == square_context) {
      RoadMapSquareActive = NULL;
   }

   roadmap_hash_free (square_context->SquareHash);
   free (square_context->Square);
   free (square_context);
}