wap_examples.c

来自「是一个手机功能的模拟程序」· C语言 代码 · 共 79 行

C
79
字号
/*******************************************************************************

          CONDAT (UK)

********************************************************************************

 This software product is the property of Condat (UK) Ltd and may not be
 disclosed to any third party without the express permission of the owner.

********************************************************************************

 $Project name:
 $Project code:
 $Module:
 $File:         Wap_examples.c
 $Revision:

 $Author:    Condat(UK)
 $Date:

********************************************************************************

 Description:
   - This file provides a possibility for hard-coding examples
     that will be loaded using the WAP_loadPage function.
   - Also contains functions for tracking WAP memory use and
     writing error data to FFS.

********************************************************************************

 $History: Wap_examples.c

  15/05/2003 - SPR#1983 - SH - Updated to latest from 1.6.3 version.
  27/06/2003 -      XSPRUTEU - Compilability of the Windows Simulation

 $End

*******************************************************************************/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#ifdef NEW_FRAME
  #include "typedefs.h"
#else
  #include "stddefs.h"
#endif

#ifndef _SIMULATION_
  #include "ffs.h"
#endif

const char * WAP_loadPage (U8 pageIndex)
{
  return NULL; /* Failed to find page */
}

/* Write a simple byte to the 'flag' file */

void writeflag (UBYTE flag)
{
#ifndef _SIMULATION_
  ffs_file_write ("/mmi/flag", & flag, sizeof flag, FFS_O_TRUNC | FFS_O_CREATE);
#endif
}

/* Write the error number in decimal to the 'error' file */

void writeerror (short error)
{
  UBYTE errordigits[6];
  sprintf ((char *) errordigits, "%d", error);
#ifndef _SIMULATION_
  ffs_file_write ("/mmi/error", errordigits, sizeof errordigits, FFS_O_TRUNC | FFS_O_CREATE);
#endif
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?