It was probably getting difficult to keep the faith, even for diehard faithful Gateway (NYSE:GTW) fans. Yet even as faith was dwindling into hope, the little computer-maker-that-could came through with a happy announcement last week: It almost made a profit in its first quarter. Almost.

If not for $8 million in restructuring charges, Gateway would have earned its owners a penny a share last quarter. With the charges, it wound up losing a penny. But when you compare that with the year-ago loss of $0.51, hey, a penny lost is (almost as good as) a penny earned.

The company has been tightening up its fiscal ship for a while now, sacrificing sales growth to maximize profits on existing sales. Revenues declined 19% sequentially and 3.5% year-over-year as the company scaled back efforts to sell consumer electronics such as plasma TVs and concentrated on moving its key inventory of computers. As for its success in trading revenue for profits, the news on that front has been a bit mixed. Neither inventories nor accounts receivable fell in tandem with sales. In fact, inventories declined only 5% and A/R just 8% sequentially vs. the 19% fall in sales. (Year-on-year, however, inventories and A/R actually fell a bit faster than sales, at 5% and 4% respectively.) The company may also be sacrificing the wrong kinds of sales; its gross margins have fallen precipitously over the past 12 months, from 12.5% a year ago to just 9.6% in the quarter just ended.

Otherwise, Gateway's doing a fine job of cleaning up its balance sheet. Though the company burned through $60 million over the past three months, it spent two-thirds of that on (1) restructuring costs and (2) paying down debt. Absent those two expenditures, cash burn would have been just $20 million. That's roughly one-eighth the amount of cash that Gateway went through in the first quarter of 2004. Given how rapidly Gateway is stemming cash flow from its coffers, one can almost begin to believe the company will begin generating positive free cash flow again in the not-too-distant future.

For more Foolish news and views of Gateway, read:

Fool contributor Rich Smith owns no shares in any company mentioned in this article.