⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 si_list.h

📁 是一个手机功能的模拟程序
💻 H
字号:
/*
 * Copyright (C) Ericsson Mobile Communications AB, 2000.
 * Licensed to AU-System AB.
 * All rights reserved.
 *
 * This software is covered by the license agreement between
 * the end user and AU-System AB, and may be used and copied
 * only in accordance with the terms of the said agreement.
 *
 * Neither Ericsson Mobile Communications AB nor AU-System AB
 * assumes any responsibility or liability for any errors or inaccuracies in
 * this software, or any consequential, incidental or indirect damage arising
 * out of the use of the Generic WAP Client software.
 */
#ifndef _SI_LIST_H
#define _SI_LIST_H


#include "cmmnrsrc.h"

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

typedef enum 
{   
	headkind,
  linkkind

} enumKind;


typedef struct element {

   enumKind kind;

   struct element *pre,
                  *suc;

	VOID *data;

}  t_element,
   *t_link,
   *t_head;

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

VOID f_lh_newhead (t_head *p_h);
VOID f_lh_newlink (t_link *p_l);
VOID f_lh_out (t_link *p_l);
VOID f_lh_precede (t_link *p_l, t_link *p_x);
VOID f_lh_follow (t_link *p_l, t_link *p_x);
VOID f_lh_into (t_link *p_l, t_head *p_h);
VOID f_lh_into_as_first (t_link *p_l, t_head *p_h);
t_link f_lh_lpred (t_link p_l);
t_link f_lh_lsuc (t_link p_l);
BOOL f_lh_empty (t_head p_h);
t_link f_lh_first (t_head p_h);
t_link f_lh_last (t_head p_h);
UINT16 f_lh_cardinal (t_head p_h);
VOID f_lh_disposelink (t_link *p_l);
VOID f_lh_clear (t_head *p_h);
VOID f_lh_disposehead (t_head *p_h);

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

Funktioner f鰎 listhantering:
   f_lh_newhead
   Skapar en ny tom lista p_h

   f_lh_newlink
   skapar ett nytt element p_l

   f_lh_out
   Om elementet p_l tillh鰎 en lista tas den ur listan.
   p_l 鋘dras inte i 鰒rigt

   f_lh_precede
   S鋞ter in p_l f鰎e p_x i listan d鋜 p_x finns

   f_lh_follow
   S鋞ter in p_l efter p_x i listan d鋜 p_x finns

   f_lh_into
   S鋞ter in p_l sist i listan p_h

   f_lh_into_as_first
   S鋞ter in p_l f鰎st i listan p_h

   f_lh_lpred
   Ger en pekare till det element som ligger f鰎e p_l i listan,
   om p_l 鋜 f鰎st returneras NULL

   f_lh_lsuc
   Ger en pekare till det element som ligger efter p_l i listan
   om p_l 鋜 sist returneras NULL

   f_lh_empty
   Returnerar 1 om listan 鋜 tom, annars 0

   f_lh_first
   Returnerar f鰎sta elementet i listan, om tom : NULL

   f_lh_last
   Returnerar sista elementet i listan, om tom : NULL

   f_lh_cardinal
   Returnerar antalet element i listan

   f_lh_disposelink
   Raderar ut elementet p_l

   f_lh_clear
   Rensar ut listan utom huvudet p_h

   f_lh_disposehead
   Raderar ut hela listan inklusive p_h


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


/* _SI_LIST_H */
#endif 

⌨️ 快捷键说明

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