What does the e.g. +1 on a magic longsword count for in Advanced Dungeons & Dragons? Is it a bonus to damage, or is it to attack?
The Dungeon Master's Guide (1979) for Advanced Dungeons and Dragons says that
All magic swords receive their stated bonus both for purposes of hitting (as a bonus to the "to hit" die) and for damage (as +1, +2, +3, etc. addition to hit points of damage scored). (165)
Thus, consider a fighter armed with a longsword +1, +2 vs. magic-using and enchanted creatures:
Against mundane creatures, the fighter rolls 1d20 to hit and, because of that sword, adds +1 to the result.
If he hits and deals damage with the same sword, he rolls the sword's damage and adds +1 point of damage (in addition to any other modifiers).
Further, if he's facing, say, an annoying unicorn, then (because of the +2 vs. magic-using and enchanted creatures) the fighter instead rolls 1d20 +2 to hit, and, if he hits, adds +2 to the damage dealt by the sword.