  Let $p(\cdot)$ be a measurable function defined on a probability space
satisfying $0<p_-:={\rm ess}\inf_{x\in \Omega}p(x)\leq {\rm
ess}\sup_{x\in\Omega}p(x)=:p_+<\infty$. We investigate five types of martingale
Hardy spaces $H_{p(\cdot)}$ and $H_{p(\cdot),q}$ and prove their atomic
decompositions when each $\sigma$-algebra $\mathcal F_n$ is generated by
countably many atoms. Martingale inequalities and the relation of the different
martingale Hardy spaces are proved as application of the atomic decomposition.
In order to get these results, we introduce the following condition to replace
(generalize) the so-called log-H\"{o}lder continuity condition in harmonic
analysis: $$ \mathbb P(A)^{p_-(A)-p_+(A)}\leq C_{p(\cdot)} \quad \mbox{ for all
atom $A$}. $$ Some applications in Fourier analysis are given by use of the
previous results. We generalize the classical results and show that the partial
sums of the Walsh-Fourier series converge to the function in norm if $f \in
L_{p(\cdot)}$ or $f \in L_{p(\cdot),q}$ and $p_->1$. The boundedness of the
maximal Fej{\'e}r operator on $H_{p(\cdot)}$ and $H_{p(\cdot),q}$ is proved
whenever $p_->1/2$ and the condition $\frac{1}{p_-}-\frac{1}{p_+} <1$ hold. It
is surprising that this last condition does not appear for trigonometric
Fourier series. One of the key points of the proof is that we introduce two new
dyadic maximal operators and prove their boundedness on $L_{p(\cdot)}$ with
$p_->1$. The method we use to prove these results is new even in the classical
case. As a consequence, we obtain theorems about almost everywhere and norm
convergence of the Fej\'er means.
