1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Merge with git+ssh://pasky.or.cz/srv/git/elinks.git

This commit is contained in:
Miciah Dashiel Butler Masters 2005-12-17 00:09:02 +00:00 committed by Miciah Dashiel Butler Masters
commit 35e5ec74d2
12 changed files with 64 additions and 35 deletions

View File

@ -158,6 +158,8 @@ INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
MAKE_COLOR = @MAKE_COLOR@
### This is here because Makefile.config is usually the first thing ### This is here because Makefile.config is usually the first thing
### we get and sometimes the all rule can be implicit, yet we want ### we get and sometimes the all rule can be implicit, yet we want

View File

@ -14,36 +14,46 @@ else
mquiet = quiet_ mquiet = quiet_
endif endif
# Colorize the build.
ifdef MAKE_COLOR
INFO_COLOR = \033[0;35m
CC_COLOR = \033[0;36m
LD_COLOR = \033[0;32m
LINK_COLOR = \033[1;34m
INSTALL_COLOR = \033[0;33m
END_COLOR = \033[0;0m
endif
# Show the command (quiet or non-quiet version based on the assignment # Show the command (quiet or non-quiet version based on the assignment
# just above) and then execute it. # just above) and then execute it.
ncmd = $(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1)) ncmd = $(if $($(quiet)cmd_$(1)),echo -e $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
cmd = @$(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1)) cmd = @$(if $($(quiet)cmd_$(1)),echo -e $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
mcmd = @$(if $($(mquiet)cmd_$(1)),echo $($(mquiet)cmd_$(1)) &&) $(cmd_$(1)) mcmd = @$(if $($(mquiet)cmd_$(1)),echo -e $($(mquiet)cmd_$(1)) &&) $(cmd_$(1))
quiet_cmd_compile = ' [CC] $(RELPATH)$@' quiet_cmd_compile = ' [$(CC_COLOR)CC$(END_COLOR)] $(RELPATH)$@'
masq_cmd_compile = $(COMPILE) -c $< masq_cmd_compile = $(COMPILE) -c $<
cmd_compile = $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< cmd_compile = $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
# Rule to compile a set of .o files into one .o file # Rule to compile a set of .o files into one .o file
quiet_cmd_ld_objs = " [LD] $(RELPATH)$@" quiet_cmd_ld_objs = " [$(LD_COLOR)LD$(END_COLOR)] $(RELPATH)$@"
cmd_ld_objs = $(LD) -r -o $@ $(filter $(OBJS), $^) \ cmd_ld_objs = $(LD) -r -o $@ $(filter $(OBJS), $^) \
$(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), \ $(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), \
`test -e $(subdir)/lib.o && echo $(subdir)/lib.o`) `test -e $(subdir)/lib.o && echo $(subdir)/lib.o`)
quiet_cmd_link = ' [LINK] $(RELPATH)$@' quiet_cmd_link = ' [$(LINK_COLOR)LINK$(END_COLOR)] $(RELPATH)$@'
cmd_link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) cmd_link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
quiet_cmd_sparse = ' [SPARSE] $(RELPATH)$(2)' quiet_cmd_sparse = ' [SPARSE] $(RELPATH)$(2)'
cmd_sparse = $(SPARSE) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) $(SPARSE_FLAGS) $(2) cmd_sparse = $(SPARSE) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) $(SPARSE_FLAGS) $(2)
# Recursive make # Recursive make
quiet_cmd_recmake = "[MAKE $(3)] $(RELPATH)$(2)" quiet_cmd_recmake = "[$(INFO_COLOR)MAKE $(3)$(END_COLOR)] $(RELPATH)$(2)"
cmd_recmake = $(MAKE) -C $(2) $(3) cmd_recmake = $(MAKE) --no-print-directory -C $(2) $(3)
quiet_cmd_installdata = " [INSTALL] $(RELPATH)$(2) -> $(3)" quiet_cmd_installdata = " [$(INSTALL_COLOR)INSTALL$(END_COLOR)] $(RELPATH)$(2) -> $(3)"
cmd_installdata = $(INSTALL_DATA) $(2) $(3) cmd_installdata = $(INSTALL_DATA) $(2) $(3)
quiet_cmd_installprog = " [INSTALL] $(RELPATH)$(2) -> $(3)" quiet_cmd_installprog = " [$(INSTALL_COLOR)INSTALL$(END_COLOR)] $(RELPATH)$(2) -> $(3)"
cmd_installprog = $(INSTALL_PROGRAM) $(2) $(3) cmd_installprog = $(INSTALL_PROGRAM) $(2) $(3)
@ -113,7 +123,7 @@ init-default:
echo 'include $(SRC)/$(RELPATH)/$(subdir)/Makefile' > $(subdir)/Makefile;) echo 'include $(SRC)/$(RELPATH)/$(subdir)/Makefile' > $(subdir)/Makefile;)
clean-default: clean-default:
-test -z "$(CLEAN)" || $(RM) $(CLEAN) @-test -z "$(CLEAN)" || $(RM) $(CLEAN)
cleanall-default: clean-default cleanall-default: clean-default

