|
| |||||||||||||
#include "mit-copyright.h"#include "X_gram.h"Go to the source code of this file.
Functions | |
| void | add_to_bottom (x_gram *gram) |
| void | pull_to_top (x_gram *gram) |
| void | push_to_bottom (x_gram *gram) |
| void | delete_gram (x_gram *gram) |
| void | unlink_gram (x_gram *gram) |
Variables | |
| x_gram * | bottom_gram = NULL |
| x_gram * | unlinked = NULL |
| int | reverse_stack = 0 |
|
|
Definition at line 21 of file xrevstack.c. References _x_gram::above, _x_gram::below, bottom_gram, and x_gram. 00023 {
00024 if (bottom_gram) {
00025 bottom_gram->below = gram;
00026 gram->below = NULL;
00027 gram->above = bottom_gram;
00028 bottom_gram = gram;
00029 }
00030 else {
00031 gram->above = NULL;
00032 gram->below = NULL;
00033 bottom_gram = gram;
00034 }
00035 }
|
|
|
Definition at line 52 of file xrevstack.c. References _x_gram::above, _x_gram::below, bottom_gram, unlinked, and x_gram. 00054 {
00055 if (gram == bottom_gram) {
00056 if (gram->above) {
00057 bottom_gram = gram->above;
00058 bottom_gram->below = NULL;
00059 }
00060 else {
00061 bottom_gram = NULL;
00062 }
00063 }
00064 else if (gram == unlinked) {
00065 if (gram->above) {
00066 unlinked = gram->above;
00067 unlinked->below = NULL;
00068 }
00069 else {
00070 unlinked = NULL;
00071 }
00072 }
00073 else {
00074 if (gram->above)
00075 gram->above->below = gram->below;
00076 gram->below->above = gram->above;
00077 }
00078
00079 /*
00080 * fix up above & below pointers so that calling delete_gram again is
00081 * safe
00082 */
00083 gram->below = gram;
00084 gram->above = gram;
00085 }
|
|
|
Definition at line 39 of file xrevstack.c. References x_gram. 00041 {
00042 }
|
|
|
Definition at line 46 of file xrevstack.c. References x_gram. 00048 {
00049 }
|
|
|
Definition at line 88 of file xrevstack.c. References _x_gram::above, _x_gram::below, delete_gram(), unlinked, and x_gram. 00090 {
00091 delete_gram(gram);
00092
00093 if (unlinked) {
00094 unlinked->below = gram;
00095 gram->below = NULL;
00096 gram->above = unlinked;
00097 unlinked = gram;
00098 }
00099 else {
00100 gram->above = NULL;
00101 gram->below = NULL;
00102 unlinked = gram;
00103 }
00104 }
|
|
|
Definition at line 16 of file xrevstack.c. Referenced by add_to_bottom(), delete_gram(), x_gram_create(), and xdestroygram(). |
|
|
Definition at line 18 of file xrevstack.c. Referenced by x_gram_create(), and x_gram_init(). |
|
|
Definition at line 17 of file xrevstack.c. Referenced by delete_gram(), unlink_gram(), and xdestroygram(). |
| Last updated at Tue Dec 18 21:07:42 PST 2007. | This site and project hosted by... |