View File

@ -32,7 +32,7 @@ AC_DEFUN([EL_LOG_CONFIG],
value="[$]$1" value="[$]$1"
fi fi
echo "$about $dots $value" >> features.log echo -e "$about $dots $value" >> features.log
AC_SUBST([$1]) AC_SUBST([$1])
]) ])

View File

@ -21,7 +21,7 @@ do
esac esac
if test ! -d "$pathcomp"; then if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" #echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$? mkdir "$pathcomp" || lasterr=$?

View File

@ -1257,6 +1257,15 @@ ALL_CFLAGS="$CFLAGS $CPPFLAGS"
EL_LOG_CONFIG(ALL_CFLAGS, [Compiler options (CFLAGS)], []) EL_LOG_CONFIG(ALL_CFLAGS, [Compiler options (CFLAGS)], [])
EL_LOG_CONFIG(LIBS, [Linker options (LIBS)], []) EL_LOG_CONFIG(LIBS, [Linker options (LIBS)], [])
dnl ===================================================================
dnl Colored make output
dnl ===================================================================
if test $(`which tput` colors) -ge 4; then
MAKE_COLOR=1
AC_SUBST(MAKE_COLOR)
fi
dnl =================================================================== dnl ===================================================================
dnl Generated files dnl Generated files
dnl =================================================================== dnl ===================================================================

View File

@ -9,15 +9,22 @@ if [ -z "`which wget 2>/dev/null`" ]; then
exit 1 exit 1
fi fi
[ -d .git ] && cd .git [ "$GIT_DIR" ] || GIT_DIR=.git
if ! [ -d "$GIT_DIR" ]; then
echo "Error: You must run this from the project root (or set GIT_DIR to your .git directory)." >&2
exit 1
fi
cd "$GIT_DIR"
echo "[grafthistory] Downloading the history" echo "[grafthistory] Downloading the history"
mkdir -p objects/pack
cd objects/pack cd objects/pack
wget -c http://elinks.or.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx wget -c http://elinks.or.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx
wget -c http://elinks.or.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.pack wget -c http://elinks.or.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.pack
echo "[grafthistory] Setting up the grafts" echo "[grafthistory] Setting up the grafts"
cd ../.. cd ../..
mkdir -p info
# master # master
echo 0f6d4310ad37550be3323fab80456e4953698bf0 06135dc2b8bb7ed2e441305bdaa82048396de633 >>info/grafts echo 0f6d4310ad37550be3323fab80456e4953698bf0 06135dc2b8bb7ed2e441305bdaa82048396de633 >>info/grafts
# REL_0_10 # REL_0_10

View File

@ -130,7 +130,7 @@ doc-dirs:
# $(MAN_DIR) intentionally left out # $(MAN_DIR) intentionally left out
clean-local: clean-local:
$(RM) -r $(HTML_DIR) $(XML_DIR) $(TXT_DIR) $(PDF_DIR) *.tmp @$(RM) -r $(HTML_DIR) $(XML_DIR) $(TXT_DIR) $(PDF_DIR) *.tmp
# Autogenerated asciidoc files. # Autogenerated asciidoc files.

View File

@ -102,6 +102,6 @@ install-local: all-local
) )
clean-local: clean-local:
rm -f $(PACKAGE).po *.new.po $(srcdir)/$(POTFILES_ABS_LIST) @rm -f $(PACKAGE).po *.new.po $(srcdir)/$(POTFILES_ABS_LIST)
include $(top_srcdir)/Makefile.lib include $(top_srcdir)/Makefile.lib

View File

@ -145,10 +145,14 @@ dom_node_cmp(struct dom_node_search *search, struct dom_node *node)
switch (key->type) { switch (key->type) {
case DOM_NODE_ELEMENT: case DOM_NODE_ELEMENT:
return search->subtype - node->data.element.type; if (node->data.element.type)
return search->subtype - node->data.element.type;
break;
case DOM_NODE_ATTRIBUTE: case DOM_NODE_ATTRIBUTE:
return search->subtype - node->data.attribute.type; if (node->data.attribute.type)
return search->subtype - node->data.attribute.type;
break;
default: default:
break; break;

View File

@ -184,12 +184,11 @@ pop_dom_nodes(struct dom_stack *stack, enum dom_node_type type,
state = search_dom_stack(stack, type, string); state = search_dom_stack(stack, type, string);
if (state) if (state)
pop_dom_state(stack, type, state); pop_dom_state(stack, state);
} }
void void
pop_dom_state(struct dom_stack *stack, enum dom_node_type type, pop_dom_state(struct dom_stack *stack, struct dom_stack_state *target)
struct dom_stack_state *target)
{ {
struct dom_stack_state *state; struct dom_stack_state *state;
unsigned int pos; unsigned int pos;

View File

@ -55,8 +55,8 @@ struct dom_stack {
void *data; void *data;
}; };
#define dom_stack_has_parents(nav) \ #define dom_stack_has_parents(stack) \
((nav)->states && (nav)->depth > 0) ((stack)->states && (stack)->depth > 0)
static inline struct dom_stack_state * static inline struct dom_stack_state *
get_dom_stack_state(struct dom_stack *stack, int top_offset) get_dom_stack_state(struct dom_stack *stack, int top_offset)
@ -66,21 +66,21 @@ get_dom_stack_state(struct dom_stack *stack, int top_offset)
return &stack->states[stack->depth - 1 - top_offset]; return &stack->states[stack->depth - 1 - top_offset];
} }
#define get_dom_stack_parent(nav) get_dom_stack_state(nav, 1) #define get_dom_stack_parent(stack) get_dom_stack_state(stack, 1)
#define get_dom_stack_top(nav) get_dom_stack_state(nav, 0) #define get_dom_stack_top(stack) get_dom_stack_state(stack, 0)
#define get_dom_stack_state_data(stack, state) \ #define get_dom_stack_state_data(stack, state) \
((void *) &(stack)->state_objects[(state)->depth * (stack)->object_size]) ((void *) &(stack)->state_objects[(state)->depth * (stack)->object_size])
/* The state iterators do not include the bottom state */ /* The state iterators do not include the bottom state */
#define foreach_dom_state(nav, item, pos) \ #define foreach_dom_state(stack, item, pos) \
for ((pos) = 1; (pos) < (nav)->depth; (pos)++) \ for ((pos) = 1; (pos) < (stack)->depth; (pos)++) \
if (((item) = &(nav)->states[(pos)])) if (((item) = &(stack)->states[(pos)]))
#define foreachback_dom_state(nav, item, pos) \ #define foreachback_dom_state(stack, item, pos) \
for ((pos) = (nav)->depth - 1; (pos) > 0; (pos)--) \ for ((pos) = (stack)->depth - 1; (pos) > 0; (pos)--) \
if (((item) = &(nav)->states[(pos)])) if (((item) = &(stack)->states[(pos)]))
/* Dive through the stack states in search for the specified match. */ /* Dive through the stack states in search for the specified match. */
static inline struct dom_stack_state * static inline struct dom_stack_state *
@ -127,9 +127,7 @@ void pop_dom_nodes(struct dom_stack *stack, enum dom_node_type type,
struct dom_string *string); struct dom_string *string);
/* Pop all stack states until a specific state is reached. */ /* Pop all stack states until a specific state is reached. */
void void pop_dom_state(struct dom_stack *stack, struct dom_stack_state *target);
pop_dom_state(struct dom_stack *stack, enum dom_node_type type,
struct dom_stack_state *target);
/* Visit each node in the tree rooted at @root pre-order */ /* Visit each node in the tree rooted at @root pre-order */
void walk_dom_nodes(struct dom_stack *stack, struct dom_node *root); void walk_dom_nodes(struct dom_stack *stack, struct dom_node *root);

View File

@ -255,7 +255,7 @@ parse_sgml_document(struct dom_stack *stack, struct scanner *scanner)
pstate = get_dom_stack_state_data(stack, state); pstate = get_dom_stack_state_data(stack, state);
copy_struct(&pstate->end_token, token); copy_struct(&pstate->end_token, token);
pop_dom_state(stack, DOM_NODE_ELEMENT, state); pop_dom_state(stack, state);
} }
} }
skip_scanner_token(scanner); skip_scanner_token(scanner);